Module: Mesa
Branch: main
Commit: 62c21c240e8107d7d34f01cacd5ea8c07e762c35
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=62c21c240e8107d7d34f01cacd5ea8c07e762c35

Author: Lionel Landwerlin <lionel.g.landwer...@intel.com>
Date:   Fri Dec 22 17:10:01 2023 +0200

anv: remove ANV_ENABLE_GENERATED_INDIRECT_DRAWS variable

We have a threshold drirc value & environment variable.

Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>
Reviewed-by: José Roberto de Souza <jose.so...@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26967>

---

 docs/drivers/anv.rst               |  3 ---
 src/intel/vulkan/anv_device.c      |  5 -----
 src/intel/vulkan/anv_private.h     | 10 ----------
 src/intel/vulkan/genX_cmd_buffer.c |  3 +--
 4 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/docs/drivers/anv.rst b/docs/drivers/anv.rst
index 3fa2e7b6252..ec7f6110406 100644
--- a/docs/drivers/anv.rst
+++ b/docs/drivers/anv.rst
@@ -7,9 +7,6 @@ Debugging
 Here are a few environment variable debug environment variables
 specific to ANV:
 
-:envvar:`ANV_ENABLE_GENERATED_INDIRECT_DRAWS`
-   If defined to ``0`` or ``false``, this will disable the generated
-   indirect draw optimization in ANV. This will only affect Gfx11+.
 :envvar:`ANV_ENABLE_PIPELINE_CACHE`
    If defined to ``0`` or ``false``, this will disable pipeline
    caching, forcing ANV to reparse and recompile any VkShaderModule
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 4e7c31d6f60..97861da01b9 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -2240,11 +2240,6 @@ anv_physical_device_try_create(struct vk_instance 
*vk_instance,
    if (debug_get_bool_option("ANV_QUEUE_THREAD_DISABLE", false))
       device->has_exec_timeline = false;
 
-
-   device->generated_indirect_draws =
-      debug_get_bool_option("ANV_ENABLE_GENERATED_INDIRECT_DRAWS",
-                            true);
-
    device->has_cooperative_matrix =
       device->info.cooperative_matrix_configurations[0].scope != SCOPE_NONE;
 
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index d246fa648c9..7b0eb1180dc 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1004,16 +1004,6 @@ struct anv_physical_device {
     bool                                        uses_ex_bso;
 
     bool                                        always_flush_cache;
-
-    /**
-     * True if the generated indirect draw optimization is turned on.
-     *
-     * This optimization is currently only available on Gfx11+ to avoid
-     * dealing with the annoying Gfx8/9 tracking of vertex buffer for the VF
-     * cache workaround.
-     */
-    bool                                        generated_indirect_draws;
-
     /**
      * True if the descriptors buffers are holding one of the following :
      *    - anv_sampled_image_descriptor
diff --git a/src/intel/vulkan/genX_cmd_buffer.c 
b/src/intel/vulkan/genX_cmd_buffer.c
index 06c088e4e52..9336a8b2214 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -3332,8 +3332,7 @@ anv_use_generated_draws(const struct anv_cmd_buffer 
*cmd_buffer, uint32_t count)
        anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_CTRL))
       return false;
 
-   return device->physical->generated_indirect_draws &&
-          count >= device->physical->instance->generated_indirect_threshold;
+   return count >= device->physical->instance->generated_indirect_threshold;
 }
 
 VkResult

Reply via email to