anv/hasvk: sort out debug options
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
This commit is contained in:

committed by
Marge Bot

parent
8a51e097af
commit
713cb0fdc1
@@ -871,13 +871,6 @@ Anvil(ANV) driver environment variables
|
||||
If defined to ``1`` or ``true``, this forces all descriptor sets to
|
||||
use the internal :ref:`Bindless model`.
|
||||
|
||||
.. envvar:: ANV_USERSPACE_RELOCS
|
||||
|
||||
If defined to ``1`` or ``true``, this forces ANV to always do
|
||||
kernel relocations in command buffers. This should only have an
|
||||
effect on hardware that doesn't support soft-pinning (Ivybridge,
|
||||
Haswell, Cherryview).
|
||||
|
||||
.. envvar:: ANV_PRIMITIVE_REPLICATION_MAX_VIEWS
|
||||
|
||||
Specifies up to how many view shaders can be lowered to handle
|
||||
@@ -890,6 +883,29 @@ Anvil(ANV) driver environment variables
|
||||
If set to 1, true, or yes, then VK_EXT_graphics_pipeline_library
|
||||
will be disabled.
|
||||
|
||||
.. envvar:: ANV_QUEUE_OVERRIDE
|
||||
|
||||
Override exposed queue families & counts. The variable is a comma
|
||||
separated list of queue overrides. To override the number queues:
|
||||
|
||||
- ``gc`` is for graphics queues with compute support
|
||||
- ``g`` is for graphics queues with no compute support
|
||||
- ``c`` is for compute queues with no graphics support
|
||||
- ``v`` is for video queues with no graphics support
|
||||
- ``b`` is for copy (blitter) queues with no graphics support
|
||||
|
||||
For example, ``ANV_QUEUE_OVERRIDE=gc=2,c=1`` would override the number
|
||||
of advertised queues to be 2 queues with graphics+compute support,
|
||||
and 1 queue with compute-only support.
|
||||
|
||||
``ANV_QUEUE_OVERRIDE=c=1`` would override the number of advertised
|
||||
queues to include 1 queue with compute-only support, but it will
|
||||
not change the number of graphics+compute queues.
|
||||
|
||||
``ANV_QUEUE_OVERRIDE=gc=0,c=1`` would override the number of
|
||||
advertised queues to include 1 queue with compute-only support, and
|
||||
it would override the number of graphics+compute queues to be 0.
|
||||
|
||||
.. envvar:: ANV_SPARSE
|
||||
|
||||
By default, the sparse resources feature is enabled. However, if set to 0,
|
||||
@@ -903,6 +919,50 @@ Anvil(ANV) driver environment variables
|
||||
For i915 there is no option, sparse resources is always implemented with
|
||||
TRTT.
|
||||
|
||||
Hasvk driver environment variables
|
||||
---------------------------------------
|
||||
|
||||
.. envvar:: HASVK_DISABLE_SECONDARY_CMD_BUFFER_CALLS
|
||||
|
||||
If defined to ``1`` or ``true``, this will prevent usage of self
|
||||
modifying command buffers to implement ``vkCmdExecuteCommands``. As
|
||||
a result of this, it will also disable :ext:`VK_KHR_performance_query`.
|
||||
|
||||
.. envvar:: HASVK_ALWAYS_BINDLESS
|
||||
|
||||
If defined to ``1`` or ``true``, this forces all descriptor sets to
|
||||
use the internal :ref:`Bindless model`.
|
||||
|
||||
.. envvar:: HASVK_QUEUE_OVERRIDE
|
||||
|
||||
Override exposed queue families & counts. The variable is a comma
|
||||
separated list of queue overrides. To override the number queues:
|
||||
|
||||
- ``gc`` is for graphics queues with compute support
|
||||
- ``g`` is for graphics queues with no compute support
|
||||
- ``c`` is for compute queues with no graphics support
|
||||
- ``v`` is for video queues with no graphics support
|
||||
- ``b`` is for copy (blitter) queues with no graphics support
|
||||
|
||||
For example, ``HASVK_QUEUE_OVERRIDE=gc=2,c=1`` would override the
|
||||
number of advertised queues to be 2 queues with graphics+compute
|
||||
support, and 1 queue with compute-only support.
|
||||
|
||||
``HASVK_QUEUE_OVERRIDE=c=1`` would override the number of
|
||||
advertised queues to include 1 queue with compute-only support, but
|
||||
it will not change the number of graphics+compute queues.
|
||||
|
||||
``HASVK_QUEUE_OVERRIDE=gc=0,c=1`` would override the number of
|
||||
advertised queues to include 1 queue with compute-only support, and
|
||||
it would override the number of graphics+compute queues to be 0.
|
||||
|
||||
.. envvar:: HASVK_USERSPACE_RELOCS
|
||||
|
||||
If defined to ``1`` or ``true``, this forces ANV to always do
|
||||
kernel relocations in command buffers. This should only have an
|
||||
effect on hardware that doesn't support soft-pinning (Ivybridge,
|
||||
Haswell, Cherryview).
|
||||
|
||||
DRI environment variables
|
||||
-------------------------
|
||||
|
||||
|
@@ -2215,28 +2215,6 @@ anv_physical_device_free_disk_cache(struct anv_physical_device *device)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* The ANV_QUEUE_OVERRIDE environment variable is a comma separated list of
|
||||
* queue overrides.
|
||||
*
|
||||
* To override the number queues:
|
||||
* * "gc" is for graphics queues with compute support
|
||||
* * "g" is for graphics queues with no compute support
|
||||
* * "c" is for compute queues with no graphics support
|
||||
* * "v" is for video queues with no graphics support
|
||||
* * "b" is for copy (blitter) queues with no graphics support
|
||||
*
|
||||
* For example, ANV_QUEUE_OVERRIDE=gc=2,c=1 would override the number of
|
||||
* advertised queues to be 2 queues with graphics+compute support, and 1 queue
|
||||
* with compute-only support.
|
||||
*
|
||||
* ANV_QUEUE_OVERRIDE=c=1 would override the number of advertised queues to
|
||||
* include 1 queue with compute-only support, but it will not change the
|
||||
* number of graphics+compute queues.
|
||||
*
|
||||
* ANV_QUEUE_OVERRIDE=gc=0,c=1 would override the number of advertised queues
|
||||
* to include 1 queue with compute-only support, and it would override the
|
||||
* number of graphics+compute queues to be 0.
|
||||
*/
|
||||
static void
|
||||
anv_override_engine_counts(int *gc_count, int *g_count, int *c_count, int *v_count, int *blit_count)
|
||||
{
|
||||
|
@@ -1504,7 +1504,7 @@ execbuf_can_skip_relocations(struct anv_execbuf *exec)
|
||||
|
||||
static int userspace_relocs = -1;
|
||||
if (userspace_relocs < 0)
|
||||
userspace_relocs = debug_get_bool_option("ANV_USERSPACE_RELOCS", true);
|
||||
userspace_relocs = debug_get_bool_option("HASVK_USERSPACE_RELOCS", true);
|
||||
if (!userspace_relocs)
|
||||
return false;
|
||||
|
||||
|
@@ -975,7 +975,7 @@ get_properties(const struct anv_physical_device *pdevice,
|
||||
#if DETECT_OS_ANDROID
|
||||
.apiVersion = ANV_API_VERSION,
|
||||
#else
|
||||
.apiVersion = (pdevice->use_softpin || pdevice->instance->report_vk_1_3) ?
|
||||
.apiVersion = (pdevice->use_softpin || pdevice->instance->report_vk_1_3) ?
|
||||
ANV_API_VERSION_1_3 : ANV_API_VERSION_1_2,
|
||||
#endif /* DETECT_OS_ANDROID */
|
||||
.driverVersion = vk_get_driver_version(),
|
||||
@@ -1469,33 +1469,13 @@ anv_physical_device_free_disk_cache(struct anv_physical_device *device)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* The ANV_QUEUE_OVERRIDE environment variable is a comma separated list of
|
||||
* queue overrides.
|
||||
*
|
||||
* To override the number queues:
|
||||
* * "gc" is for graphics queues with compute support
|
||||
* * "g" is for graphics queues with no compute support
|
||||
* * "c" is for compute queues with no graphics support
|
||||
*
|
||||
* For example, ANV_QUEUE_OVERRIDE=gc=2,c=1 would override the number of
|
||||
* advertised queues to be 2 queues with graphics+compute support, and 1 queue
|
||||
* with compute-only support.
|
||||
*
|
||||
* ANV_QUEUE_OVERRIDE=c=1 would override the number of advertised queues to
|
||||
* include 1 queue with compute-only support, but it will not change the
|
||||
* number of graphics+compute queues.
|
||||
*
|
||||
* ANV_QUEUE_OVERRIDE=gc=0,c=1 would override the number of advertised queues
|
||||
* to include 1 queue with compute-only support, and it would override the
|
||||
* number of graphics+compute queues to be 0.
|
||||
*/
|
||||
static void
|
||||
anv_override_engine_counts(int *gc_count, int *g_count, int *c_count)
|
||||
{
|
||||
int gc_override = -1;
|
||||
int g_override = -1;
|
||||
int c_override = -1;
|
||||
const char *env_ = os_get_option("ANV_QUEUE_OVERRIDE");
|
||||
const char *env_ = os_get_option("HASVK_QUEUE_OVERRIDE");
|
||||
|
||||
if (env_ == NULL)
|
||||
return;
|
||||
@@ -1778,11 +1758,11 @@ anv_physical_device_try_create(struct vk_instance *vk_instance,
|
||||
device->vk.pipeline_cache_import_ops = anv_cache_import_ops;
|
||||
|
||||
device->always_use_bindless =
|
||||
debug_get_bool_option("ANV_ALWAYS_BINDLESS", false);
|
||||
debug_get_bool_option("HASVK_ALWAYS_BINDLESS", false);
|
||||
|
||||
device->use_call_secondary =
|
||||
device->use_softpin &&
|
||||
!debug_get_bool_option("ANV_DISABLE_SECONDARY_CMD_BUFFER_CALLS", false);
|
||||
!debug_get_bool_option("HASVK_DISABLE_SECONDARY_CMD_BUFFER_CALLS", false);
|
||||
|
||||
/* We first got the A64 messages on broadwell and we can only use them if
|
||||
* we can pass addresses directly into the shader which requires softpin.
|
||||
|
Reference in New Issue
Block a user