| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <optional> |
| 7 |
#include <string> |
| 8 |
#include <utility> |
| 9 |
|
| 10 |
#include "Common/CommonTypes.h" |
| 11 |
|
| 12 |
enum class APIType; |
| 13 |
enum class TextureFormat; |
| 14 |
enum class EFBCopyFormat; |
| 15 |
enum class TLUTFormat; |
| 16 |
enum TexelBufferFormat : u32; |
| 17 |
struct EFBCopyParams; |
| 18 |
|
| 19 |
namespace TextureConversionShaderTiled |
| 20 |
{ |
| 21 |
u16 GetEncodedSampleCount(EFBCopyFormat format); |
| 22 |
|
| 23 |
std::string GenerateEncodingShader(const EFBCopyParams& params, APIType api_type); |
| 24 |
|
| 25 |
|
| 26 |
struct DecodingShaderInfo |
| 27 |
{ |
| 28 |
TexelBufferFormat buffer_format; |
| 29 |
u32 palette_size; |
| 30 |
u32 group_size_x; |
| 31 |
u32 group_size_y; |
| 32 |
bool group_flatten; |
| 33 |
const char* shader_body; |
| 34 |
}; |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
const DecodingShaderInfo* GetDecodingShaderInfo(TextureFormat format); |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
std::pair<u32, u32> GetDispatchCount(const DecodingShaderInfo* info, u32 width, u32 height); |
| 43 |
|
| 44 |
|
| 45 |
std::string GenerateDecodingShader(TextureFormat format, std::optional<TLUTFormat> palette_format, |
| 46 |
APIType api_type); |
| 47 |
|
| 48 |
|
| 49 |
std::string GeneratePaletteConversionShader(TLUTFormat palette_format, APIType api_type); |
| 50 |
|
| 51 |
} |