nvk: Use a GS for layerered rendering pre-MaxwellB
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Fri, 31 Mar 2023 16:48:29 +0000 (11:48 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:03 +0000 (21:32 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/vulkan/nvk_cmd_meta.c

index aaff607..ac3ac99 100644 (file)
@@ -2,6 +2,9 @@
 #include "nvk_cmd_buffer.h"
 #include "nvk_device.h"
 #include "nvk_image.h"
+#include "nvk_physical_device.h"
+
+#include "nvk_clb197.h"
 
 static VkResult
 nvk_cmd_bind_map_buffer(struct vk_command_buffer *vk_cmd,
@@ -28,10 +31,13 @@ nvk_cmd_bind_map_buffer(struct vk_command_buffer *vk_cmd,
 VkResult
 nvk_device_init_meta(struct nvk_device *dev)
 {
+   struct nvk_physical_device *pdev = nvk_device_physical(dev);
+
    VkResult result = vk_meta_device_init(&dev->vk, &dev->meta);
    if (result != VK_SUCCESS)
       return result;
 
+   dev->meta.use_gs_for_layer = pdev->info.cls_eng3d < MAXWELL_B,
    dev->meta.cmd_bind_map_buffer = nvk_cmd_bind_map_buffer;
    dev->meta.max_bind_map_buffer_size_B = 64 * 1024; /* TODO */