radv: Expose VK_VALVE_descriptor_set_host_mapping for vkd3d only.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 13 Mar 2022 18:10:38 +0000 (19:10 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 15 Mar 2022 18:52:41 +0000 (18:52 +0000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15363>

src/amd/vulkan/radv_device.c

index b164bbc..8b0a106 100644 (file)
@@ -557,7 +557,12 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
       .NV_compute_shader_derivatives = true,
       .NV_mesh_shader = device->use_ngg && device->rad_info.chip_class >= GFX10_3 &&
                         device->instance->perftest_flags & RADV_PERFTEST_NV_MS && !device->use_llvm,
-      .VALVE_descriptor_set_host_mapping = true,
+      /* Undocumented extension purely for vkd3d-proton. This check is to prevent anyone else from
+       * using it.
+       */
+      .VALVE_descriptor_set_host_mapping =
+         device->vk.instance->app_info.engine_name &&
+         strcmp(device->vk.instance->app_info.engine_name, "vkd3d") == 0,
       .VALVE_mutable_descriptor_type = true,
    };
 }