From: Samuel Iglesias Gonsálvez Date: Thu, 17 Dec 2020 10:38:49 +0000 (+0100) Subject: turnip: disable UBWC on Z24_S8 MSAA images on A630 X-Git-Tag: upstream/21.2.3~9360 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b50b28cd33fbc228869f72ff0f95bf232597c9db;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Eric Anholt Part-of: --- diff --git a/.gitlab-ci/deqp-freedreno-a630-bypass-fails.txt b/.gitlab-ci/deqp-freedreno-a630-bypass-fails.txt index b622784..76965a3 100644 --- a/.gitlab-ci/deqp-freedreno-a630-bypass-fails.txt +++ b/.gitlab-ci/deqp-freedreno-a630-bypass-fails.txt @@ -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 diff --git a/.gitlab-ci/deqp-freedreno-a630-fails.txt b/.gitlab-ci/deqp-freedreno-a630-fails.txt index cf71d32..31fa5a8 100644 --- a/.gitlab-ci/deqp-freedreno-a630-fails.txt +++ b/.gitlab-ci/deqp-freedreno-a630-fails.txt @@ -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 diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c index fe0fd5e..7f6e5e6 100644 --- a/src/freedreno/vulkan/tu_formats.c +++ b/src/freedreno/vulkan/tu_formats.c @@ -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; diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c index 56e11e1..c602f4b 100644 --- a/src/freedreno/vulkan/tu_image.c +++ b/src/freedreno/vulkan/tu_image.c @@ -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 */ diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index 053a68b..de672fb 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -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 {