Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PixelShaderGen: Shader uid maintainance
  • Loading branch information
neobrain committed Jan 8, 2013
1 parent be706a3 commit 4925a28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/LinearDiskCache.h
Expand Up @@ -24,7 +24,7 @@
// Increment this every time you change shader generation code.
enum
{
LINEAR_DISKCACHE_VER = 6978
LINEAR_DISKCACHE_VER = 6979
};

// On disk format:
Expand Down
18 changes: 6 additions & 12 deletions Source/Core/VideoCommon/Src/PixelShaderGen.cpp
Expand Up @@ -151,23 +151,17 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 compo
ptr[0] |= bpmem.alpha_test.comp1 << 3; // 3
ptr[0] |= bpmem.alpha_test.logic << 6; // 2

if (alphaPreTest != AlphaTest::FAIL)
{
ptr[0] |= bpmem.fog.c_proj_fsel.fsel << 8; // 3
ptr[0] |= bpmem.ztex2.op << 11; // 2
// ptr[0] |= bpmem.zcontrol.early_ztest << 13; // 1
ptr[0] |= bpmem.zmode.testenable << 14; // 1
}

ptr[0] |= bpmem.zcontrol.early_ztest << 13; // 1
ptr[0] |= bpmem.zmode.updateenable << 15; // 1
ptr[0] |= bpmem.ztex2.op << 8; // 2
ptr[0] |= bpmem.zcontrol.early_ztest << 10; // 1
ptr[0] |= bpmem.zmode.testenable << 11; // 1
ptr[0] |= bpmem.zmode.updateenable << 12; // 1

if (dstAlphaMode != DSTALPHA_ALPHA_PASS)
{
if (bpmem.fog.c_proj_fsel.fsel != 0)
{
ptr[0] |= bpmem.fog.c_proj_fsel.proj << 16; // 1
ptr[0] |= bpmem.fogRange.Base.Enabled << 17; // 1
ptr[0] |= bpmem.fog.c_proj_fsel.proj << 13; // 1
ptr[0] |= bpmem.fogRange.Base.Enabled << 14; // 1
}
}

Expand Down

0 comments on commit 4925a28

Please sign in to comment.