freedreno/a6xx: Sync TFB BO access against prior TFB writes.

CTS draw_indirect usage of TFB output was flaking due to the TFB writes
possibly not having completed.  Since GL TFB doesn't require any other
barrier between TFB and use of the BO (as seen by the CTS not emitting any
memory barrier), we have to do it ourselves.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12457>
This commit is contained in:
Emma Anholt
2021-08-18 13:30:57 -07:00
committed by Marge Bot
parent 83e9a7fbcf
commit e6776148c1
3 changed files with 17 additions and 5 deletions
@@ -28,10 +28,6 @@ KHR-GLES31.core.gpu_shader5.fma_precision_vec4,Fail
# "Got red: 1, expected 0.00392157, at (1, 0)"
KHR-GLES31.core.compute_shader.resource-image,Fail
# "(x,y)= (0,0). Color RGBA(0,0,0,1) is different than expected RGBA(0.1,0.2,0.3,1)"
KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-arrays,Fail
KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-elements,Fail
# Lots of errors like "[279] Check failed. Received: [3,0,0,2] instead of: [5,0,0,2]"
KHR-GLES31.core.geometry_shader.layered_framebuffer.depth_support,Fail
@@ -927,6 +927,23 @@ fd6_emit_streamout(struct fd_ringbuffer *ring, struct fd6_emit *emit) assert_dt
}
}
/* Make sure that any use of our TFB outputs (indirect draw source or shader
* UBO reads) comes after the TFB output is written. From the GL 4.6 core
* spec:
*
* "Buffers should not be bound or in use for both transform feedback and
* other purposes in the GL. Specifically, if a buffer object is
* simultaneously bound to a transform feedback buffer binding point
* and elsewhere in the GL, any writes to or reads from the buffer
* generate undefined values."
*
* So we idle whenever SO buffers change. Note that this function is called
* on every draw with TFB enabled, so check the dirty flag for the buffers
* themselves.
*/
if (ctx->dirty & FD_DIRTY_STREAMOUT)
fd_wfi(ctx->batch, ring);
ctx->last.streamout_mask = emit->streamout_mask;
}
@@ -311,7 +311,6 @@ spec@ext_texture_srgb@texwrap formats-s3tc bordercolor-swizzled@GL_COMPRESSED_SR
spec@ext_texture_srgb@texwrap formats-s3tc bordercolor-swizzled@GL_COMPRESSED_SRGB_S3TC_DXT1_EXT- swizzled- border color only,Fail
spec@ext_texture_srgb@texwrap formats-s3tc bordercolor-swizzled@GL_COMPRESSED_SRGB- swizzled- border color only,Fail
spec@ext_transform_feedback@geometry-shaders-basic,Fail
spec@ext_transform_feedback@immediate-reuse-index-buffer,Fail
spec@ext_transform_feedback@intervening-read prims_generated,Fail
spec@ext_transform_feedback@intervening-read prims_generated use_gs,Fail
spec@ext_transform_feedback@overflow-edge-cases,Fail