diff --git a/src/broadcom/ci/broadcom-rpi3-fails.txt b/src/broadcom/ci/broadcom-rpi3-fails.txt index 40720d76b3e..bae3b0d97f1 100644 --- a/src/broadcom/ci/broadcom-rpi3-fails.txt +++ b/src/broadcom/ci/broadcom-rpi3-fails.txt @@ -860,7 +860,6 @@ 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.1@texsubimage-unpack,Fail spec@!opengl 1.1@texwrap 2d proj,Fail spec@!opengl 1.1@texwrap 2d proj@GL_RGBA8- NPOT- projected,Fail spec@!opengl 1.1@texwrap 2d proj@GL_RGBA8- projected,Fail @@ -959,7 +958,6 @@ spec@arb_occlusion_query@occlusion_query_conform,Fail spec@arb_occlusion_query@occlusion_query_conform@GetObjivAval_multi2,Fail spec@arb_pixel_buffer_object@fbo-pbo-readpixels-small,Fail spec@arb_pixel_buffer_object@pbo-getteximage,Fail -spec@arb_pixel_buffer_object@texsubimage-unpack pbo,Fail spec@arb_point_sprite@arb_point_sprite-mipmap,Fail spec@arb_provoking_vertex@arb-provoking-vertex-render,Fail spec@arb_sampler_objects@sampler-objects,Fail diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index efa000ccd77..1e2d9c50701 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -108,6 +108,13 @@ vc4_map_usage_prep(struct pipe_context *pctx, MESA_TRACE_FUNC(); if (usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE) { + /* Flush any pending write jobs before replacing the BO. + * The RCL reads rsc->bo at job submit time, so if we + * replace the BO first, a later flush of the pending + * job would resolve the new BO instead of the old one, + * corrupting the new data with a stale store. + */ + vc4_flush_jobs_writing_resource(vc4, prsc); if (vc4_resource_bo_alloc(rsc)) { /* If it might be bound as one of our vertex buffers, * make sure we re-emit vertex buffer state.