mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 12:28:07 +02:00
radv: Respect max extent for modifiers
Some of our modifiers only support upto a certain range, expose this in ImageFormatProperties. Signed-off-by: Joshua Ashton <joshua@froggi.es> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13056>
This commit is contained in:
parent
baff748cb0
commit
f63ec0128c
1 changed files with 7 additions and 0 deletions
|
|
@ -1218,6 +1218,8 @@ radv_check_modifier_support(struct radv_physical_device *dev,
|
|||
const VkPhysicalDeviceImageFormatInfo2 *info,
|
||||
VkImageFormatProperties *props, VkFormat format, uint64_t modifier)
|
||||
{
|
||||
uint32_t max_width, max_height;
|
||||
|
||||
if (info->type != VK_IMAGE_TYPE_2D)
|
||||
return VK_ERROR_FORMAT_NOT_SUPPORTED;
|
||||
|
||||
|
|
@ -1278,6 +1280,11 @@ radv_check_modifier_support(struct radv_physical_device *dev,
|
|||
props->maxMipLevels = 1;
|
||||
props->maxArrayLayers = 1;
|
||||
}
|
||||
|
||||
ac_modifier_max_extent(&dev->rad_info, modifier, &max_width, &max_height);
|
||||
props->maxExtent.width = MIN2(props->maxExtent.width, max_width);
|
||||
props->maxExtent.height = MIN2(props->maxExtent.width, max_height);
|
||||
|
||||
/* We don't support MSAA for modifiers */
|
||||
props->sampleCounts &= VK_SAMPLE_COUNT_1_BIT;
|
||||
return VK_SUCCESS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue