diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2023-05-15 14:53:03 -0400 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2023-06-22 14:49:08 -0700 |
commit | 9b386941ee5ebad2be2cb7c1e4f80e521ceef252 (patch) | |
tree | 9f82a2ac8d82a92e231fb47e9aa0cda3304a94d2 | |
parent | 62f2092a9c85abf46bd034ee6af2a347f056b7a6 (diff) |
anv: Flush untyped dataport cache DC flush is requested on computegfx125-compute-untyped-flush
Although the following is based on this observations for OpenGL, we
probably need this for Vulkan as well.
KHR-GL46.texture_buffer.texture_buffer_operations_ssbo_writes writes
to an SSBO in a compute program, then issues a memory-barrier, which
causes us to add a DC-flush. Then a second compute program samples
from the SSBO written by the first compute program.
Although we expected the DC-flush to make the writes available to the
second compute program, on MTL this wasn't the case. Adding the
"Untyped Data-Port Cache Flush" fixes this.
The PRM indicates that compute programs must set "Untyped Data-Port
Cache Flush" to flush some LSC writes when flushing HDC. Although we
are setting DC-flush, and not HDC-flush, it does appear that the
following reference might also apply to DC-flush.
In the Intel(R) Arc(tm) A-Series Graphics and Intel Data Center GPU
Flex Series Open-Source Programmer's Reference Manual, Vol 2a: Command
Reference: Instructions, PIPE_CONTROL, HDC Pipeline Flush (DWord 0,
Bit 9), there is a programming note:
> When the "Pipeline Select" mode is set to "GPGPU", the LSC Untyped
> L1 cache flush is controlled by "Untyped Data-Port Cache Flush" bit
> in the PIPE_CONTROL command.
Ref: a8108f1d444 ("anv: Add missing untyped data port flush on PIPELINE_SELECT")
Ref: bd8e8d204db ("iris: Add missing untyped data port flush on PIPELINE_SELECT")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23176>
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 998684acb85..984b761f6c1 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -1553,7 +1553,8 @@ genX(emit_apply_pipe_flushes)(struct anv_batch *batch, if (current_pipeline != GPGPU) { flush_bits &= ~ANV_PIPE_UNTYPED_DATAPORT_CACHE_FLUSH_BIT; } else { - if (flush_bits & ANV_PIPE_HDC_PIPELINE_FLUSH_BIT) + if (flush_bits & (ANV_PIPE_HDC_PIPELINE_FLUSH_BIT | + ANV_PIPE_DATA_CACHE_FLUSH_BIT)) flush_bits |= ANV_PIPE_UNTYPED_DATAPORT_CACHE_FLUSH_BIT; } |