From 01ca19765512c443549cff7ea0a6b8413cb5472c Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 13 May 2020 10:44:55 +0100 Subject: [PATCH] Fix tests broken with updated non-remapped postvs index data --- util/test/tests/D3D11/D3D11_Large_Buffer.py | 4 +-- util/test/tests/D3D12/D3D12_Large_Buffer.py | 4 +-- util/test/tests/GL/GL_Large_Buffer.py | 4 +-- util/test/tests/GL/GL_Mesh_Zoo.py | 3 +- util/test/tests/Vulkan/VK_Indirect.py | 36 ++++++++++----------- util/test/tests/Vulkan/VK_Large_Buffer.py | 4 +-- 6 files changed, 28 insertions(+), 27 deletions(-) diff --git a/util/test/tests/D3D11/D3D11_Large_Buffer.py b/util/test/tests/D3D11/D3D11_Large_Buffer.py index 79b47aa11..2422a493f 100644 --- a/util/test/tests/D3D11/D3D11_Large_Buffer.py +++ b/util/test/tests/D3D11/D3D11_Large_Buffer.py @@ -48,14 +48,14 @@ class D3D11_Large_Buffer(rdtest.TestCase): }, 1: { 'vtx': 1, - 'idx': 1, + 'idx': 1000000, 'SV_POSITION': [0.0, 0.5, 0.0, 1.0], 'COLOR': [0.0, 1.0, 0.0, 1.0], 'TEXCOORD': [0.0, 1.0], }, 2: { 'vtx': 2, - 'idx': 2, + 'idx': 2345678, 'SV_POSITION': [0.5, -0.5, 0.0, 1.0], 'COLOR': [0.0, 1.0, 0.0, 1.0], 'TEXCOORD': [1.0, 0.0], diff --git a/util/test/tests/D3D12/D3D12_Large_Buffer.py b/util/test/tests/D3D12/D3D12_Large_Buffer.py index 3196f780d..6a54a96c4 100644 --- a/util/test/tests/D3D12/D3D12_Large_Buffer.py +++ b/util/test/tests/D3D12/D3D12_Large_Buffer.py @@ -48,14 +48,14 @@ class D3D12_Large_Buffer(rdtest.TestCase): }, 1: { 'vtx': 1, - 'idx': 1, + 'idx': 1000000, 'SV_POSITION': [0.0, 0.5, 0.0, 1.0], 'COLOR': [0.0, 1.0, 0.0, 1.0], 'TEXCOORD': [0.0, 1.0], }, 2: { 'vtx': 2, - 'idx': 2, + 'idx': 2345678, 'SV_POSITION': [0.5, -0.5, 0.0, 1.0], 'COLOR': [0.0, 1.0, 0.0, 1.0], 'TEXCOORD': [1.0, 0.0], diff --git a/util/test/tests/GL/GL_Large_Buffer.py b/util/test/tests/GL/GL_Large_Buffer.py index b01ab19fb..74e153926 100644 --- a/util/test/tests/GL/GL_Large_Buffer.py +++ b/util/test/tests/GL/GL_Large_Buffer.py @@ -50,7 +50,7 @@ class GL_Large_Buffer(rdtest.TestCase): }, 1: { 'vtx': 1, - 'idx': 1, + 'idx': 1000000, '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], @@ -58,7 +58,7 @@ class GL_Large_Buffer(rdtest.TestCase): }, 2: { 'vtx': 2, - 'idx': 2, + 'idx': 2345678, '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], diff --git a/util/test/tests/GL/GL_Mesh_Zoo.py b/util/test/tests/GL/GL_Mesh_Zoo.py index 2bd077c39..4c0f5051b 100644 --- a/util/test/tests/GL/GL_Mesh_Zoo.py +++ b/util/test/tests/GL/GL_Mesh_Zoo.py @@ -13,7 +13,8 @@ class GL_Mesh_Zoo(rdtest.TestCase): self.zoo_helper.check_capture(self.capture_filename, self.controller) # Test GL-only thing with geometry shader only and completely no-op vertex shader - self.controller.SetFrameEvent(self.zoo_helper.find_draw("Geom Only").next.eventId, False) + draw = self.zoo_helper.find_draw("Geom Only").next + self.controller.SetFrameEvent(draw.eventId, False) pos: rd.MeshFormat = self.controller.GetPostVSData(0, 0, rd.MeshDataStage.VSOut) diff --git a/util/test/tests/Vulkan/VK_Indirect.py b/util/test/tests/Vulkan/VK_Indirect.py index eda06083a..18899514b 100644 --- a/util/test/tests/Vulkan/VK_Indirect.py +++ b/util/test/tests/Vulkan/VK_Indirect.py @@ -242,9 +242,9 @@ class VK_Indirect(rdtest.TestCase): # These indices are the *output* indices, which have been rebased/remapped, so are not the same as the input # indices postvs_ref = { - 0: {'vtx': 0, 'idx': 0, 'gl_PerVertex_var.gl_Position': [-0.6, -0.5, 0.0, 1.0]}, - 1: {'vtx': 1, 'idx': 1, 'gl_PerVertex_var.gl_Position': [-0.5, -0.8, 0.0, 1.0]}, - 2: {'vtx': 2, 'idx': 2, 'gl_PerVertex_var.gl_Position': [-0.4, -0.5, 0.0, 1.0]}, + 0: {'vtx': 0, 'idx': 6, 'gl_PerVertex_var.gl_Position': [-0.6, -0.5, 0.0, 1.0]}, + 1: {'vtx': 1, 'idx': 7, 'gl_PerVertex_var.gl_Position': [-0.5, -0.8, 0.0, 1.0]}, + 2: {'vtx': 2, 'idx': 8, 'gl_PerVertex_var.gl_Position': [-0.4, -0.5, 0.0, 1.0]}, } self.check_mesh_data(postvs_ref, postvs_data) @@ -265,13 +265,13 @@ class VK_Indirect(rdtest.TestCase): postvs_data = self.get_postvs(draw, rd.MeshDataStage.VSOut) postvs_ref = { - 0: {'vtx': 0, 'idx': 0, 'gl_PerVertex_var.gl_Position': [-0.4, -0.5, 0.0, 1.0]}, - 1: {'vtx': 1, 'idx': 1, 'gl_PerVertex_var.gl_Position': [-0.3, -0.8, 0.0, 1.0]}, - 2: {'vtx': 2, 'idx': 2, 'gl_PerVertex_var.gl_Position': [-0.2, -0.8, 0.0, 1.0]}, + 0: {'vtx': 0, 'idx': 9, 'gl_PerVertex_var.gl_Position': [-0.4, -0.5, 0.0, 1.0]}, + 1: {'vtx': 1, 'idx': 10, 'gl_PerVertex_var.gl_Position': [-0.3, -0.8, 0.0, 1.0]}, + 2: {'vtx': 2, 'idx': 11, 'gl_PerVertex_var.gl_Position': [-0.2, -0.8, 0.0, 1.0]}, - 3: {'vtx': 3, 'idx': 3, 'gl_PerVertex_var.gl_Position': [-0.1, -0.5, 0.0, 1.0]}, - 4: {'vtx': 4, 'idx': 4, 'gl_PerVertex_var.gl_Position': [ 0.0, -0.8, 0.0, 1.0]}, - 5: {'vtx': 5, 'idx': 5, 'gl_PerVertex_var.gl_Position': [ 0.1, -0.8, 0.0, 1.0]}, + 3: {'vtx': 3, 'idx': 12, 'gl_PerVertex_var.gl_Position': [-0.1, -0.5, 0.0, 1.0]}, + 4: {'vtx': 4, 'idx': 13, 'gl_PerVertex_var.gl_Position': [ 0.0, -0.8, 0.0, 1.0]}, + 5: {'vtx': 5, 'idx': 14, 'gl_PerVertex_var.gl_Position': [ 0.1, -0.8, 0.0, 1.0]}, } self.check_mesh_data(postvs_ref, postvs_data) @@ -353,9 +353,9 @@ class VK_Indirect(rdtest.TestCase): # These indices are the *output* indices, which have been rebased/remapped, so are not the same as the input # indices postvs_ref = { - 0: {'vtx': 0, 'idx': 0, 'gl_PerVertex_var.gl_Position': [-0.6, 0.5, 0.0, 1.0]}, - 1: {'vtx': 1, 'idx': 1, 'gl_PerVertex_var.gl_Position': [-0.5, 0.2, 0.0, 1.0]}, - 2: {'vtx': 2, 'idx': 2, 'gl_PerVertex_var.gl_Position': [-0.4, 0.5, 0.0, 1.0]}, + 0: {'vtx': 0, 'idx': 15, 'gl_PerVertex_var.gl_Position': [-0.6, 0.5, 0.0, 1.0]}, + 1: {'vtx': 1, 'idx': 16, 'gl_PerVertex_var.gl_Position': [-0.5, 0.2, 0.0, 1.0]}, + 2: {'vtx': 2, 'idx': 17, 'gl_PerVertex_var.gl_Position': [-0.4, 0.5, 0.0, 1.0]}, } self.check_mesh_data(postvs_ref, postvs_data) @@ -393,13 +393,13 @@ class VK_Indirect(rdtest.TestCase): # These indices are the *output* indices, which have been rebased/remapped, so are not the same as the input # indices postvs_ref = { - 0: {'vtx': 0, 'idx': 0, 'gl_PerVertex_var.gl_Position': [-0.4, 0.5, 0.0, 1.0]}, - 1: {'vtx': 1, 'idx': 1, 'gl_PerVertex_var.gl_Position': [-0.3, 0.2, 0.0, 1.0]}, - 2: {'vtx': 2, 'idx': 2, 'gl_PerVertex_var.gl_Position': [-0.2, 0.2, 0.0, 1.0]}, + 0: {'vtx': 0, 'idx': 18, 'gl_PerVertex_var.gl_Position': [-0.4, 0.5, 0.0, 1.0]}, + 1: {'vtx': 1, 'idx': 19, 'gl_PerVertex_var.gl_Position': [-0.3, 0.2, 0.0, 1.0]}, + 2: {'vtx': 2, 'idx': 20, 'gl_PerVertex_var.gl_Position': [-0.2, 0.2, 0.0, 1.0]}, - 3: {'vtx': 3, 'idx': 3, 'gl_PerVertex_var.gl_Position': [-0.1, 0.5, 0.0, 1.0]}, - 4: {'vtx': 4, 'idx': 4, 'gl_PerVertex_var.gl_Position': [ 0.0, 0.2, 0.0, 1.0]}, - 5: {'vtx': 5, 'idx': 5, 'gl_PerVertex_var.gl_Position': [ 0.1, 0.2, 0.0, 1.0]}, + 3: {'vtx': 3, 'idx': 21, 'gl_PerVertex_var.gl_Position': [-0.1, 0.5, 0.0, 1.0]}, + 4: {'vtx': 4, 'idx': 22, 'gl_PerVertex_var.gl_Position': [ 0.0, 0.2, 0.0, 1.0]}, + 5: {'vtx': 5, 'idx': 23, 'gl_PerVertex_var.gl_Position': [ 0.1, 0.2, 0.0, 1.0]}, } self.check_mesh_data(postvs_ref, postvs_data) diff --git a/util/test/tests/Vulkan/VK_Large_Buffer.py b/util/test/tests/Vulkan/VK_Large_Buffer.py index 089719953..3eadc831b 100644 --- a/util/test/tests/Vulkan/VK_Large_Buffer.py +++ b/util/test/tests/Vulkan/VK_Large_Buffer.py @@ -49,7 +49,7 @@ class VK_Large_Buffer(rdtest.TestCase): }, 1: { 'vtx': 1, - 'idx': 1, + 'idx': 1000000, 'gl_PerVertex_var.gl_Position': [0.0, -0.5, 0.0, 1.0], 'vertOut.pos': [0.0, -0.5, 0.0, 1.0], 'vertOut.col': [0.0, 1.0, 0.0, 1.0], @@ -57,7 +57,7 @@ class VK_Large_Buffer(rdtest.TestCase): }, 2: { 'vtx': 2, - 'idx': 2, + 'idx': 2345678, 'gl_PerVertex_var.gl_Position': [0.5, 0.5, 0.0, 1.0], 'vertOut.pos': [0.5, 0.5, 0.0, 1.0], 'vertOut.col': [0.0, 1.0, 0.0, 1.0],