summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shader_query.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-03-10 11:40:37 +1100
committerTimothy Arceri <[email protected]>2016-03-31 12:52:43 +1100
commit51142e7705a5e0c28de9fc097fa7c8446ba0cffe (patch)
treea581166672d1b3227bfc50924874e4b914e2f92b /src/mesa/main/shader_query.cpp
parent047139e8a027d81141b6e0b1bc939942e873f3ce (diff)
mesa: add support to query GL_OFFSET for GL_TRANSFORM_FEEDBACK_VARYING
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r--src/mesa/main/shader_query.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 247a26d4fda..15cc49afbfc 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -1186,9 +1186,17 @@ _mesa_program_resource_prop(struct gl_shader_program *shProg,
goto invalid_operation;
}
case GL_OFFSET:
- VALIDATE_TYPE_2(GL_UNIFORM, GL_BUFFER_VARIABLE);
- *val = RESOURCE_UNI(res)->offset;
- return 1;
+ switch (res->Type) {
+ case GL_UNIFORM:
+ case GL_BUFFER_VARIABLE:
+ *val = RESOURCE_UNI(res)->offset;
+ return 1;
+ case GL_TRANSFORM_FEEDBACK_VARYING:
+ *val = RESOURCE_XFV(res)->Offset;
+ return 1;
+ default:
+ goto invalid_operation;
+ }
case GL_BLOCK_INDEX:
VALIDATE_TYPE_2(GL_UNIFORM, GL_BUFFER_VARIABLE);
*val = RESOURCE_UNI(res)->block_index;