Fix some test failures by consistently stripping gl_PerVertex_Var prefix

This commit is contained in:
baldurk
2023-11-17 18:47:47 +00:00
parent 48222bf5bb
commit 0d9ea809dd
16 changed files with 88 additions and 80 deletions
@@ -966,6 +966,8 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *api, const ShaderStage s
sourceVar.columns = var.columns;
sourceVar.signatureIndex = sigNames.indexOf(debugVarName);
StripCommonGLPrefixes(sourceVar.name);
for(uint32_t x = 0; x < uint32_t(var.rows) * var.columns; x++)
sourceVar.variables.push_back(DebugVariableReference(
isInput ? DebugVariableType::Input : DebugVariableType::Variable, debugVarName, x));
@@ -30,6 +30,24 @@
#include "spirv_editor.h"
#include "spirv_op_helpers.h"
void StripCommonGLPrefixes(rdcstr &name)
{
// remove certain common prefixes that generate only useless noise from GLSL. This is mostly
// irrelevant for the majority of cases but is primarily relevant for single-component outputs
// like gl_PointSize or gl_CullPrimitiveEXT
const rdcstr prefixesToRemove[] = {
"gl_PerVertex.", "gl_PerVertex_var.", "gl_MeshVerticesEXT.",
"gl_MeshVerticesEXT_var.", "gl_MeshPrimitivesEXT.", "gl_MeshPrimitivesEXT_var.",
};
for(const rdcstr &prefix : prefixesToRemove)
{
int offs = name.find(prefix);
if(offs == 0)
name.erase(0, prefix.length());
}
}
void FillSpecConstantVariables(ResourceId shader, const SPIRVPatchData &patchData,
const rdcarray<ShaderConstant> &invars,
rdcarray<ShaderVariable> &outvars,
@@ -2210,21 +2228,7 @@ void Reflector::AddSignatureParameter(const bool isInput, const ShaderStage stag
if(isArray)
n += StringFormat::Fmt("[%u]", a);
// remove certain common prefixes that generate only useless noise from GLSL. This is mostly
// irrelevant for the majority of cases but is primarily relevant for single-component outputs
// like gl_PointSize or gl_CullPrimitiveEXT
const rdcstr prefixesToRemove[] = {
"gl_PerVertex.", "gl_PerVertex_var.", "gl_MeshVerticesEXT.",
"gl_MeshVerticesEXT_var.", "gl_MeshPrimitivesEXT.", "gl_MeshPrimitivesEXT_var.",
};
for(const rdcstr &prefix : prefixesToRemove)
{
int offs = n.find(prefix);
if(offs == 0)
n.erase(0, prefix.length());
}
StripCommonGLPrefixes(n);
sig.varName = n;
@@ -157,6 +157,8 @@ private:
}; // namespace rdcspv
void StripCommonGLPrefixes(rdcstr &name);
void FillSpecConstantVariables(ResourceId shader, const SPIRVPatchData &patchData,
const rdcarray<ShaderConstant> &invars,
rdcarray<ShaderVariable> &outvars,
@@ -16,7 +16,7 @@ class VK_Dedicated_Allocation(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
@@ -24,7 +24,7 @@ class VK_Dedicated_Allocation(rdtest.TestCase):
1: {
'vtx': 1,
'idx': 1,
'gl_PerVertex_var.gl_Position': [0.0, -0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 1.0, 0.0, 1.0],
@@ -32,7 +32,7 @@ class VK_Dedicated_Allocation(rdtest.TestCase):
2: {
'vtx': 2,
'idx': 2,
'gl_PerVertex_var.gl_Position': [0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [1.0, 0.0, 0.0, 1.0],
@@ -23,7 +23,7 @@ class VK_Dynamic_Rendering(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-0.5, 0.5, 0.0, 1.0],
'gl_Position': [-0.5, 0.5, 0.0, 1.0],
'gout.pos': [-0.5, 0.5, 0.0, 1.0],
'gout.col': [0.0, 1.0, 0.0, 1.0],
'gout.uv': [0.0, 0.0, 0.0, 1.0],
@@ -31,7 +31,7 @@ class VK_Dynamic_Rendering(rdtest.TestCase):
1: {
'vtx': 1,
'idx': 1,
'gl_PerVertex_var.gl_Position': [0.0, -0.5, 0.0, 1.0],
'gl_Position': [0.0, -0.5, 0.0, 1.0],
'gout.pos': [0.0, -0.5, 0.0, 1.0],
'gout.col': [0.0, 1.0, 0.0, 1.0],
'gout.uv': [0.0, 1.0, 0.0, 1.0],
@@ -39,7 +39,7 @@ class VK_Dynamic_Rendering(rdtest.TestCase):
2: {
'vtx': 2,
'idx': 2,
'gl_PerVertex_var.gl_Position': [0.5, 0.5, 0.0, 1.0],
'gl_Position': [0.5, 0.5, 0.0, 1.0],
'gout.pos': [0.5, 0.5, 0.0, 1.0],
'gout.col': [0.0, 1.0, 0.0, 1.0],
'gout.uv': [1.0, 0.0, 0.0, 1.0],
@@ -49,28 +49,28 @@ class VK_Extended_Dynamic_State(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-0.75, 0.5, 0.4, 1.0],
'gl_Position': [-0.75, 0.5, 0.4, 1.0],
'vertOut.col': [0.0, 1.0, 0.0, 1.0],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
},
1: {
'vtx': 1,
'idx': 1,
'gl_PerVertex_var.gl_Position': [-0.25, -0.5, 0.4, 1.0],
'gl_Position': [-0.25, -0.5, 0.4, 1.0],
'vertOut.col': [0.0, 1.0, 0.0, 1.0],
'vertOut.uv': [0.0, 1.0, 0.0, 1.0],
},
2: {
'vtx': 2,
'idx': 2,
'gl_PerVertex_var.gl_Position': [0.25, 0.5, 0.4, 1.0],
'gl_Position': [0.25, 0.5, 0.4, 1.0],
'vertOut.col': [0.0, 1.0, 0.0, 1.0],
'vertOut.uv': [1.0, 0.0, 0.0, 1.0],
},
5: {
'vtx': 5,
'idx': 5,
'gl_PerVertex_var.gl_Position': [0.75, 0.5, 0.6, 1.0],
'gl_Position': [0.75, 0.5, 0.6, 1.0],
'vertOut.col': [0.0, 0.0, 1.0, 1.0],
'vertOut.uv': [1.0, 0.0, 0.0, 1.0],
},
+3 -3
View File
@@ -37,7 +37,7 @@ class VK_Frame0(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
@@ -45,7 +45,7 @@ class VK_Frame0(rdtest.TestCase):
1: {
'vtx': 1,
'idx': 1,
'gl_PerVertex_var.gl_Position': [0.0, -0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 1.0, 0.0, 1.0],
@@ -53,7 +53,7 @@ class VK_Frame0(rdtest.TestCase):
2: {
'vtx': 2,
'idx': 2,
'gl_PerVertex_var.gl_Position': [0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [1.0, 0.0, 0.0, 1.0],
@@ -26,7 +26,7 @@ class VK_Graphics_Pipeline(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
@@ -34,7 +34,7 @@ class VK_Graphics_Pipeline(rdtest.TestCase):
1: {
'vtx': 1,
'idx': 1,
'gl_PerVertex_var.gl_Position': [0.0, -0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 1.0, 0.0, 1.0],
@@ -42,7 +42,7 @@ class VK_Graphics_Pipeline(rdtest.TestCase):
2: {
'vtx': 2,
'idx': 2,
'gl_PerVertex_var.gl_Position': [0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [1.0, 0.0, 0.0, 1.0],
+24 -24
View File
@@ -219,9 +219,9 @@ class VK_Indirect(rdtest.TestCase):
postvs_data = self.get_postvs(action, rd.MeshDataStage.VSOut)
postvs_ref = {
0: {'vtx': 0, 'idx': 0, 'gl_PerVertex_var.gl_Position': [-0.8, -0.5, 0.0, 1.0]},
1: {'vtx': 1, 'idx': 1, 'gl_PerVertex_var.gl_Position': [-0.7, -0.8, 0.0, 1.0]},
2: {'vtx': 2, 'idx': 2, 'gl_PerVertex_var.gl_Position': [-0.6, -0.5, 0.0, 1.0]},
0: {'vtx': 0, 'idx': 0, 'gl_Position': [-0.8, -0.5, 0.0, 1.0]},
1: {'vtx': 1, 'idx': 1, 'gl_Position': [-0.7, -0.8, 0.0, 1.0]},
2: {'vtx': 2, 'idx': 2, 'gl_Position': [-0.6, -0.5, 0.0, 1.0]},
}
self.check_mesh_data(postvs_ref, postvs_data)
@@ -246,9 +246,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': 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]},
0: {'vtx': 0, 'idx': 6, 'gl_Position': [-0.6, -0.5, 0.0, 1.0]},
1: {'vtx': 1, 'idx': 7, 'gl_Position': [-0.5, -0.8, 0.0, 1.0]},
2: {'vtx': 2, 'idx': 8, 'gl_Position': [-0.4, -0.5, 0.0, 1.0]},
}
self.check_mesh_data(postvs_ref, postvs_data)
@@ -269,13 +269,13 @@ class VK_Indirect(rdtest.TestCase):
postvs_data = self.get_postvs(action, rd.MeshDataStage.VSOut)
postvs_ref = {
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]},
0: {'vtx': 0, 'idx': 9, 'gl_Position': [-0.4, -0.5, 0.0, 1.0]},
1: {'vtx': 1, 'idx': 10, 'gl_Position': [-0.3, -0.8, 0.0, 1.0]},
2: {'vtx': 2, 'idx': 11, 'gl_Position': [-0.2, -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]},
3: {'vtx': 3, 'idx': 12, 'gl_Position': [-0.1, -0.5, 0.0, 1.0]},
4: {'vtx': 4, 'idx': 13, 'gl_Position': [ 0.0, -0.8, 0.0, 1.0]},
5: {'vtx': 5, 'idx': 14, 'gl_Position': [ 0.1, -0.8, 0.0, 1.0]},
}
self.check_mesh_data(postvs_ref, postvs_data)
@@ -327,9 +327,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.8, 0.5, 0.0, 1.0]},
1: {'vtx': 1, 'idx': 1, 'gl_PerVertex_var.gl_Position': [-0.7, 0.2, 0.0, 1.0]},
2: {'vtx': 2, 'idx': 2, 'gl_PerVertex_var.gl_Position': [-0.6, 0.5, 0.0, 1.0]},
0: {'vtx': 0, 'idx': 0, 'gl_Position': [-0.8, 0.5, 0.0, 1.0]},
1: {'vtx': 1, 'idx': 1, 'gl_Position': [-0.7, 0.2, 0.0, 1.0]},
2: {'vtx': 2, 'idx': 2, 'gl_Position': [-0.6, 0.5, 0.0, 1.0]},
}
self.check_mesh_data(postvs_ref, postvs_data)
@@ -357,9 +357,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': 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]},
0: {'vtx': 0, 'idx': 15, 'gl_Position': [-0.6, 0.5, 0.0, 1.0]},
1: {'vtx': 1, 'idx': 16, 'gl_Position': [-0.5, 0.2, 0.0, 1.0]},
2: {'vtx': 2, 'idx': 17, 'gl_Position': [-0.4, 0.5, 0.0, 1.0]},
}
self.check_mesh_data(postvs_ref, postvs_data)
@@ -397,13 +397,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': 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]},
0: {'vtx': 0, 'idx': 18, 'gl_Position': [-0.4, 0.5, 0.0, 1.0]},
1: {'vtx': 1, 'idx': 19, 'gl_Position': [-0.3, 0.2, 0.0, 1.0]},
2: {'vtx': 2, 'idx': 20, 'gl_Position': [-0.2, 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]},
3: {'vtx': 3, 'idx': 21, 'gl_Position': [-0.1, 0.5, 0.0, 1.0]},
4: {'vtx': 4, 'idx': 22, 'gl_Position': [ 0.0, 0.2, 0.0, 1.0]},
5: {'vtx': 5, 'idx': 23, 'gl_Position': [ 0.1, 0.2, 0.0, 1.0]},
}
self.check_mesh_data(postvs_ref, postvs_data)
+3 -3
View File
@@ -26,14 +26,14 @@ class VK_Int8_IBuffer(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-0.8, -0.2, 0.0, 1.0],
'gl_Position': [-0.8, -0.2, 0.0, 1.0],
'vertOut.col': [0.0, 1.0, 0.0, 1.0],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
},
4: {
'vtx': 4,
'idx': 4,
'gl_PerVertex_var.gl_Position': [0.0, -0.2, 0.0, 1.0],
'gl_Position': [0.0, -0.2, 0.0, 1.0],
'vertOut.col': [0.0, 1.0, 0.0, 1.0],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
},
@@ -43,7 +43,7 @@ class VK_Int8_IBuffer(rdtest.TestCase):
9: {
'vtx': 9,
'idx': 8,
'gl_PerVertex_var.gl_Position': [-0.8, 0.7, 0.0, 1.0],
'gl_Position': [-0.8, 0.7, 0.0, 1.0],
'vertOut.col': [0.0, 0.0, 1.0, 1.0],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
},
+3 -3
View File
@@ -42,7 +42,7 @@ class VK_Large_Buffer(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
@@ -50,7 +50,7 @@ class VK_Large_Buffer(rdtest.TestCase):
1: {
'vtx': 1,
'idx': 1000000,
'gl_PerVertex_var.gl_Position': [0.0, -0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 1.0, 0.0, 1.0],
@@ -58,7 +58,7 @@ class VK_Large_Buffer(rdtest.TestCase):
2: {
'vtx': 2,
'idx': 2345678,
'gl_PerVertex_var.gl_Position': [0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [1.0, 0.0, 0.0, 1.0],
+4 -4
View File
@@ -24,25 +24,25 @@ class VK_Mesh_Zoo(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [0.8, 0.8, 0.0, 1.0],
'gl_Position': [0.8, 0.8, 0.0, 1.0],
'uv1': [0.5, 0.5],
},
1: {
'vtx': 1,
'idx': 1,
'gl_PerVertex_var.gl_Position': [0.8, 0.9, 0.0, 1.0],
'gl_Position': [0.8, 0.9, 0.0, 1.0],
'uv1': [0.6, 0.6],
},
2: {
'vtx': 2,
'idx': 2,
'gl_PerVertex_var.gl_Position': [0.9, 0.8, 0.0, 1.0],
'gl_Position': [0.9, 0.8, 0.0, 1.0],
'uv1': [0.7, 0.7],
},
3: {
'vtx': 3,
'idx': 3,
'gl_PerVertex_var.gl_Position': [0.9, 0.9, 0.0, 1.0],
'gl_Position': [0.9, 0.9, 0.0, 1.0],
'uv1': [0.8, 0.8],
},
}
@@ -40,19 +40,19 @@ class VK_Misaligned_Dirty(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-val, val, val, 1.0],
'gl_Position': [-val, val, val, 1.0],
'vertOut.col': [0.0, 1.0, 0.0, 1.0],
},
1: {
'vtx': 1,
'idx': 1,
'gl_PerVertex_var.gl_Position': [0.0, -val, val, 1.0],
'gl_Position': [0.0, -val, val, 1.0],
'vertOut.col': [0.0, 1.0, 0.0, 1.0],
},
2: {
'vtx': 2,
'idx': 2,
'gl_PerVertex_var.gl_Position': [val, val, val, 1.0],
'gl_Position': [val, val, val, 1.0],
'vertOut.col': [0.0, 1.0, 0.0, 1.0],
},
}
+3 -3
View File
@@ -48,7 +48,7 @@ class VK_Robustness2(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-0.5, 0.5, 0.0, 1.0],
'gl_Position': [-0.5, 0.5, 0.0, 1.0],
'vertOut.pos': [-0.5, 0.5, 0.0, 1.0],
'vertOut.col': [0.0, 0.0, 0.0, 0.0],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
@@ -56,7 +56,7 @@ class VK_Robustness2(rdtest.TestCase):
1: {
'vtx': 1,
'idx': 1,
'gl_PerVertex_var.gl_Position': [0.0, -0.5, 0.0, 1.0],
'gl_Position': [0.0, -0.5, 0.0, 1.0],
'vertOut.pos': [0.0, -0.5, 0.0, 1.0],
'vertOut.col': [0.0, 0.0, 0.0, 0.0],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
@@ -64,7 +64,7 @@ class VK_Robustness2(rdtest.TestCase):
2: {
'vtx': 2,
'idx': 2,
'gl_PerVertex_var.gl_Position': [0.5, 0.5, 0.0, 1.0],
'gl_Position': [0.5, 0.5, 0.0, 1.0],
'vertOut.pos': [0.5, 0.5, 0.0, 1.0],
'vertOut.col': [0.0, 0.0, 0.0, 0.0],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
+3 -3
View File
@@ -24,7 +24,7 @@ class VK_Simple_Triangle(rdtest.TestCase):
0: {
'vtx': 0,
'idx': 0,
'gl_PerVertex_var.gl_Position': [-0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 0.0, 0.0, 1.0],
@@ -32,7 +32,7 @@ class VK_Simple_Triangle(rdtest.TestCase):
1: {
'vtx': 1,
'idx': 1,
'gl_PerVertex_var.gl_Position': [0.0, -0.5, 0.0, 1.0],
'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],
'vertOut.uv': [0.0, 1.0, 0.0, 1.0],
@@ -40,7 +40,7 @@ class VK_Simple_Triangle(rdtest.TestCase):
2: {
'vtx': 2,
'idx': 2,
'gl_PerVertex_var.gl_Position': [0.5, 0.5, 0.0, 1.0],
'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],
'vertOut.uv': [1.0, 0.0, 0.0, 1.0],
+6 -6
View File
@@ -93,14 +93,14 @@ class VK_Vertex_Attr_Zoo(rdtest.TestCase):
vsout_ref = copy.deepcopy(out_ref)
gsout_ref = out_ref
vsout_ref[0]['gl_PerVertex_var.gl_Position'] = [-0.5, 0.5, 0.0, 1.0]
gsout_ref[0]['gl_PerVertex_var.gl_Position'] = [0.5, -0.5, 0.4, 1.2]
vsout_ref[0]['gl_Position'] = [-0.5, 0.5, 0.0, 1.0]
gsout_ref[0]['gl_Position'] = [0.5, -0.5, 0.4, 1.2]
vsout_ref[1]['gl_PerVertex_var.gl_Position'] = [0.0, -0.5, 0.0, 1.0]
gsout_ref[1]['gl_PerVertex_var.gl_Position'] = [-0.5, 0.0, 0.4, 1.2]
vsout_ref[1]['gl_Position'] = [0.0, -0.5, 0.0, 1.0]
gsout_ref[1]['gl_Position'] = [-0.5, 0.0, 0.4, 1.2]
vsout_ref[2]['gl_PerVertex_var.gl_Position'] = [0.5, 0.5, 0.0, 1.0]
gsout_ref[2]['gl_PerVertex_var.gl_Position'] = [0.5, 0.5, 0.4, 1.2]
vsout_ref[2]['gl_Position'] = [0.5, 0.5, 0.0, 1.0]
gsout_ref[2]['gl_Position'] = [0.5, 0.5, 0.4, 1.2]
self.check_mesh_data(in_ref, self.get_vsin(action))
rdtest.log.success("Vertex input data is as expected")