aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-04-20 10:28:40 +1000
committerDave Airlie <[email protected]>2015-07-23 17:25:55 +1000
commit3f4f3e2d4877e1e2bda064cc323fb7b3667e12fe (patch)
tree00ba189fd96d8ff66fb3538c41f538a2048bf869 /src
parent0a18f160159b93c57943e5cb4d9d9a78a5b72996 (diff)
program: add subroutine uniform support (v1.1)
Add support for the subroutine uniform type ir->mesa.cpp v1.1: add subroutine to int to switch Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index cadbf49ca65..8f58f3edf98 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -534,6 +534,7 @@ type_size(const struct glsl_type *type)
return size;
case GLSL_TYPE_SAMPLER:
case GLSL_TYPE_IMAGE:
+ case GLSL_TYPE_SUBROUTINE:
/* Samplers take up one slot in UNIFORMS[], but they're baked in
* at link time.
*/
@@ -1342,6 +1343,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
case ir_unop_dFdx_fine:
case ir_unop_dFdy_coarse:
case ir_unop_dFdy_fine:
+ case ir_unop_subroutine_to_int:
assert(!"not supported");
break;
@@ -2451,6 +2453,7 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
break;
case GLSL_TYPE_SAMPLER:
case GLSL_TYPE_IMAGE:
+ case GLSL_TYPE_SUBROUTINE:
format = uniform_native;
columns = 1;
break;