GPU/ShaderGen: Use [unroll] for resolve loops

This commit is contained in:
Connor McLaughlin
2021-07-11 13:08:25 +10:00
parent 719710ef98
commit 98af6e7228
3 changed files with 11 additions and 3 deletions

View File

@ -1052,7 +1052,7 @@ float4 LoadVRAM(int2 coords)
{
#if MULTISAMPLING
float4 value = LOAD_TEXTURE_MS(samp0, coords, 0u);
for (uint sample_index = 1u; sample_index < MULTISAMPLES; sample_index++)
FOR_UNROLL (uint sample_index = 1u; sample_index < MULTISAMPLES; sample_index++)
value += LOAD_TEXTURE_MS(samp0, coords, sample_index);
value /= float(MULTISAMPLES);
return value;
@ -1156,7 +1156,7 @@ float4 LoadVRAM(int2 coords)
{
#if MULTISAMPLING
float4 value = LOAD_TEXTURE_MS(samp0, coords, 0u);
for (uint sample_index = 1u; sample_index < MULTISAMPLES; sample_index++)
FOR_UNROLL (uint sample_index = 1u; sample_index < MULTISAMPLES; sample_index++)
value += LOAD_TEXTURE_MS(samp0, coords, sample_index);
value /= float(MULTISAMPLES);
return value;