diff options
| author | degasus <wickmarkus@web.de> | 2016-09-28 23:31:10 +0200 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2016-10-04 10:13:46 +0200 |
| commit | 083be0832fb590e131b0d6e6dbbe6ec1fba15fa9 (patch) | |
| tree | fa650f29a4bc265ffcc26eb843480b8d3b10b2f7 /Source/Core/VideoCommon/PixelShaderGen.cpp | |
| parent | 829fc8f0adeaf82d78b695208b24015456d8e52b (diff) | |
LightingShader: Drop xfmem usage.
Our shaders must only depend on the UID, not on any global state.
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index ae3a52ecf3..2929e1cea9 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -207,7 +207,7 @@ PixelShaderUid GetPixelShaderUid(DSTALPHA_MODE dstAlphaMode) // The lighting shader only needs the two color bits of the 23bit component bit array. uid_data->components = (VertexLoaderManager::g_current_components & (VB_HAS_COL0 | VB_HAS_COL1)) >> VB_COL_SHIFT; - ; + uid_data->numColorChans = xfmem.numChan.numColorChans; GetLightingShaderUid(uid_data->lighting); } @@ -649,7 +649,7 @@ ShaderCode GeneratePixelShaderCode(APIType ApiType, const pixel_shader_uid_data* // out.SetConstantsUsed(C_PLIGHTS, C_PLIGHTS+31); // TODO: Can be optimized further // out.SetConstantsUsed(C_PMATERIALS, C_PMATERIALS+3); GenerateLightingShaderCode(out, uid_data->lighting, uid_data->components << VB_COL_SHIFT, - "colors_", "col"); + uid_data->numColorChans, "colors_", "col"); } // HACK to handle cases where the tex gen is not enabled |
