mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
radv: enable VK_KHR_16bit_storage extension / 16bit storage features
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
4d0b02bb5a
commit
62024fa775
3 changed files with 8 additions and 4 deletions
|
|
@ -740,6 +740,7 @@ void radv_GetPhysicalDeviceFeatures2(
|
||||||
VkPhysicalDevice physicalDevice,
|
VkPhysicalDevice physicalDevice,
|
||||||
VkPhysicalDeviceFeatures2KHR *pFeatures)
|
VkPhysicalDeviceFeatures2KHR *pFeatures)
|
||||||
{
|
{
|
||||||
|
RADV_FROM_HANDLE(radv_physical_device, pdevice, physicalDevice);
|
||||||
vk_foreach_struct(ext, pFeatures->pNext) {
|
vk_foreach_struct(ext, pFeatures->pNext) {
|
||||||
switch (ext->sType) {
|
switch (ext->sType) {
|
||||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR: {
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR: {
|
||||||
|
|
@ -770,10 +771,11 @@ void radv_GetPhysicalDeviceFeatures2(
|
||||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: {
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: {
|
||||||
VkPhysicalDevice16BitStorageFeatures *features =
|
VkPhysicalDevice16BitStorageFeatures *features =
|
||||||
(VkPhysicalDevice16BitStorageFeatures*)ext;
|
(VkPhysicalDevice16BitStorageFeatures*)ext;
|
||||||
features->storageBuffer16BitAccess = false;
|
bool enabled = HAVE_LLVM >= 0x0700 && pdevice->rad_info.chip_class >= VI;
|
||||||
features->uniformAndStorageBuffer16BitAccess = false;
|
features->storageBuffer16BitAccess = enabled;
|
||||||
features->storagePushConstant16 = false;
|
features->uniformAndStorageBuffer16BitAccess = enabled;
|
||||||
features->storageInputOutput16 = false;
|
features->storagePushConstant16 = enabled;
|
||||||
|
features->storageInputOutput16 = enabled;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: {
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: {
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ class Extension:
|
||||||
# and dEQP-VK.api.info.device fail due to the duplicated strings.
|
# and dEQP-VK.api.info.device fail due to the duplicated strings.
|
||||||
EXTENSIONS = [
|
EXTENSIONS = [
|
||||||
Extension('VK_ANDROID_native_buffer', 5, 'ANDROID && device->rad_info.has_syncobj_wait_for_submit'),
|
Extension('VK_ANDROID_native_buffer', 5, 'ANDROID && device->rad_info.has_syncobj_wait_for_submit'),
|
||||||
|
Extension('VK_KHR_16bit_storage', 1, 'HAVE_LLVM >= 0x0700'),
|
||||||
Extension('VK_KHR_bind_memory2', 1, True),
|
Extension('VK_KHR_bind_memory2', 1, True),
|
||||||
Extension('VK_KHR_create_renderpass2', 1, True),
|
Extension('VK_KHR_create_renderpass2', 1, True),
|
||||||
Extension('VK_KHR_dedicated_allocation', 1, True),
|
Extension('VK_KHR_dedicated_allocation', 1, True),
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
|
||||||
.descriptor_array_dynamic_indexing = true,
|
.descriptor_array_dynamic_indexing = true,
|
||||||
.runtime_descriptor_array = true,
|
.runtime_descriptor_array = true,
|
||||||
.stencil_export = true,
|
.stencil_export = true,
|
||||||
|
.storage_16bit = true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
entry_point = spirv_to_nir(spirv, module->size / 4,
|
entry_point = spirv_to_nir(spirv, module->size / 4,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue