Skip to content
  • José María Casanova Crespo's avatar
    v3d: Sync on last CS when non-compute stage uses resource written by CS · 01496e3d
    José María Casanova Crespo authored
    
    
    When a resource is written by a compute shader and then used by a
    non-compute stage we sync on last compute job to guarantee that the
    resource has been completely written when the next stage reads resources.
    
    In the other cases how flushes are done guarantee the serialization of
    the writes and reads.
    
    To reproduce the failure the following tests should be executed in batch
    as last test don't fail when run isolated:
    
    KHR-GLES31.core.shader_image_load_store.basic-allFormats-load-fs
    KHR-GLES31.core.shader_image_load_store.basic-allFormats-loadStoreComputeStage
    KHR-GLES31.core.shader_image_load_store.basic-allTargets-load-cs
    KHR-GLES31.core.shader_image_load_store.advanced-sync-vertexArray
    
    v2: Use fence dep instead of bo_wait (Eric Anholt)
    v3: Rename struct names (Iago Toral)
        Document why is not needed on graphics->compute case. (Iago Toral)
        Follow same code pattern of the other update of in_sync_bcl.
    v4: Fixed comments style. (Iago Toral)
    
    Fixes KHR-GLES31.core.shader_image_load_store.advanced-sync-vertexArray
    
    Reviewed-by: default avatarIago Toral Quiroga <itoral@igalia.com>
    CC: 19.3 20.0 <mesa-stable@lists.freedesktop.org>
    Tested-by: Marge Bot <mesa!2700>
    Part-of: <mesa!2700>
    01496e3d