anv: enable query clear/copy using shaders on MTL/ARL

It seems like an L3 setting is different between DG2 & MTL, breaking
the L3 coherency with CS.

We can apply the same tile cache flush as we do on TGL for now until
we figure out how to configure L3 properly to avoid this.

Tested with :

 $ query_clear_with_blorp_threshold=0 query_copy_with_shader_threshold=0 ./deqp-vk -n dEQP-VK.query_pool.*

to force the shader optimizations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27597>
This commit is contained in:
Lionel Landwerlin
2024-02-13 10:39:05 +00:00
committed by Marge Bot
parent 53df391d27
commit f733215c12
2 changed files with 7 additions and 10 deletions

View File

@@ -3092,10 +3092,11 @@ enum anv_query_bits {
* vkCopyQueryPoolResults().
*/
#define ANV_QUERY_RENDER_TARGET_WRITES_PENDING_BITS(devinfo) \
(((devinfo->verx10 >= 120 && \
devinfo->verx10 < 125) ? ANV_QUERY_WRITES_TILE_FLUSH : 0) | \
ANV_QUERY_WRITES_RT_FLUSH | \
ANV_QUERY_WRITES_CS_STALL)
(((!ANV_DEVINFO_HAS_COHERENT_L3_CS(devinfo) && \
devinfo->ver >= 12) ? \
ANV_QUERY_WRITES_TILE_FLUSH : 0) | \
ANV_QUERY_WRITES_RT_FLUSH | \
ANV_QUERY_WRITES_CS_STALL)
#define ANV_QUERY_COMPUTE_WRITES_PENDING_BITS \
(ANV_QUERY_WRITES_DATA_FLUSH | \
ANV_QUERY_WRITES_CS_STALL)

View File

@@ -782,10 +782,7 @@ void genX(CmdResetQueryPool)(
ANV_FROM_HANDLE(anv_query_pool, pool, queryPool);
struct anv_physical_device *pdevice = cmd_buffer->device->physical;
/* Temporarily disable on MTL until we understand why some tests hang.
*/
if (queryCount >= pdevice->instance->query_clear_with_blorp_threshold &&
!intel_device_info_is_mtl_or_arl(cmd_buffer->device->info)) {
if (queryCount >= pdevice->instance->query_clear_with_blorp_threshold) {
trace_intel_begin_query_clear_blorp(&cmd_buffer->trace);
anv_cmd_buffer_fill_area(cmd_buffer,
@@ -1840,8 +1837,7 @@ void genX(CmdCopyQueryPoolResults)(
struct anv_device *device = cmd_buffer->device;
struct anv_physical_device *pdevice = device->physical;
if (queryCount > pdevice->instance->query_copy_with_shader_threshold &&
!intel_device_info_is_mtl_or_arl(device->info)) {
if (queryCount > pdevice->instance->query_copy_with_shader_threshold) {
copy_query_results_with_shader(cmd_buffer, pool,
anv_address_add(buffer->address,
destOffset),