diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-12-26 16:25:56 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-08-29 11:10:05 -0700 |
| commit | f21798b9b6680aa79e0a2eec322cba93dde497b2 (patch) | |
| tree | 8cc8905f8338263b1b05e9395691a20d532b6a08 /Source/Core/VideoCommon/UberShaderPixel.cpp | |
| parent | e43f02c7524be8d534389d10d349d4f8361ef4f2 (diff) | |
BPMemory: Use even/odd in TwoTevStageOrders instead of 0/1
Diffstat (limited to 'Source/Core/VideoCommon/UberShaderPixel.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/UberShaderPixel.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp index 22708f3d66..2561e801bc 100644 --- a/Source/Core/VideoCommon/UberShaderPixel.cpp +++ b/Source/Core/VideoCommon/UberShaderPixel.cpp @@ -581,7 +581,8 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config, " ss.order = bpmem_tevorder(stage>>1);\n" " if ((stage & 1u) == 1u)\n" " ss.order = ss.order >> {};\n\n", - int(TwoTevStageOrders().enable1.StartBit() - TwoTevStageOrders().enable0.StartBit())); + int(TwoTevStageOrders().enable_tex_odd.StartBit() - + TwoTevStageOrders().enable_tex_even.StartBit())); // Disable texturing when there are no texgens (for now) if (numTexgen != 0) @@ -596,11 +597,11 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config, out.Write("\n" " uint tex_coord = {};\n", - BitfieldExtract<&TwoTevStageOrders::texcoord0>("ss.order")); + BitfieldExtract<&TwoTevStageOrders::texcoord_even>("ss.order")); out.Write(" int2 fixedPoint_uv = getTexCoord(tex_coord);\n" "\n" " bool texture_enabled = (ss.order & {}u) != 0u;\n", - 1 << TwoTevStageOrders().enable0.StartBit()); + 1 << TwoTevStageOrders().enable_tex_even.StartBit()); out.Write("\n" " // Indirect textures\n" " uint tevind = bpmem_tevind(stage);\n" @@ -712,7 +713,7 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config, " // Sample texture for stage\n" " if (texture_enabled) {{\n" " uint sampler_num = {};\n", - BitfieldExtract<&TwoTevStageOrders::texmap0>("ss.order")); + BitfieldExtract<&TwoTevStageOrders::texmap_even>("ss.order")); out.Write("\n" " int4 color = sampleTextureWrapper(sampler_num, tevcoord.xy, layer);\n" " uint swap = {};\n", @@ -1216,7 +1217,7 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config, "int4 getRasColor(State s, StageState ss, float4 colors_0, float4 colors_1) {{\n" " // Select Ras for stage\n" " uint ras = {};\n", - BitfieldExtract<&TwoTevStageOrders::colorchan0>("ss.order")); + BitfieldExtract<&TwoTevStageOrders::colorchan_even>("ss.order")); out.Write(" if (ras < 2u) {{ // Lighting Channel 0 or 1\n" " int4 color = iround(((ras == 0u) ? colors_0 : colors_1) * 255.0);\n" " uint swap = {};\n", |
