summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shader_query.cpp
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2015-05-07 08:07:30 +0300
committerTapani Pälli <[email protected]>2015-05-11 08:14:51 +0300
commitabf3fefa1aa734844e0ca8e95e8c3a501909aa33 (patch)
treece2f76ae620eb7f9a62c5aecfe151f630fb03941 /src/mesa/main/shader_query.cpp
parent4a8cd2799c2467b9916dd0ba672f05a394aa9b9f (diff)
mesa: use _mesa_has_compute_shaders instead of extension check
This was really the original purpose, for enabling the path for ES3.1 tests without the extension being set. Set also fallthrough comment for Coverity (caught by Matt). v2: .. and test the right way, not wrong one (Ilia Mirkin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r--src/mesa/main/shader_query.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 6e46553724b..3445f89a356 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -28,6 +28,7 @@
* \author Ian Romanick <[email protected]>
*/
+#include "main/context.h"
#include "main/core.h"
#include "glsl_symbol_table.h"
#include "ir.h"
@@ -986,8 +987,9 @@ _mesa_program_resource_prop(struct gl_shader_program *shProg,
case GL_ACTIVE_VARIABLES:
return get_buffer_property(shProg, res, prop, val, caller);
case GL_REFERENCED_BY_COMPUTE_SHADER:
- if (!ctx->Extensions.ARB_compute_shader)
+ if (!_mesa_has_compute_shaders(ctx))
goto invalid_enum;
+ /* fallthrough */
case GL_REFERENCED_BY_VERTEX_SHADER:
case GL_REFERENCED_BY_GEOMETRY_SHADER:
case GL_REFERENCED_BY_FRAGMENT_SHADER: