mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Reorganize the FS shader bits too, for a better sort order in the shader viewer
This commit is contained in:
@@ -193,8 +193,8 @@ std::string FragmentShaderDesc(const FShaderID &id) {
|
||||
default: desc.C("(TFuncUnk) "); break;
|
||||
}
|
||||
}
|
||||
if (id.Bit(FS_BIT_ENABLE_FOG)) desc.C("Fog ");
|
||||
if (id.Bit(FS_BIT_LMODE)) desc.C("LM ");
|
||||
if (id.Bit(FS_BIT_ENABLE_FOG)) desc.C("Fog ");
|
||||
if (id.Bit(FS_BIT_FLATSHADE)) desc.C("Flat ");
|
||||
if (id.Bit(FS_BIT_DEPTH_TEST_NEVER)) desc.C("DepthNever ");
|
||||
if (id.Bit(FS_BIT_COLOR_WRITEMASK)) desc.C("WriteMask ");
|
||||
|
||||
+20
-20
@@ -75,20 +75,23 @@ static inline VShaderBit operator +(VShaderBit bit, int i) {
|
||||
enum FShaderBit : uint8_t {
|
||||
FS_BIT_CLEARMODE = 0,
|
||||
FS_BIT_DO_TEXTURE = 1,
|
||||
FS_BIT_TEXFUNC = 2, // 3 bits
|
||||
FS_BIT_SHADER_TEX_CLAMP = 5,
|
||||
FS_BIT_CLAMP_S = 6,
|
||||
FS_BIT_CLAMP_T = 7,
|
||||
FS_BIT_SHADER_DEPAL_FORMAT = 8, // 3 bits (GEBufferFormat), connected to FS_BIT_SHADER_DEPAL_MODE
|
||||
FS_BIT_3D_TEXTURE = 2,
|
||||
FS_BIT_DO_TEXTURE_PROJ = 3,
|
||||
FS_BIT_TEXFUNC = 4, // 3 bits
|
||||
FS_BIT_LMODE = 7,
|
||||
FS_BIT_ENABLE_FOG = 8,
|
||||
FS_BIT_FLATSHADE = 9,
|
||||
FS_BIT_DEPTH_CLAMP = 10, // These both are connected to VS_BIT_MINMAX_DISCARD_OR_DEPTH_CLAMP in the vertex shader.
|
||||
FS_BIT_MINMAX_DISCARD = 11,
|
||||
FS_BIT_ALPHA_TEST = 12,
|
||||
FS_BIT_ALPHA_TEST_FUNC = 13, // 3 bits
|
||||
FS_BIT_ALPHA_AGAINST_ZERO = 16,
|
||||
FS_BIT_COLOR_TEST = 17,
|
||||
FS_BIT_COLOR_TEST_FUNC = 18, // 2 bits
|
||||
FS_BIT_COLOR_AGAINST_ZERO = 20,
|
||||
FS_BIT_ENABLE_FOG = 21,
|
||||
FS_BIT_DO_TEXTURE_PROJ = 22,
|
||||
FS_BIT_MINMAX_DISCARD = 23,
|
||||
FS_BIT_SHADER_TEX_CLAMP = 21,
|
||||
FS_BIT_CLAMP_S = 22,
|
||||
FS_BIT_CLAMP_T = 23,
|
||||
FS_BIT_STENCIL_TO_ALPHA = 24, // 2 bits
|
||||
FS_BIT_REPLACE_ALPHA_WITH_STENCIL_TYPE = 26, // 4 bits (ReplaceAlphaType)
|
||||
FS_BIT_SIMULATE_LOGIC_OP_TYPE = 30, // 2 bits
|
||||
@@ -96,20 +99,17 @@ enum FShaderBit : uint8_t {
|
||||
FS_BIT_BLENDEQ = 35, // 3 bits
|
||||
FS_BIT_BLENDFUNC_A = 38, // 4 bits
|
||||
FS_BIT_BLENDFUNC_B = 42, // 4 bits
|
||||
FS_BIT_FLATSHADE = 46,
|
||||
// Free bit 47
|
||||
FS_BIT_TEST_DISCARD_TO_ZERO = 48,
|
||||
FS_BIT_NO_DEPTH_CANNOT_DISCARD_STENCIL = 49,
|
||||
FS_BIT_COLOR_WRITEMASK = 50,
|
||||
FS_BIT_REPLACE_LOGIC_OP = 51, // 4 bits. GE_LOGIC_COPY means no-op/off.
|
||||
FS_BIT_SHADER_DEPAL_MODE = 55, // 2 bits (ShaderDepalMode)
|
||||
FS_BIT_SAMPLE_ARRAY_TEXTURE = 57, // For multiview, framebuffers are array textures and we need to sample the two layers correctly.
|
||||
FS_BIT_TEST_DISCARD_TO_ZERO = 46,
|
||||
FS_BIT_NO_DEPTH_CANNOT_DISCARD_STENCIL = 47,
|
||||
FS_BIT_COLOR_WRITEMASK = 48,
|
||||
FS_BIT_REPLACE_LOGIC_OP = 49, // 4 bits. GE_LOGIC_COPY means no-op/off.
|
||||
FS_BIT_SHADER_DEPAL_MODE = 53, // 2 bits (ShaderDepalMode)
|
||||
FS_BIT_SHADER_DEPAL_FORMAT = 55, // 3 bits (GEBufferFormat), connected to FS_BIT_SHADER_DEPAL_MODE
|
||||
FS_BIT_STEREO = 58,
|
||||
FS_BIT_USE_FRAMEBUFFER_FETCH = 59,
|
||||
FS_BIT_LMODE = 60,
|
||||
FS_BIT_DEPTH_TEST_NEVER = 61, // Only used on Mali. Set when depth == NEVER. We forcibly avoid writing to depth in this case, since it crashes the driver.
|
||||
FS_BIT_DEPTH_CLAMP = 62, // These both are connected to VS_BIT_MINMAX_DISCARD_OR_DEPTH_CLAMP in the vertex shader.
|
||||
FS_BIT_3D_TEXTURE = 63,
|
||||
FS_BIT_DEPTH_TEST_NEVER = 60, // Only used on Mali. Set when depth == NEVER. We forcibly avoid writing to depth in this case, since it crashes the driver.
|
||||
FS_BIT_SAMPLE_ARRAY_TEXTURE = 61, // For multiview, framebuffers are array textures and we need to sample the two layers correctly.
|
||||
// Free bits: 62-63
|
||||
};
|
||||
|
||||
static inline FShaderBit operator +(FShaderBit bit, int i) {
|
||||
|
||||
@@ -896,7 +896,7 @@ enum class CacheDetectFlags {
|
||||
};
|
||||
|
||||
#define CACHE_HEADER_MAGIC 0x83277592
|
||||
#define CACHE_VERSION 41
|
||||
#define CACHE_VERSION 42
|
||||
|
||||
struct CacheHeader {
|
||||
uint32_t magic;
|
||||
|
||||
@@ -403,7 +403,7 @@ enum class VulkanCacheDetectFlags {
|
||||
};
|
||||
|
||||
#define CACHE_HEADER_MAGIC 0xff51f420
|
||||
#define CACHE_VERSION 57
|
||||
#define CACHE_VERSION 58
|
||||
|
||||
struct VulkanCacheHeader {
|
||||
uint32_t magic;
|
||||
|
||||
Reference in New Issue
Block a user