Mesa (master): turnip: Assert about the storage buffer offset alignment.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 18 00:57:31 UTC 2020


Module: Mesa
Branch: master
Commit: 008872aa309c015684653e498a8cc17a11f15fc5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=008872aa309c015684653e498a8cc17a11f15fc5

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Nov 17 13:19:36 2020 -0800

turnip: Assert about the storage buffer offset alignment.

Giving us an unaligned pointer is invalid, and this helps switch a CTS bug
from being a flake to a consistent crash.

https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/2661

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7662>

---

 .gitlab-ci/deqp-freedreno-a630-fails.txt  | 2 ++
 .gitlab-ci/deqp-freedreno-a630-flakes.txt | 3 ---
 src/freedreno/vulkan/tu_descriptor_set.c  | 1 +
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci/deqp-freedreno-a630-fails.txt b/.gitlab-ci/deqp-freedreno-a630-fails.txt
index 2a555e22936..0a7b3e4dd67 100644
--- a/.gitlab-ci/deqp-freedreno-a630-fails.txt
+++ b/.gitlab-ci/deqp-freedreno-a630-fails.txt
@@ -95,6 +95,8 @@ dEQP-VK.pipeline.extended_dynamic_state.after_pipelines.depth_compare_greater,Fa
 dEQP-VK.pipeline.extended_dynamic_state.between_pipelines.depth_compare_always_greater,Fail
 dEQP-VK.pipeline.framebuffer_attachment.2d_array_19x27_32x32_4_ms,Fail
 dEQP-VK.pipeline.render_to_image.core.2d.huge.height.r8g8b8a8_unorm_d16_unorm,Crash
+dEQP-VK.pipeline.push_descriptor.compute.binding1_numcalls2_storage_image,Crash
+dEQP-VK.pipeline.push_descriptor.compute.binding3_numcalls2_uniform_buffer,Crash
 dEQP-VK.spirv_assembly.instruction.graphics.opquantize.positive_round_up_or_round_down_vert,Fail
 dEQP-VK.spirv_assembly.instruction.graphics.opquantize.round_to_negative_inf_vert,Fail
 dEQP-VK.spirv_assembly.instruction.graphics.opquantize.spec_const_carry_bit_vert,Fail
diff --git a/.gitlab-ci/deqp-freedreno-a630-flakes.txt b/.gitlab-ci/deqp-freedreno-a630-flakes.txt
index 93d3e93ffc4..58c77cb678f 100644
--- a/.gitlab-ci/deqp-freedreno-a630-flakes.txt
+++ b/.gitlab-ci/deqp-freedreno-a630-flakes.txt
@@ -41,9 +41,6 @@ dEQP-VK.memory_model.write_after_read.core11.u32.coherent.fence_fence.atomicwrit
 # https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/2017
 dEQP-VK.renderpass.*separate_channels.*
 
-# These tests are broken (does not respect our minStorageBufferOffsetAlignment of 64)
-dEQP-VK.pipeline.push_descriptor.compute.*
-
 # Undiagnosed flakes appearing more than once in the last 2 months as
 # of 2020-08-19, in descending order of frequency.
 dEQP-GLES3.functional.fbo.msaa.2_samples.stencil_index8
diff --git a/src/freedreno/vulkan/tu_descriptor_set.c b/src/freedreno/vulkan/tu_descriptor_set.c
index 151ef926c0b..765e3c7913d 100644
--- a/src/freedreno/vulkan/tu_descriptor_set.c
+++ b/src/freedreno/vulkan/tu_descriptor_set.c
@@ -736,6 +736,7 @@ write_buffer_descriptor(uint32_t *dst, const VkDescriptorBufferInfo *buffer_info
 {
    TU_FROM_HANDLE(tu_buffer, buffer, buffer_info->buffer);
 
+   assert((buffer_info->offset & 63) == 0); /* minStorageBufferOffsetAlignment */
    uint64_t va = tu_buffer_iova(buffer) + buffer_info->offset;
    uint32_t range = get_range(buffer, buffer_info->offset, buffer_info->range);
    range = ALIGN_POT(range, 4) / 4;



More information about the mesa-commit mailing list