Fix false shader cache hits for ray tracing shaders
authorBoris Zanin <boris.zanin@mobica.com>
Fri, 14 Feb 2020 14:34:54 +0000 (15:34 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 20 Feb 2020 10:17:09 +0000 (05:17 -0500)
Same value ("unused for GL") returned by getShaderTypeName() for
ray tracing shader types might lead to invalid shader cache hits.
Second condition required to have a false hit: two shaders of
different type have same code.

Return unique names for shader types from glu::getShaderTypeName.

Affects:
 * dEQP*

Components: framework

VK-GL-CTS issue: 2224

Change-Id: Icec4448a9f1312884990e983e0828c2fe16f83bf

framework/opengl/gluShaderUtil.cpp

index e6011e7..1016e46 100644 (file)
@@ -152,12 +152,12 @@ const char* getShaderTypeName (ShaderType shaderType)
                "tess_control",
                "tess_eval",
                "compute",
-               "unused for GL",
-               "unused for GL",
-               "unused for GL",
-               "unused for GL",
-               "unused for GL",
-               "unused for GL",
+               "ray_gen",
+               "any_hit",
+               "closest_hit",
+               "miss",
+               "intersection",
+               "callable",
        };
 
        DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(s_names) == SHADERTYPE_LAST);