There are some GL extensions/features, like shader subroutines, that
doesn't have their equivalent on SPIR-V, so those tests should be
skipped on SPIR-V mode. We reuse the code that checks if a given
SPIR-V extension equivalent to a GL extension is supported, by setting
the mapping to a string that will never be the name of a SPIR-V
extension.
---
 tests/shaders/shader_runner.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 796a61178..92861c5fc 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1041,12 +1041,15 @@ parse_version_comparison(const char *line, enum 
comparison *cmp,
        version_init(v, tag, core, compat, es, full_num);
 }
 
-#define KNOWN_GL_SPV_MAPPING 3
+#define KNOWN_GL_SPV_MAPPING 6
 
 static const char* table[KNOWN_GL_SPV_MAPPING][2] =
 {{ "GL_AMD_shader_trinary_minmax", "SPV_AMD_shader_trinary_minmax"},
  {"GL_ARB_shader_group_vote", "SPV_KHR_subgroup_vote"},
- {"GL_ARB_shader_ballot", "SPV_KHR_shader_ballot"}};
+ {"GL_ARB_shader_ballot", "SPV_KHR_shader_ballot"},
+ {"GL_ARB_shader_subroutine", "not supported"},
+ {"GL_ARB_geometry_shader4", "not supported"},
+ {"GL_MESA_shader_integer_functions", "not supported"},};
 
 /*
  * Returns the SPIR-V extension that defines the equivalent
-- 
2.19.1

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to