summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-10-21 21:45:49 -0700
committerJason Ekstrand <[email protected]>2015-10-21 21:50:16 -0700
commit8af2a099569f123776a9556affde23ae66a10ef5 (patch)
tree403668de42615cd568f4d9cd798e515516253f83
parent0329a252bd7418d778027c361e6a2bee7d69caab (diff)
anv/pipeline: Make the has_push_constants computation more accurate
The computation used to only look for uniforms that weren't samplers. Now it also filters out arrays of samplers.
-rw-r--r--src/vulkan/anv_pipeline.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c
index 80f8a4ff76f..f035f5b8f5e 100644
--- a/src/vulkan/anv_pipeline.c
+++ b/src/vulkan/anv_pipeline.c
@@ -354,7 +354,11 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,
bool have_push_constants = false;
nir_foreach_variable(var, &nir->uniforms) {
- if (!glsl_type_is_sampler(var->type)) {
+ const struct glsl_type *type = var->type;
+ if (glsl_type_is_array(type))
+ type = glsl_get_array_element(type);
+
+ if (!glsl_type_is_sampler(type)) {
have_push_constants = true;
break;
}