radv: Add a field for the max shared memory size

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17663>
This commit is contained in:
Konstantin Seurer
2022-10-31 18:07:45 +01:00
committed by Marge Bot
parent 19c5739b74
commit 2dc93e284e
2 changed files with 6 additions and 1 deletions

View File

@@ -904,6 +904,8 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
device->rt_wave_size = 32;
}
device->max_shared_size = device->rad_info.gfx_level >= GFX7 ? 65536 : 32768;
radv_physical_device_init_mem_types(device);
radv_physical_device_get_supported_extensions(device, &device->vk.supported_extensions);
@@ -2016,7 +2018,7 @@ radv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
.maxFragmentOutputAttachments = 8,
.maxFragmentDualSrcAttachments = 1,
.maxFragmentCombinedOutputResources = max_descriptor_set_size,
.maxComputeSharedMemorySize = pdevice->rad_info.gfx_level >= GFX7 ? 65536 : 32768,
.maxComputeSharedMemorySize = pdevice->max_shared_size,
.maxComputeWorkGroupCount = {65535, 65535, 65535},
.maxComputeWorkGroupInvocations = 1024,
.maxComputeWorkGroupSize = {1024, 1024, 1024},

View File

@@ -299,6 +299,9 @@ struct radv_physical_device {
uint8_t ge_wave_size;
uint8_t rt_wave_size;
/* Maximum compute shared memory size. */
uint32_t max_shared_size;
/* Whether to use the LLVM compiler backend */
bool use_llvm;