radv: track if shader image 32-bit float atomics are enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12406>
This commit is contained in:
@@ -2939,6 +2939,7 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
||||
bool custom_border_colors = false;
|
||||
bool vrs_enabled = false;
|
||||
bool attachment_vrs_enabled = false;
|
||||
bool image_float32_atomics = false;
|
||||
|
||||
/* Check enabled features */
|
||||
if (pCreateInfo->pEnabledFeatures) {
|
||||
@@ -2989,6 +2990,20 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
||||
robust_buffer_access2 = true;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: {
|
||||
const VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *features = (const void *)ext;
|
||||
if (features->shaderImageFloat32Atomics ||
|
||||
features->sparseImageFloat32Atomics)
|
||||
image_float32_atomics = true;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: {
|
||||
const VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *features = (const void *)ext;
|
||||
if (features->shaderImageFloat32AtomicMinMax ||
|
||||
features->sparseImageFloat32AtomicMinMax)
|
||||
image_float32_atomics = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -3043,6 +3058,8 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
||||
device->physical_device->rad_info.family == CHIP_VANGOGH);
|
||||
device->attachment_vrs_enabled = attachment_vrs_enabled;
|
||||
|
||||
device->image_float32_atomics = image_float32_atomics;
|
||||
|
||||
mtx_init(&device->shader_slab_mutex, mtx_plain);
|
||||
list_inithead(&device->shader_slabs);
|
||||
|
||||
|
||||
@@ -818,6 +818,9 @@ struct radv_device {
|
||||
/* Whether attachment VRS is enabled. */
|
||||
bool attachment_vrs_enabled;
|
||||
|
||||
/* Whether shader image 32-bit float atomics are enabled. */
|
||||
bool image_float32_atomics;
|
||||
|
||||
/* Whether anisotropy is forced with RADV_TEX_ANISO (-1 is disabled). */
|
||||
int force_aniso;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user