diff options
author | Marek Olšák <[email protected]> | 2015-06-16 13:07:04 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-23 00:59:29 +0200 |
commit | df4ee8ef366c60ad41502d4e45e0347c1ef1e348 (patch) | |
tree | f7f32373317fa2acbfdb6cf04fe98ef4851d96ad | |
parent | 0af240e9401c12f4237f4a36a2474fe2cc590404 (diff) |
mesa: implement GL_IS_PER_PATCH
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/main/shader_query.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index c58d3474df7..59b9396f19b 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -1048,9 +1048,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; } |