From: Mike Blumenkrantz Date: Thu, 5 Jan 2023 21:49:23 +0000 (-0500) Subject: zink: pass depth swizzle data block to shader compile X-Git-Tag: upstream/23.3.3~14163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef3205ae574ca08e4a5462316cb14b73484c864a;p=platform%2Fupstream%2Fmesa.git zink: pass depth swizzle data block to shader compile with everything now hooked up, this should fix all related test failures Part-of: --- diff --git a/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt b/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt index 6e1f0a6..b5e60f5 100644 --- a/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt @@ -258,61 +258,6 @@ spec@!opengl 1.1@linestipple,Fail # (and more) spec@!opengl 1.1@polygon-mode,Fail -# depth texturing: zink is returning intensity shadow comparisons and depth samples, regardless of depth mode. -# Check out the "splat" in zink_compiler.c around !is_new_style_shadow, and the swizzle rewrite for depth -# textures in zink_create_sampler_view(). -spec@!opengl 2.0@depth-tex-modes-glsl,Fail -spec@arb_depth_texture@depth-tex-modes,Fail -spec@arb_fragment_program_shadow@tex-shadow1d,Fail -spec@arb_fragment_program_shadow@tex-shadow2d,Fail -spec@arb_fragment_program_shadow@tex-shadow2drect,Fail -spec@arb_fragment_program_shadow@txp-shadow1d,Fail -spec@arb_fragment_program_shadow@txp-shadow2d,Fail -spec@arb_fragment_program_shadow@txp-shadow2drect,Fail -spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-01,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-03,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-07,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-08,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-cumulative,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect-01,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect-03,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect-07,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect-08,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drectproj,Fail -spec@arb_texture_rg@execution@fs-shadow2d-red-01,Fail -spec@arb_texture_rg@execution@fs-shadow2d-red-02,Fail -spec@arb_texture_rg@execution@fs-shadow2d-red-03,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-01,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-03,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-07,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-08,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-bias,Fail -spec@ext_texture_array@glsl-fs-shadow1darray,Fail -spec@ext_texture_array@glsl-fs-shadow2darray-01,Fail -spec@ext_texture_array@glsl-fs-shadow2darray-03,Fail -spec@ext_texture_array@glsl-fs-shadow2darray-07,Fail -spec@ext_texture_array@glsl-fs-shadow2darray-08,Fail -spec@ext_texture_array@glsl-fs-shadow2darray,Fail -spec@ext_texture_swizzle@depth_texture_mode_and_swizzle,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-01,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-03,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-07,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-08,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-bias,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1dproj-bias,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1dproj,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-01,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-03,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-07,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-08,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-bias,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2dproj-bias,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2dproj,Fail - spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Fail spec@!opengl 2.0@gl-2.0-edgeflag,Fail diff --git a/src/gallium/drivers/zink/ci/zink-lvp-fails.txt b/src/gallium/drivers/zink/ci/zink-lvp-fails.txt index d00fa96..6fc61a7 100644 --- a/src/gallium/drivers/zink/ci/zink-lvp-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-lvp-fails.txt @@ -79,14 +79,12 @@ spec@!opengl 1.1@polygon-mode-offset@config 6: Expected blue pixel in center,Fai spec@!opengl 1.1@polygon-mode-offset@config 6: Expected white pixel on right edge,Fail spec@!opengl 1.1@polygon-mode-offset@config 6: Expected white pixel on top edge,Fail spec@!opengl 1.2@copyteximage 3d,Fail -spec@!opengl 2.0@depth-tex-modes-glsl,Fail spec@!opengl 2.0@gl-2.0-edgeflag,Fail spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Fail spec@!opengl 2.1@pbo,Fail spec@!opengl 2.1@pbo@test_polygon_stip,Fail spec@!opengl 2.1@polygon-stipple-fs,Fail spec@!opengl es 2.0@glsl-fs-pointcoord,Fail -spec@arb_depth_texture@depth-tex-modes,Fail spec@arb_framebuffer_object@fbo-gl_pointcoord,Fail spec@arb_gpu_shader_fp64@execution@arb_gpu_shader_fp64-tf-separate,Fail spec@arb_pipeline_statistics_query@arb_pipeline_statistics_query-frag,Fail @@ -177,7 +175,6 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvu420,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-unsupported_format,Fail spec@ext_packed_float@query-rgba-signed-components,Fail -spec@ext_texture_swizzle@depth_texture_mode_and_swizzle,Fail spec@intel_performance_query@intel_performance_query-issue_2235,Fail spec@khr_texture_compression_astc@miptree-gl srgb-fp,Fail @@ -208,12 +205,6 @@ spec@!opengl 1.0@rasterpos@glsl_vs_tes_linked,Fail spec@arb_arrays_of_arrays@execution@image_store@basic-imagestore-mixed-const-non-const-uniform-index,Fail spec@arb_arrays_of_arrays@execution@image_store@basic-imagestore-mixed-const-non-const-uniform-index2,Fail spec@arb_arrays_of_arrays@execution@image_store@basic-imagestore-non-const-uniform-index,Fail -spec@arb_fragment_program_shadow@tex-shadow1d,Fail -spec@arb_fragment_program_shadow@tex-shadow2d,Fail -spec@arb_fragment_program_shadow@tex-shadow2drect,Fail -spec@arb_fragment_program_shadow@txp-shadow1d,Fail -spec@arb_fragment_program_shadow@txp-shadow2d,Fail -spec@arb_fragment_program_shadow@txp-shadow2drect,Fail spec@arb_gl_spirv@execution@xfb@vs_block_array,Fail spec@arb_gpu_shader_fp64@execution@conversion@frag-conversion-explicit-dmat2-mat2,Fail spec@arb_gpu_shader_fp64@execution@conversion@frag-conversion-explicit-dmat2x3-mat2x3,Fail @@ -255,48 +246,7 @@ spec@arb_gpu_shader_fp64@execution@conversion@vert-conversion-explicit-dvec2-vec spec@arb_gpu_shader_fp64@execution@conversion@vert-conversion-explicit-dvec3-vec3,Fail spec@arb_gpu_shader_fp64@execution@conversion@vert-conversion-explicit-dvec4-vec4,Fail spec@arb_shader_storage_buffer_object@execution@ssbo-atomiccompswap-int,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-01,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-03,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-07,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-08,Fail -spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-cumulative,Fail spec@arb_tessellation_shader@execution@gs-primitiveid-instanced,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect-01,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect-03,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect-07,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drect-08,Fail -spec@arb_texture_rectangle@glsl-fs-shadow2drectproj,Fail -spec@arb_texture_rg@execution@fs-shadow2d-red-01,Fail -spec@arb_texture_rg@execution@fs-shadow2d-red-02,Fail -spec@arb_texture_rg@execution@fs-shadow2d-red-03,Fail -spec@ext_texture_array@glsl-fs-shadow1darray,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-01,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-03,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-07,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-08,Fail -spec@ext_texture_array@glsl-fs-shadow1darray-bias,Fail -spec@ext_texture_array@glsl-fs-shadow2darray,Fail -spec@ext_texture_array@glsl-fs-shadow2darray-01,Fail -spec@ext_texture_array@glsl-fs-shadow2darray-03,Fail -spec@ext_texture_array@glsl-fs-shadow2darray-07,Fail -spec@ext_texture_array@glsl-fs-shadow2darray-08,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-01,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-03,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-07,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-08,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1d-bias,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1dproj,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow1dproj-bias,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-01,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-03,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-07,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-08,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-bias,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2dproj,Fail -spec@glsl-1.10@execution@samplers@glsl-fs-shadow2dproj-bias,Fail spec@glsl-1.50@execution@primitive-id-no-gs-quad-strip,Fail spec@glsl-1.50@execution@primitive-id-no-gs-quads,Fail spec@glsl-4.00@execution@conversion@frag-conversion-explicit-dmat2-mat2,Fail diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index fad06eb..3fb2319 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -143,7 +143,7 @@ create_shader_module_for_stage(struct zink_context *ctx, struct zink_screen *scr assert(ctx); //TODO async mod = zink_shader_tcs_compile(screen, zs, patch_vertices); } else { - mod = zink_shader_compile(screen, zs, prog->nir[stage], key, NULL); + mod = zink_shader_compile(screen, zs, prog->nir[stage], key, &ctx->di.shadow); } if (!mod) { FREE(zm); @@ -256,7 +256,7 @@ create_shader_module_for_stage_optimal(struct zink_context *ctx, struct zink_scr struct zink_tcs_key *tcs = (struct zink_tcs_key*)key; mod = zink_shader_tcs_compile(screen, zs, tcs->patch_vertices); } else { - mod = zink_shader_compile(screen, zs, prog->nir[stage], (struct zink_shader_key*)key, NULL); + mod = zink_shader_compile(screen, zs, prog->nir[stage], (struct zink_shader_key*)key, shadow_needs_shader_swizzle ? &ctx->di.shadow : NULL); } if (!mod) { FREE(zm);