mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
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.
This commit is contained in:
parent
0329a252bd
commit
8af2a09956
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue