[Mesa-dev] [PATCH 6/6] radv: enable shaderStorageImageMultisample
Dave Airlie
airlied at gmail.com
Mon Mar 19 07:26:57 UTC 2018
From: Dave Airlie <airlied at redhat.com>
This enables multisample shader storage images on radv.
---
src/amd/vulkan/radv_device.c | 4 ++--
src/amd/vulkan/radv_formats.c | 3 +--
src/amd/vulkan/radv_shader.c | 2 ++
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 36ba0c3833d..8d0161ca40a 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -660,7 +660,7 @@ void radv_GetPhysicalDeviceFeatures(
.shaderTessellationAndGeometryPointSize = true,
.shaderImageGatherExtended = true,
.shaderStorageImageExtendedFormats = true,
- .shaderStorageImageMultisample = false,
+ .shaderStorageImageMultisample = true,
.shaderUniformBufferArrayDynamicIndexing = true,
.shaderSampledImageArrayDynamicIndexing = true,
.shaderStorageBufferArrayDynamicIndexing = true,
@@ -845,7 +845,7 @@ void radv_GetPhysicalDeviceProperties(
.sampledImageIntegerSampleCounts = VK_SAMPLE_COUNT_1_BIT,
.sampledImageDepthSampleCounts = sample_counts,
.sampledImageStencilSampleCounts = sample_counts,
- .storageImageSampleCounts = VK_SAMPLE_COUNT_1_BIT,
+ .storageImageSampleCounts = sample_counts,
.maxSampleMaskWords = 1,
.timestampComputeAndGraphics = true,
.timestampPeriod = 1000000.0 / pdevice->rad_info.clock_crystal_freq,
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index da341a3a848..04eca876307 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -1096,8 +1096,7 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph
info->type == VK_IMAGE_TYPE_2D &&
(format_feature_flags & (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT)) &&
- !(info->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) &&
- !(info->usage & VK_IMAGE_USAGE_STORAGE_BIT)) {
+ !(info->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT)) {
sampleCounts |= VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_8_BIT;
}
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index ac577c36e9f..6824301f6a1 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -216,6 +216,8 @@ radv_shader_compile_to_nir(struct radv_device *device,
.subgroup_basic = true,
.variable_pointers = true,
.gcn_shader = true,
+ .storage_image_ms = true,
+ .image_ms_array = true,
},
};
entry_point = spirv_to_nir(spirv, module->size / 4,
--
2.14.3
More information about the mesa-dev
mailing list