summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-10-08 14:40:17 +0200
committerSamuel Pitoiset <[email protected]>2018-10-11 14:49:14 +0200
commitc3ba3c26114d8c326e35670cbedf35f15b9c7347 (patch)
treeaba07218a13bf911beab9b1409caafb7cff58737
parentd179312b53d94a4f0ffe1e88569525300afb4985 (diff)
radv: disallow 3D images and mipmaps/layers for R32G32B32 linear formats
R32G32B32 are weird formats and we are only going to support some basic operations for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r--src/amd/vulkan/radv_formats.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index ad06c9e9964..a7aa819e2bd 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -1091,6 +1091,20 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph
sampleCounts |= VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_8_BIT;
}
+ if (info->tiling == VK_IMAGE_TILING_LINEAR &&
+ (info->format == VK_FORMAT_R32G32B32_SFLOAT ||
+ info->format == VK_FORMAT_R32G32B32_SINT ||
+ info->format == VK_FORMAT_R32G32B32_UINT)) {
+ /* R32G32B32 is a weird format and the driver currently only
+ * supports the barely minimum.
+ * TODO: Implement more if we really need to.
+ */
+ if (info->type == VK_IMAGE_TYPE_3D)
+ goto unsupported;
+ maxArraySize = 1;
+ maxMipLevels = 1;
+ }
+
if (info->usage & VK_IMAGE_USAGE_SAMPLED_BIT) {
if (!(format_feature_flags & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) {
goto unsupported;