Files
renderdoc/util/test/tests/GL/GL_State_Trashing.py
T
baldurk 2a0989ba9a Use local helper function for setting current EID
* This lets the testcase track the current EID and print it when a failure
  happens
2026-09-11 19:19:27 +01:00

51 lines
1.5 KiB
Python

import renderdoc as rd
import rdtest
class GL_State_Trashing(rdtest.TestCase):
demos_test_name = 'GL_State_Trashing'
def check_capture(self):
last_action = self.get_last_action()
self.set_event(last_action.eventId, True)
self.check_triangle(out=last_action.copyDestination)
action = self.find_action("Draw")
assert action is not None
self.set_event(action.eventId, False)
postvs_data = self.get_postvs(action, rd.MeshDataStage.VSOut, 0, action.numIndices)
postvs_ref: rdtest.MeshReference = {
0: {
'vtx': 0,
'idx': 0,
'gl_Position': [-0.5, -0.5, 0.0, 1.0],
'v2f_block.pos': [-0.5, -0.5, 0.0, 1.0],
'v2f_block.col': [0.0, 1.0, 0.0, 1.0],
'v2f_block.uv': [0.0, 0.0, 0.0, 1.0],
},
1: {
'vtx': 1,
'idx': 1,
'gl_Position': [0.0, 0.5, 0.0, 1.0],
'v2f_block.pos': [0.0, 0.5, 0.0, 1.0],
'v2f_block.col': [0.0, 1.0, 0.0, 1.0],
'v2f_block.uv': [0.0, 1.0, 0.0, 1.0],
},
2: {
'vtx': 2,
'idx': 2,
'gl_Position': [0.5, -0.5, 0.0, 1.0],
'v2f_block.pos': [0.5, -0.5, 0.0, 1.0],
'v2f_block.col': [0.0, 1.0, 0.0, 1.0],
'v2f_block.uv': [1.0, 0.0, 0.0, 1.0],
},
}
self.check_mesh_data(postvs_ref, postvs_data)