From cd0802b9c8c48ab155e46ecd16ac84fe2de6cc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 10 Jun 2026 10:46:05 +0200 Subject: [PATCH] Remove redundant flag from vertex shader IDs --- GPU/Common/ShaderId.cpp | 2 -- GPU/Common/ShaderId.h | 2 +- GPU/Common/VertexShaderGenerator.cpp | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/GPU/Common/ShaderId.cpp b/GPU/Common/ShaderId.cpp index a7aa6bfb01..18fe625189 100644 --- a/GPU/Common/ShaderId.cpp +++ b/GPU/Common/ShaderId.cpp @@ -18,7 +18,6 @@ std::string VertexShaderDesc(const VShaderID &id) { std::stringstream desc; desc << StringFromFormat("%08x:%08x ", id.d[1], id.d[0]); if (id.Bit(VS_BIT_IS_THROUGH)) desc << "THR "; - if (id.Bit(VS_BIT_CLIP_ENABLE)) desc << "Clip "; if (id.Bit(VS_BIT_USE_HW_TRANSFORM)) desc << "HWX "; if (id.Bit(VS_BIT_HAS_COLOR)) desc << "C "; if (id.Bit(VS_BIT_HAS_TEXCOORD)) desc << "T "; @@ -97,7 +96,6 @@ void ComputeVertexShaderID(VShaderID *id_out, u32 vertType, bool useHWTransform, id.SetBit(VS_BIT_LMODE, lmode); id.SetBit(VS_BIT_IS_THROUGH, isModeThrough); id.SetBit(VS_BIT_HAS_COLOR, vtypeHasColor); - id.SetBit(VS_BIT_CLIP_ENABLE, gstate.isDepthClipEnabled()); id.SetBit(VS_BIT_VERTEX_RANGE_CULLING, vertexRangeCulling); if (!isModeThrough && gstate_c.Use(GPU_USE_SINGLE_PASS_STEREO)) { diff --git a/GPU/Common/ShaderId.h b/GPU/Common/ShaderId.h index 29affbf6f7..88c955bbf3 100644 --- a/GPU/Common/ShaderId.h +++ b/GPU/Common/ShaderId.h @@ -28,7 +28,7 @@ enum VShaderBit : uint8_t { VS_BIT_IS_THROUGH = 1, // bit 2 is free. VS_BIT_HAS_COLOR = 3, - VS_BIT_CLIP_ENABLE = 4, + // bit 4 is free. VS_BIT_VERTEX_RANGE_CULLING = 5, VS_BIT_SIMPLE_STEREO = 6, // bit 7 is free, diff --git a/GPU/Common/VertexShaderGenerator.cpp b/GPU/Common/VertexShaderGenerator.cpp index a170974d3c..b66ac96252 100644 --- a/GPU/Common/VertexShaderGenerator.cpp +++ b/GPU/Common/VertexShaderGenerator.cpp @@ -134,7 +134,6 @@ bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguag const bool isModeThrough = id.Bit(VS_BIT_IS_THROUGH); const bool useHWTransform = id.Bit(VS_BIT_USE_HW_TRANSFORM); - const bool clipEnable = id.Bit(VS_BIT_CLIP_ENABLE) && !isModeThrough; // this is the PSP clip flag, which has some various consequences. const bool clipNearPlane = gstate_c.Use(GPU_USE_CLIP_DISTANCE) && useHWTransform; const bool clipMinMax = gstate_c.Use(GPU_USE_CLIP_DISTANCE) && !isModeThrough; // If clip planes are available, we want to use them for min/max. We skip the min/max culling in software transform (not yet implemented).