diff options
| author | degasus <wickmarkus@web.de> | 2012-12-27 10:36:54 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2012-12-27 10:36:54 +0100 |
| commit | 316a33d1e68ab47b2870345a04bb9dfd4f383f28 (patch) | |
| tree | 03b40807def9787df30976ecb53f09d6c6084c13 /Source/Core/VideoCommon/Src/PixelShaderGen.cpp | |
| parent | 53398ca5d8bc6e73a726c9d803db5a956c22cf6a (diff) | |
| parent | 94116bf89c917309b7e7b2a2b46bf2f43f3219db (diff) | |
Merge branch 'master' into GLSL-master
Conflicts:
Source/Core/DolphinWX/Src/VideoConfigDiag.h
Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h
Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
Diffstat (limited to 'Source/Core/VideoCommon/Src/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/PixelShaderGen.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index b2bada299f..52c4633ced 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -129,15 +129,11 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 compo return; } + // numtexgens should be <= 8 for (unsigned int i = 0; i < bpmem.genMode.numtexgens; ++i) - { - if (18+i < 32) - uid->values[0] |= xfregs.texMtxInfo[i].projection << (18+i); // 1 - else - uid->values[1] |= xfregs.texMtxInfo[i].projection << (i - 14); // 1 - } + uid->values[0] |= xfregs.texMtxInfo[i].projection << (18+i); // 1 - uid->values[1] = bpmem.genMode.numindstages << 2; // 3 + uid->values[1] = bpmem.genMode.numindstages; // 3 u32 indirectStagesUsed = 0; for (unsigned int i = 0; i < bpmem.genMode.numindstages; ++i) if (bpmem.tevind[i].IsActive() && bpmem.tevind[i].bt < bpmem.genMode.numindstages) @@ -145,20 +141,20 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 compo assert(indirectStagesUsed == (indirectStagesUsed & 0xF)); - uid->values[1] |= indirectStagesUsed << 5; // 4; + uid->values[1] |= indirectStagesUsed << 3; // 4; for (unsigned int i = 0; i < bpmem.genMode.numindstages; ++i) { if (indirectStagesUsed & (1 << i)) { - uid->values[1] |= (bpmem.tevindref.getTexCoord(i) < bpmem.genMode.numtexgens) << (9 + 3*i); // 1 + uid->values[1] |= (bpmem.tevindref.getTexCoord(i) < bpmem.genMode.numtexgens) << (7 + 3*i); // 1 if (bpmem.tevindref.getTexCoord(i) < bpmem.genMode.numtexgens) - uid->values[1] |= bpmem.tevindref.getTexCoord(i) << (10 + 3*i); // 2 + uid->values[1] |= bpmem.tevindref.getTexCoord(i) << (8 + 3*i); // 2 } } u32* ptr = &uid->values[2]; - for (unsigned int i = 0; i < bpmem.genMode.numtevstages+1; ++i) + for (int i = 0; i < bpmem.genMode.numtevstages+1; ++i) { StageHash(i, ptr); ptr += 4; // max: ptr = &uid->values[66] @@ -780,7 +776,6 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType WRITE(p, "void main()\n{\n"); } - char* pmainstart = p; int Pretest = AlphaPreTest(); if(Pretest >= 0 && !DepthTextureEnable) { |
