Commit 99d7a90b authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋
Browse files

st/glsl_to_nir: lower indirect derefs in non-packed uniform case

the builtin lowering can't handle dynamic array indexing, so this requires
that all indirect derefs be lowered any time this pass is invoked in order
to avoid crashing

fixes #4132
parent d8f91351
Pipeline #287790 waiting for manual action with stages
......@@ -513,8 +513,10 @@ st_glsl_to_nir_post_opts(struct st_context *st, struct gl_program *prog,
* storage don't need to lower builtins.
if (!shader_program->data->spirv &&
!st->ctx->Const.PackedDriverUniformStorage) {
NIR_PASS_V(nir, nir_lower_indirect_derefs, nir_var_uniform, UINT_MAX);
NIR_PASS_V(nir, st_nir_lower_builtin);
if (!screen->get_param(screen, PIPE_CAP_NIR_ATOMICS_AS_DEREF))
NIR_PASS_V(nir, gl_nir_lower_atomics, shader_program, true);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment