From: Dave Airlie <airl...@redhat.com> Signed-off-by: Dave Airlie <airl...@redhat.com> --- src/amd/vulkan/radv_device.c | 32 ++++++++++++++++++++++++++++++++ src/amd/vulkan/radv_private.h | 2 ++ 2 files changed, 34 insertions(+)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 9371536..8bc568b 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -722,6 +722,36 @@ radv_queue_finish(struct radv_queue *queue) queue->device->ws->ctx_destroy(queue->hw_ctx); } +static void +radv_device_init_gs_info(struct radv_device *device) +{ + switch (device->physical_device->rad_info.family) { + case CHIP_OLAND: + case CHIP_HAINAN: + case CHIP_KAVERI: + case CHIP_KABINI: + case CHIP_MULLINS: + case CHIP_ICELAND: + case CHIP_CARRIZO: + case CHIP_STONEY: + device->gs_table_depth = 16; + return; + case CHIP_TAHITI: + case CHIP_PITCAIRN: + case CHIP_VERDE: + case CHIP_BONAIRE: + case CHIP_HAWAII: + case CHIP_TONGA: + case CHIP_FIJI: + case CHIP_POLARIS10: + case CHIP_POLARIS11: + device->gs_table_depth = 32; + return; + default: + unreachable("unknown GPU"); + } +} + VkResult radv_CreateDevice( VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, @@ -781,6 +811,8 @@ VkResult radv_CreateDevice( } } + radv_device_init_gs_info(device); + result = radv_device_init_meta(device); if (result != VK_SUCCESS) goto fail; diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 7e8c5fc..f8bc007 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -485,6 +485,8 @@ struct radv_device { uint64_t debug_flags; + uint32_t gs_table_depth; + /* MSAA sample locations. * The first index is the sample index. * The second index is the coordinate: X, Y. */ -- 2.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev