mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Fix max index of buffer lookup component being applied to the wrong idx
* The component must be clamped (ie if the stride is 8 bytes, .z is not valid) rather than the place of the component (.xxxy is fine - even if .y is in the 'w' place)
This commit is contained in:
@@ -2601,7 +2601,7 @@ State State::GetNext(GlobalState &global, State quad[4]) const
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
uint8_t comp = op.operands[srcIdx + 1].comps[i];
|
||||
if(op.operands[srcIdx + 1].comps[i] == 0xff || i >= maxIndex)
|
||||
if(op.operands[srcIdx + 1].comps[i] == 0xff || comp >= maxIndex)
|
||||
comp = 0;
|
||||
|
||||
fetch.value.uv[i] = datau32[comp];
|
||||
@@ -2622,7 +2622,7 @@ State State::GetNext(GlobalState &global, State quad[4]) const
|
||||
{
|
||||
uint8_t comp = op.operands[0].comps[i];
|
||||
// masks must be contiguous from x, if we reach the 'end' we're done
|
||||
if(comp == 0xff || i >= maxIndex)
|
||||
if(comp == 0xff || comp >= maxIndex)
|
||||
break;
|
||||
|
||||
datau32[i] = srcOpers[srcIdx].value.uv[i];
|
||||
|
||||
Reference in New Issue
Block a user