radv: Implement & enable VK_EXT_texel_buffer_alignment.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 10 Oct 2019 09:40:27 +0000 (11:40 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 10 Oct 2019 13:24:16 +0000 (13:24 +0000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
docs/relnotes/new_features.txt
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py

index f51a9669bad897b8ad406404cf7a94adb25825e1..bfe0ac834932d74bd5cc3595c6d01dd08dc7aadc 100644 (file)
@@ -6,3 +6,4 @@ VK_KHR_shader_clock on Intel, RADV.
 VK_KHR_shader_float_controls on Intel.
 VK_EXT_shader_subgroup_ballot on Intel.
 VK_EXT_shader_subgroup_vote on Intel.
+VK_EXT_texel_buffer_alignment on RADV.
index 69317a1c63ccba3e86f85a0a87ba6019d45bcf6c..7562f0c98e0f2e6cd34ed8c8743cc34018e85266 100644 (file)
@@ -1034,6 +1034,12 @@ void radv_GetPhysicalDeviceFeatures2(
                        features->shaderDeviceClock = false;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: {
+                       VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *features =
+                               (VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)ext;
+                       features->texelBufferAlignment = true;
+                       break;
+               }
                default:
                        break;
                }
@@ -1469,6 +1475,15 @@ void radv_GetPhysicalDeviceProperties2(
                        properties->independentResolve = VK_TRUE;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT: {
+                       VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT *properties =
+                               (VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT *)ext;
+                       properties->storageTexelBufferOffsetAlignmentBytes = 4;
+                       properties->storageTexelBufferOffsetSingleTexelAlignment = true;
+                       properties->uniformTexelBufferOffsetAlignmentBytes = 4;
+                       properties->uniformTexelBufferOffsetSingleTexelAlignment = true;
+                       break;
+               }
                default:
                        break;
                }
index 14d139d60b416e8d26e6b309c3f27029f1f866d5..12596df13641ef2767a802c6fdf05c33be10466e 100644 (file)
@@ -134,6 +134,7 @@ EXTENSIONS = [
     Extension('VK_EXT_shader_stencil_export',             1, True),
     Extension('VK_EXT_shader_subgroup_ballot',            1, True),
     Extension('VK_EXT_shader_subgroup_vote',              1, True),
+    Extension('VK_EXT_texel_buffer_alignment',            1, True),
     Extension('VK_EXT_transform_feedback',                1, True),
     Extension('VK_EXT_vertex_attribute_divisor',          3, True),
     Extension('VK_EXT_ycbcr_image_arrays',                1, True),