[62/63] shader_runner/spirv: skip for GL extensions without SPIR-V equivalent

Submitted by apinheiro on Feb. 23, 2019, 11:45 p.m.

Details

Message ID 20190223234551.21111-63-apinheiro@igalia.com
State New
Headers show
Series "ARB_gl_spirv full series" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

apinheiro Feb. 23, 2019, 11:45 p.m.
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(-)

Patch hide | download patch | download mbox

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