dzn: Add a debug option for enabling bindless mode
authorJesse Natalie <jenatali@microsoft.com>
Mon, 13 Mar 2023 19:45:15 +0000 (12:45 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 23 Mar 2023 21:48:44 +0000 (21:48 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913>

src/microsoft/vulkan/dzn_device.c
src/microsoft/vulkan/dzn_private.h

index 781e656..f295c60 100644 (file)
@@ -144,6 +144,7 @@ static const struct debug_control dzn_debug_options[] = {
    { "d3d12", DZN_DEBUG_D3D12 },
    { "debugger", DZN_DEBUG_DEBUGGER },
    { "redirects", DZN_DEBUG_REDIRECTS },
+   { "bindless", DZN_DEBUG_BINDLESS },
    { NULL, 0 }
 };
 
@@ -2363,6 +2364,8 @@ dzn_device_create(struct dzn_physical_device *pdev,
       device->need_swapchain_blits = true;
    }
 
+   device->bindless = (instance->debug_flags & DZN_DEBUG_BINDLESS) != 0;
+
    if (device->bindless) {
       dzn_foreach_pool_type(type) {
          uint32_t descriptor_count = type == D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER ?
index 67d4259..ab58265 100644 (file)
@@ -1216,6 +1216,7 @@ enum dzn_debug_flags {
    DZN_DEBUG_D3D12 = 1 << 7,
    DZN_DEBUG_DEBUGGER = 1 << 8,
    DZN_DEBUG_REDIRECTS = 1 << 9,
+   DZN_DEBUG_BINDLESS = 1 << 10,
 };
 
 struct dzn_instance {