Mesa (main): freedreno: Fix for multi-draw blits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 17 19:52:06 UTC 2021


Module: Mesa
Branch: main
Commit: 6ca9f4f5ca686527f7ec2fcc0051f5c5dbe1df1a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ca9f4f5ca686527f7ec2fcc0051f5c5dbe1df1a

Author: Rob Clark <robdclark at chromium.org>
Date:   Wed Jun 16 12:13:21 2021 -0700

freedreno: Fix for multi-draw blits

We have some logic to detect when u_blitter generated draws overwrite
the entire render-target, so we know we can discard anything previous.
But some blits (like multi-sample) do multiple draws.  We don't want to
discard the earlier draws from the same blit.

Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11402>

---

 .../freedreno/ci/piglit-freedreno-a530-fails.txt   | 42 ---------------
 .../freedreno/ci/piglit-freedreno-a630-fails.txt   | 62 ----------------------
 src/gallium/drivers/freedreno/freedreno_draw.c     |  2 +
 3 files changed, 2 insertions(+), 104 deletions(-)

diff --git a/src/gallium/drivers/freedreno/ci/piglit-freedreno-a530-fails.txt b/src/gallium/drivers/freedreno/ci/piglit-freedreno-a530-fails.txt
index e0c2d7d79b3..e781c9a3c17 100644
--- a/src/gallium/drivers/freedreno/ci/piglit-freedreno-a530-fails.txt
+++ b/src/gallium/drivers/freedreno/ci/piglit-freedreno-a530-fails.txt
@@ -111,9 +111,6 @@ spec at arb_depth_buffer_float@fbo-clear-formats at GL_DEPTH32F_STENCIL8,Fail
 spec at arb_depth_buffer_float@fbo-clear-formats at GL_DEPTH_COMPONENT32F,Fail
 spec at arb_depth_buffer_float@fbo-clear-formats stencil,Fail
 spec at arb_depth_buffer_float@fbo-clear-formats stencil at GL_DEPTH32F_STENCIL8,Fail
-spec at arb_depth_buffer_float@fbo-depth-gl_depth32f_stencil8-blit,Fail
-spec at arb_depth_buffer_float@fbo-depth-gl_depth32f_stencil8-copypixels,Fail
-spec at arb_depth_buffer_float@fbo-depth-gl_depth_component32f-blit,Fail
 spec at arb_depth_buffer_float@fbo-depth-gl_depth_component32f-copypixels,Fail
 spec at arb_depth_buffer_float@fbo-depthstencil-gl_depth32f_stencil8-blit,Fail
 spec at arb_depth_buffer_float@fbo-depthstencil-gl_depth32f_stencil8-copypixels,Fail
@@ -124,11 +121,8 @@ spec at arb_depth_texture@fbo-clear-formats at GL_DEPTH_COMPONENT,Fail
 spec at arb_depth_texture@fbo-clear-formats at GL_DEPTH_COMPONENT16,Fail
 spec at arb_depth_texture@fbo-clear-formats at GL_DEPTH_COMPONENT24,Fail
 spec at arb_depth_texture@fbo-clear-formats at GL_DEPTH_COMPONENT32,Fail
-spec at arb_depth_texture@fbo-depth-gl_depth_component16-blit,Fail
 spec at arb_depth_texture@fbo-depth-gl_depth_component16-copypixels,Fail
-spec at arb_depth_texture@fbo-depth-gl_depth_component24-blit,Fail
 spec at arb_depth_texture@fbo-depth-gl_depth_component24-copypixels,Fail
-spec at arb_depth_texture@fbo-depth-gl_depth_component32-blit,Fail
 spec at arb_depth_texture@fbo-depth-gl_depth_component32-copypixels,Fail
 spec at arb_direct_state_access@copytexturesubimage,Fail
 spec at arb_direct_state_access@gettextureimage-formats,Crash
@@ -149,38 +143,6 @@ spec at arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl
 spec at arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl_stencil_index8,Fail
 spec at arb_framebuffer_object@framebuffer-blit-levels draw stencil,Fail
 spec at arb_framebuffer_object@framebuffer-blit-levels read stencil,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear_to_srgb msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear_to_srgb msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear_to_srgb msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear_to_srgb msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb_to_linear msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb_to_linear msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb_to_linear msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb_to_linear msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit texture linear msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture linear msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit texture linear msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture linear msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit texture linear_to_srgb msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture linear_to_srgb msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit texture linear_to_srgb msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture linear_to_srgb msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit texture srgb msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture srgb msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit texture srgb msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture srgb msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit texture srgb_to_linear msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture srgb_to_linear msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit texture srgb_to_linear msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture srgb_to_linear msaa enabled render,Fail
 spec at arb_map_buffer_alignment@arb_map_buffer_alignment-map-invalidate-range,Fail
 spec at arb_map_buffer_range@copybuffersubdata offset=0,Fail
 spec at arb_multi_draw_indirect@gl-3.0-multidrawarrays-vertexid -indirect,Crash
@@ -282,8 +244,6 @@ spec at ext_packed_depth_stencil@fbo-clear-formats at GL_DEPTH24_STENCIL8,Fail
 spec at ext_packed_depth_stencil@fbo-clear-formats at GL_DEPTH_STENCIL,Fail
 spec at ext_packed_depth_stencil@fbo-clear-formats stencil,Fail
 spec at ext_packed_depth_stencil@fbo-clear-formats stencil at GL_DEPTH24_STENCIL8,Fail
-spec at ext_packed_depth_stencil@fbo-depth-gl_depth24_stencil8-blit,Fail
-spec at ext_packed_depth_stencil@fbo-depth-gl_depth24_stencil8-copypixels,Fail
 spec at ext_packed_depth_stencil@fbo-depthstencil-gl_depth24_stencil8-blit,Fail
 spec at ext_packed_depth_stencil@fbo-depthstencil-gl_depth24_stencil8-copypixels,Fail
 spec at ext_packed_depth_stencil@fbo-stencil-gl_depth24_stencil8-blit,Fail
@@ -404,8 +364,6 @@ spec at khr_texture_compression_astc@sliced-3d-miptree-gles srgb,Fail
 spec at khr_texture_compression_astc@sliced-3d-miptree-gles srgb at sRGB decode,Fail
 spec at khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp,Fail
 spec at khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp at sRGB decode full precision,Fail
-spec at nv_conditional_render@copyteximage,Fail
-spec at nv_conditional_render@copytexsubimage,Fail
 spec at nv_copy_depth_to_color@nv_copy_depth_to_color,Crash
 spec at nv_copy_depth_to_color@nv_copy_depth_to_color 0 0x223344ff,Crash
 spec at nv_copy_depth_to_color@nv_copy_depth_to_color 0 0x76356278,Crash
diff --git a/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt b/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt
index a9597673ce1..60ba4a3538d 100644
--- a/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt
+++ b/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt
@@ -56,38 +56,6 @@ spec at arb_direct_state_access@transformfeedback-bufferrange,Fail
 spec at arb_direct_state_access@transformfeedback-bufferrange at general test,Fail
 spec at arb_es2_compatibility@texwrap formats bordercolor-swizzled,Fail
 spec at arb_es2_compatibility@texwrap formats bordercolor-swizzled at GL_RGB565- swizzled- border color only,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear_to_srgb msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear_to_srgb msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear_to_srgb msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer linear_to_srgb msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb_to_linear msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb_to_linear msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb_to_linear msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit renderbuffer srgb_to_linear msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit texture linear msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture linear msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit texture linear msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture linear msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit texture linear_to_srgb msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture linear_to_srgb msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit texture linear_to_srgb msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture linear_to_srgb msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit texture srgb msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture srgb msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit texture srgb msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture srgb msaa enabled render,Fail
-spec at arb_framebuffer_srgb@blit texture srgb_to_linear msaa disabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture srgb_to_linear msaa disabled render,Fail
-spec at arb_framebuffer_srgb@blit texture srgb_to_linear msaa enabled clear,Fail
-spec at arb_framebuffer_srgb@blit texture srgb_to_linear msaa enabled render,Fail
 spec at arb_occlusion_query@occlusion_query_order,Fail
 spec at arb_point_sprite@arb_point_sprite-interactions 1.0,Fail
 spec at arb_program_interface_query@arb_program_interface_query-getprogramresourceindex,Fail
@@ -98,9 +66,6 @@ spec at arb_program_interface_query@arb_program_interface_query-resource-query,Fail
 spec at arb_program_interface_query@arb_program_interface_query-resource-query at GL_ATOMIC_COUNTER_BUFFER,Fail
 spec at arb_program_interface_query@arb_program_interface_query-resource-query at GL_BUFFER_VARIABLE,Fail
 spec at arb_program_interface_query@arb_program_interface_query-resource-query at GL_SHADER_STORAGE_BLOCK,Fail
-spec at arb_sample_shading@builtin-gl-sample-id 4,Fail
-spec at arb_sample_shading@builtin-gl-sample-mask 2,Fail
-spec at arb_sample_shading@builtin-gl-sample-mask 4,Fail
 spec at arb_sample_shading@samplemask 2 at 0.500000 mask_in_one,Fail
 spec at arb_sample_shading@samplemask 2 at 1.000000 mask_in_one,Fail
 spec at arb_sample_shading@samplemask 2 all at 0.500000 mask_in_one,Fail
@@ -286,7 +251,6 @@ spec at ext_framebuffer_multisample@alpha-to-coverage-dual-src-blend 2,Fail
 spec at ext_framebuffer_multisample@alpha-to-coverage-dual-src-blend 4,Fail
 spec at ext_framebuffer_multisample@alpha-to-coverage-no-draw-buffer-zero 2,Fail
 spec at ext_framebuffer_multisample@alpha-to-coverage-no-draw-buffer-zero 4,Fail
-spec at ext_framebuffer_multisample@blit-mismatched-formats,Fail
 spec at ext_framebuffer_multisample@draw-buffers-alpha-to-coverage 2,Fail
 spec at ext_framebuffer_multisample@draw-buffers-alpha-to-coverage 4,Fail
 spec at ext_framebuffer_multisample@enable-flag,Fail
@@ -298,36 +262,10 @@ spec at ext_framebuffer_multisample@interpolation 4 centroid-deriv-disabled,Fail
 spec at ext_framebuffer_multisample@interpolation 4 centroid-disabled,Fail
 spec at ext_framebuffer_multisample@interpolation 4 non-centroid-deriv-disabled,Fail
 spec at ext_framebuffer_multisample@interpolation 4 non-centroid-disabled,Fail
-spec at ext_framebuffer_multisample@multisample-blit 2 color,Fail
-spec at ext_framebuffer_multisample@multisample-blit 2 color linear,Fail
-spec at ext_framebuffer_multisample@multisample-blit 2 depth,Fail
-spec at ext_framebuffer_multisample@multisample-blit 2 stencil,Fail
-spec at ext_framebuffer_multisample@multisample-blit 4 color,Fail
-spec at ext_framebuffer_multisample@multisample-blit 4 color linear,Fail
-spec at ext_framebuffer_multisample@multisample-blit 4 depth,Fail
-spec at ext_framebuffer_multisample@multisample-blit 4 stencil,Fail
-spec at ext_framebuffer_multisample@no-color 2 depth combined,Fail
-spec at ext_framebuffer_multisample@no-color 2 depth-computed combined,Fail
-spec at ext_framebuffer_multisample@no-color 2 depth-computed single,Fail
-spec at ext_framebuffer_multisample@no-color 2 depth single,Fail
-spec at ext_framebuffer_multisample@no-color 2 stencil combined,Fail
-spec at ext_framebuffer_multisample@no-color 2 stencil single,Fail
-spec at ext_framebuffer_multisample@no-color 4 depth combined,Fail
-spec at ext_framebuffer_multisample@no-color 4 depth-computed combined,Fail
-spec at ext_framebuffer_multisample@no-color 4 depth-computed single,Fail
-spec at ext_framebuffer_multisample@no-color 4 depth single,Fail
-spec at ext_framebuffer_multisample@no-color 4 stencil combined,Fail
-spec at ext_framebuffer_multisample@no-color 4 stencil single,Fail
 spec at ext_framebuffer_multisample@sample-alpha-to-coverage 2 color,Fail
 spec at ext_framebuffer_multisample@sample-alpha-to-coverage 2 depth,Fail
 spec at ext_framebuffer_multisample@sample-alpha-to-coverage 4 color,Fail
 spec at ext_framebuffer_multisample@sample-alpha-to-coverage 4 depth,Fail
-spec at ext_framebuffer_multisample@unaligned-blit 2 color msaa,Fail
-spec at ext_framebuffer_multisample@unaligned-blit 2 depth msaa,Fail
-spec at ext_framebuffer_multisample@unaligned-blit 2 stencil msaa,Fail
-spec at ext_framebuffer_multisample@unaligned-blit 4 color msaa,Fail
-spec at ext_framebuffer_multisample@unaligned-blit 4 depth msaa,Fail
-spec at ext_framebuffer_multisample@unaligned-blit 4 stencil msaa,Fail
 spec at ext_framebuffer_object@fbo-alphatest-nocolor,Fail
 spec at ext_framebuffer_object@fbo-alphatest-nocolor-ff,Fail
 spec at ext_framebuffer_object@fbo-blending-format-quirks,Fail
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c
index 4b8c33b0679..9065b032082 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -347,6 +347,8 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
    batch->back_blit = ctx->in_shadow;
    batch->num_draws++;
 
+   ctx->in_discard_blit = false;
+
    /* Marking the batch as needing flush must come after the batch
     * dependency tracking (resource_read()/resource_write()), as that
     * can trigger a flush



More information about the mesa-commit mailing list