diff --git a/util/test/tests/Iter_Test.py b/util/test/tests/Iter_Test.py index 43fe94f37..628b87f30 100644 --- a/util/test/tests/Iter_Test.py +++ b/util/test/tests/Iter_Test.py @@ -350,14 +350,21 @@ class Iter_Test(rdtest.TestCase): if debugged.value.u32v[idx] == 0xcccccccc: debuggedValue[idx] = lastmod.shaderOut.col.floatValue[idx] + historyValue = list(lastmod.shaderOut.col.floatValue) + + tex = self.get_texture(target) + + historyValue = historyValue[0:tex.format.compCount] + debuggedValue = debuggedValue[0:tex.format.compCount] + # Unfortunately we can't ever trust that we should get back a matching results, because some shaders # rely on undefined/inaccurate maths that we don't emulate. # So the best we can do is log an error for manual verification - is_eq, diff_amt = rdtest.value_compare_diff(lastmod.shaderOut.col.floatValue, debuggedValue, eps=5.0E-06) + is_eq, diff_amt = rdtest.value_compare_diff(historyValue, debuggedValue, eps=5.0E-06) if not is_eq: rdtest.log.error( "Debugged value {} at EID {} {},{}: {} difference. {} doesn't exactly match history shader output {}".format( - debugged.name, lastmod.eventId, x, y, diff_amt, debuggedValue, lastmod.shaderOut.col.floatValue)) + debugged.name, lastmod.eventId, x, y, diff_amt, debuggedValue, historyValue)) rdtest.log.success('Successfully debugged pixel in {} cycles, result matches'.format(cycles)) else: