Commit 7d234da6 authored by Emma Anholt's avatar Emma Anholt Committed by Marge Bot
Browse files

freedreno: Fix YUV sampler regression.

We have to keep sampler uniforms around for later YUV lowering, and we
only need to remove uniforms that take up storage space.  Code comes from
radeonsi.

Closes: #4644.
Fixes: de17b4aa ("freedreno: Remove uniform variables after finalizing NIR.")
Part-of: <mesa/mesa!10246>
parent 1bccefb3
......@@ -337,7 +337,17 @@ ir3_finalize_nir(struct ir3_compiler *compiler, nir_shader *s)
debug_printf("----------------------\n");
}
/* st_program.c's parameter list optimization requires that future nir
* variants don't reallocate the uniform storage, so we have to remove
* uniforms that occupy storage. But we don't want to remove samplers,
* because they're needed for YUV variant lowering.
*/
nir_foreach_uniform_variable_safe(var, s) {
if (var->data.mode == nir_var_uniform &&
(glsl_type_get_image_count(var->type) ||
glsl_type_get_sampler_count(var->type)))
continue;
exec_node_remove(&var->node);
}
nir_validate_shader(s, "after uniform var removal");
......
......@@ -225,15 +225,12 @@ spec@ext_framebuffer_object@getteximage-formats init-by-clear-and-render,Fail
spec@ext_framebuffer_object@getteximage-formats init-by-rendering,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-export,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_ayuv,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_nv12,Crash
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p010,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p012,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p016,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_uyvy,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_xyuv,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuv420,Crash
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuyv,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvu420,Crash
spec@ext_packed_depth_stencil@fbo-clear-formats,Fail
spec@ext_packed_depth_stencil@fbo-clear-formats stencil,Fail
spec@ext_packed_depth_stencil@fbo-depth-gl_depth24_stencil8-blit,Fail
......
......@@ -273,14 +273,7 @@ spec@ext_framebuffer_object@getteximage-formats init-by-clear-and-render,Fail
spec@ext_framebuffer_object@getteximage-formats init-by-rendering,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-export,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_ayuv,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p010,Crash
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p012,Crash
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p016,Crash
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_uyvy,Crash
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_xyuv,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuv420,Crash
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuyv,Crash
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvu420,Crash
spec@ext_packed_depth_stencil@texwrap formats bordercolor,Fail
spec@ext_packed_depth_stencil@texwrap formats bordercolor-swizzled,Fail
spec@ext_packed_float@query-rgba-signed-components,Fail
......
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