From 7cdacaf49356fcd6da32469be96493923faa3533 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Fri, 29 Sep 2023 15:12:13 -0700 Subject: [PATCH] intel/xehp: Adjust TBIMR performance chicken bits. This enables a couple of TBIMR performance tunables in CHICKEN_RASTER_2 that default to disabled. TBIMR fast clip appears to help slightly with some geometry-bound workloads. TBIMR open batch allows the rasterizer to start working immediately on the first tile of the framebuffer, even before the batch has been closed, which helps reduce the latency cost of the tile walk. Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/iris/iris_state.c | 9 +++++++++ src/intel/genxml/gen125.xml | 6 ++++++ src/intel/vulkan/genX_init_state.c | 9 +++++++++ 3 files changed, 24 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index c05324422de..70f08ae72c9 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1310,6 +1310,15 @@ iris_init_render_context(struct iris_batch *batch) } #endif +#if GFX_VERx10 == 125 + iris_emit_reg(batch, GENX(CHICKEN_RASTER_2), reg) { + reg.TBIMROpenBatchEnable = true; + reg.TBIMRFastClip = true; + reg.TBIMROpenBatchEnableMask = true; + reg.TBIMRFastClipMask = true; + }; +#endif + upload_pixel_hashing_tables(batch); /* 3DSTATE_DRAWING_RECTANGLE is non-pipelined, so we want to avoid diff --git a/src/intel/genxml/gen125.xml b/src/intel/genxml/gen125.xml index 106a8e5b407..4758086b928 100644 --- a/src/intel/genxml/gen125.xml +++ b/src/intel/genxml/gen125.xml @@ -2028,6 +2028,12 @@ + + + + + + diff --git a/src/intel/vulkan/genX_init_state.c b/src/intel/vulkan/genX_init_state.c index 9fc5b1697de..caa4d1251a9 100644 --- a/src/intel/vulkan/genX_init_state.c +++ b/src/intel/vulkan/genX_init_state.c @@ -542,6 +542,15 @@ init_render_queue_state(struct anv_queue *queue, bool is_companion_rcs_batch) } #endif +#if GFX_VERx10 == 125 + anv_batch_write_reg(&batch, GENX(CHICKEN_RASTER_2), reg) { + reg.TBIMROpenBatchEnable = true; + reg.TBIMRFastClip = true; + reg.TBIMROpenBatchEnableMask = true; + reg.TBIMRFastClipMask = true; + } +#endif + /* Set the "CONSTANT_BUFFER Address Offset Disable" bit, so * 3DSTATE_CONSTANT_XS buffer 0 is an absolute address. *