mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Video: Clearly separate Texture and EFB Copy formats
Improve bookkeeping around formats. Hopefully make code less confusing. - Rename TlutFormat -> TLUTFormat to follow conventions. - Use enum classes to prevent using a Texture format where an EFB Copy format is expected or vice-versa. - Use common EFBCopyFormat names regardless of depth and YUV configurations.
This commit is contained in:
@ -8,15 +8,18 @@
|
||||
#include <utility>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "VideoCommon/TextureDecoder.h"
|
||||
|
||||
enum class APIType;
|
||||
enum class TextureFormat;
|
||||
enum class EFBCopyFormat;
|
||||
enum class TLUTFormat;
|
||||
struct EFBCopyParams;
|
||||
|
||||
namespace TextureConversionShader
|
||||
{
|
||||
u16 GetEncodedSampleCount(u32 format);
|
||||
u16 GetEncodedSampleCount(EFBCopyFormat format);
|
||||
|
||||
const char* GenerateEncodingShader(const EFBCopyFormat& format, APIType ApiType);
|
||||
const char* GenerateEncodingShader(const EFBCopyParams& params, APIType ApiType);
|
||||
|
||||
// View format of the input data to the texture decoding shader.
|
||||
enum BufferFormat
|
||||
@ -51,7 +54,7 @@ u32 GetBytesPerBufferElement(BufferFormat buffer_format);
|
||||
std::pair<u32, u32> GetDispatchCount(const DecodingShaderInfo* info, u32 width, u32 height);
|
||||
|
||||
// Returns the GLSL string containing the texture decoding shader for the specified format.
|
||||
std::string GenerateDecodingShader(TextureFormat format, TlutFormat palette_format,
|
||||
std::string GenerateDecodingShader(TextureFormat format, TLUTFormat palette_format,
|
||||
APIType api_type);
|
||||
|
||||
} // namespace TextureConversionShader
|
||||
|
Reference in New Issue
Block a user