Commit d91cb31a authored by José Casanova Crespo's avatar José Casanova Crespo

vc4: Enable nir_lower_io for uniforms

Altough the driver isn't expected to receive nir_var_uniform types
from GLSL this happens currently for one of the internal driver shaders.

At vc4_get_yuv_fs at vc4_blit.c there is a "stride" nir_var_uniform
variable that needs to be lowered so the shader can be compiled.

This regression was affecting several piglit tests under
spec/ext_image_dma_buf_import and at least MythTV application.

Fixes: 96d99f2e ("vc4: Only call nir_lower_io on shader_in/out")
Closes: #3536Reviewed-by: Eric Anholt's avatarEric Anholt <>
Tested-by: Piotr Oniszczuk's avatarPiotr Oniszczuk <>
Part-of: <!7160>
parent 3e877ca2
Pipeline #214400 waiting for manual action with stages
......@@ -2474,7 +2474,8 @@ vc4_shader_state_create(struct pipe_context *pctx,
if (s->info.stage == MESA_SHADER_VERTEX)
NIR_PASS_V(s, nir_lower_point_size, 1.0f, 0.0f);
NIR_PASS_V(s, nir_lower_io, nir_var_shader_in | nir_var_shader_out,
NIR_PASS_V(s, nir_lower_io,
nir_var_shader_in | nir_var_shader_out | nir_var_uniform,
type_size, (nir_lower_io_options)0);
NIR_PASS_V(s, nir_lower_regs_to_ssa);
Markdown is supported
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