[Mesa-dev] [PATCH 46/46] mesa: implement GL_IS_PER_PATCH
Marek Olšák
maraeo at gmail.com
Tue Jun 16 16:01:42 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
---
src/mesa/main/shader_query.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 8438d19..65f9400 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -1050,9 +1050,15 @@ _mesa_program_resource_prop(struct gl_shader_program *shProg,
goto invalid_operation;
*val = RESOURCE_VAR(res)->data.index;
return 1;
-
- /* GL_ARB_tessellation_shader */
case GL_IS_PER_PATCH:
+ switch (res->Type) {
+ case GL_PROGRAM_INPUT:
+ case GL_PROGRAM_OUTPUT:
+ *val = RESOURCE_VAR(res)->data.patch;
+ return 1;
+ default:
+ goto invalid_operation;
+ }
default:
goto invalid_enum;
}
--
2.1.0
More information about the mesa-dev
mailing list