mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-04-23 13:00:24 -05:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user