ShaderGen: Use u8 as uid storage base type. Fixes an off-by-one error introduced in revision bdc28106ee that caused some lighting issues.

This commit is contained in:
NeoBrainX
2013-07-02 14:32:52 +02:00
parent de369dcc60
commit 1f92ccc228
4 changed files with 4 additions and 8 deletions

View File

@ -537,7 +537,7 @@ static void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_TYPE Api
#define MY_STRUCT_OFFSET(str,elem) ((u32)((u64)&(str).elem-(u64)&(str)))
bool enable_pl = g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting;
uid_data.num_values = (enable_pl) ? sizeof(uid_data)/sizeof(32) : MY_STRUCT_OFFSET(uid_data,stagehash[numStages])/sizeof(u32);
uid_data.num_values = (enable_pl) ? sizeof(uid_data) : MY_STRUCT_OFFSET(uid_data,stagehash[numStages]);
if (numStages)