UID Change: Fix bug with indirect stage UIDs

Bug Fix: The normal stage UIDs were randomly overwriting indirect
         stage texture map UID fields. It was possible for multiple
	 shaders with diffrent indirect texture targets to map to
	 the same UID.
         Once again, it dpesn't look like this bug was ever triggered.
This commit is contained in:
Scott Mansell
2016-01-16 13:01:04 +13:00
parent 03f2c9648d
commit e99364c7c9
2 changed files with 1 additions and 24 deletions

View File

@ -849,7 +849,6 @@ static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE
ac.b == TEVALPHAARG_RASA || ac.c == TEVALPHAARG_RASA || ac.d == TEVALPHAARG_RASA)
{
const int i = bpmem.combiners[n].alphaC.rswap;
uid_data->stagehash[n].ac |= bpmem.combiners[n].alphaC.rswap;
uid_data->stagehash[n].tevksel_swap1a = bpmem.tevksel[i * 2].swap1;
uid_data->stagehash[n].tevksel_swap2a = bpmem.tevksel[i * 2].swap2;
uid_data->stagehash[n].tevksel_swap1b = bpmem.tevksel[i * 2 + 1].swap1;
@ -875,7 +874,6 @@ static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE
}
const int i = bpmem.combiners[n].alphaC.tswap;
uid_data->stagehash[n].ac |= bpmem.combiners[n].alphaC.tswap << 2;
uid_data->stagehash[n].tevksel_swap1c = bpmem.tevksel[i * 2].swap1;
uid_data->stagehash[n].tevksel_swap2c = bpmem.tevksel[i * 2].swap2;
uid_data->stagehash[n].tevksel_swap1d = bpmem.tevksel[i * 2 + 1].swap1;
@ -884,8 +882,6 @@ static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE
uid_data->stagehash[n].tevorders_texmap = bpmem.tevorders[n / 2].getTexMap(n & 1);
const char* texswap = swapModeTable[bpmem.combiners[n].alphaC.tswap];
uid_data->SetTevindrefTexmap(i, texmap);
out.Write("\ttextemp = ");
SampleTexture<T>(out, "float2(tevcoord.xy)", texswap, texmap, ApiType);
}