turnip: disable UBWC on Z24_S8 MSAA images on A630

Fixes GPU hangs in dEQP-VK.renderpass2.depth_stencil_resolve.* tests
on A630.
Signed-off-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Part-of: <!8381>
parent 63a431b8
Pipeline #257710 failed with stages
in 20 minutes and 34 seconds
......@@ -11,4 +11,3 @@ dEQP-GLES31.functional.blend_equation_advanced.srgb.colordodge,Fail
dEQP-GLES31.functional.blend_equation_advanced.srgb.exclusion,Fail
dEQP-GLES31.functional.blend_equation_advanced.srgb.multiply,Fail
dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common.common_blend_eq_buffer_advanced_blend_eq,Fail
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_16_64_6.samples_2.d24_unorm_s8_uint.depth_zero,Fail
......@@ -31,8 +31,6 @@ dEQP-VK.pipeline.extended_dynamic_state.after_pipelines.depth_compare_greater_eq
dEQP-VK.pipeline.extended_dynamic_state.before_draw.depth_compare_always_greater,Fail
dEQP-VK.pipeline.multisample.alpha_to_coverage_unused_attachment.samples_4.alpha_invisible,Fail
dEQP-VK.pipeline.push_descriptor.compute.binding3_numcalls2_sampler,Crash
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_16_64_6.samples_2.d24_unorm_s8_uint.depth_zero,Fail
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_16_64_6.samples_4.x8_d24_unorm_pack32.depth_zero,Fail
dEQP-VK.renderpass2.suballocation.attachment_allocation.input_output.7,Fail
dEQP-VK.spirv_assembly.instruction.graphics.opquantize.carry_to_exponent_tesse,Fail
dEQP-VK.spirv_assembly.instruction.graphics.opquantize.negative_round_up_or_round_down_tesse,Fail
......
......@@ -500,7 +500,7 @@ tu_GetPhysicalDeviceFormatProperties2(
/* note: ubwc_possible() argument values to be ignored except for format */
if (pFormatProperties->formatProperties.optimalTilingFeatures &&
ubwc_possible(format, VK_IMAGE_TYPE_2D, 0, false)) {
ubwc_possible(format, VK_IMAGE_TYPE_2D, 0, false, VK_SAMPLE_COUNT_1_BIT)) {
vk_outarray_append(&out, mod_props) {
mod_props->drmFormatModifier = DRM_FORMAT_MOD_QCOM_COMPRESSED;
mod_props->drmFormatModifierPlaneCount = 1;
......@@ -547,7 +547,8 @@ tu_get_image_format_properties(
if (info->flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT)
return VK_ERROR_FORMAT_NOT_SUPPORTED;
if (!ubwc_possible(info->format, info->type, info->usage, physical_device->info.a6xx.has_z24uint_s8uint))
if (!ubwc_possible(info->format, info->type, info->usage, physical_device->info.a6xx.has_z24uint_s8uint, sampleCounts))
return VK_ERROR_FORMAT_NOT_SUPPORTED;
format_feature_flags = format_props.optimalTilingFeatures;
......
......@@ -447,7 +447,8 @@ tu_image_view_init(struct tu_image_view *iview,
}
bool
ubwc_possible(VkFormat format, VkImageType type, VkImageUsageFlags usage, bool has_z24uint_s8uint)
ubwc_possible(VkFormat format, VkImageType type, VkImageUsageFlags usage, bool has_z24uint_s8uint,
VkSampleCountFlagBits samples)
{
/* no UBWC with compressed formats, E5B9G9R9, S8_UINT
* (S8_UINT because separate stencil doesn't have UBWC-enable bit)
......@@ -490,6 +491,9 @@ ubwc_possible(VkFormat format, VkImageType type, VkImageUsageFlags usage, bool h
(usage & (VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT)))
return false;
if (!has_z24uint_s8uint && samples > VK_SAMPLE_COUNT_1_BIT)
return false;
return true;
}
......@@ -595,7 +599,7 @@ tu_CreateImage(VkDevice _device,
}
if (!ubwc_possible(image->vk_format, pCreateInfo->imageType, pCreateInfo->usage,
device->physical_device->info.a6xx.has_z24uint_s8uint))
device->physical_device->info.a6xx.has_z24uint_s8uint, pCreateInfo->samples))
ubwc_enabled = false;
/* expect UBWC enabled if we asked for it */
......
......@@ -1396,7 +1396,8 @@ tu_image_view_init(struct tu_image_view *iview,
bool limited_z24s8);
bool
ubwc_possible(VkFormat format, VkImageType type, VkImageUsageFlags usage, bool limited_z24s8);
ubwc_possible(VkFormat format, VkImageType type, VkImageUsageFlags usage, bool limited_z24s8,
VkSampleCountFlagBits samples);
struct tu_buffer_view
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment