Mesa (master): turnip: fix renderpass gmem configs when there are too many attachments
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 18 03:39:57 UTC 2020
Module: Mesa
Branch: master
Commit: 0a84d22bf2b81ff483b7728bf0e6c267d98c6b9c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a84d22bf2b81ff483b7728bf0e6c267d98c6b9c
Author: Jonathan Marek <jonathan at marek.ca>
Date: Tue Jun 16 10:45:58 2020 -0400
turnip: fix renderpass gmem configs when there are too many attachments
Since a value of at least "align" is used for nblocks, we might end up
with nblocks greater than the number of GMEM blocks remaining. Check for
this case and bail out, sysmem rendering will be used for such cases.
Fixes some of these tests:
dEQP-VK.pipeline.render_to_image.core.*.huge.*
Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5499>
---
.gitlab-ci/deqp-freedreno-a630-fails.txt | 2 --
src/freedreno/vulkan/tu_pass.c | 5 +++++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci/deqp-freedreno-a630-fails.txt b/.gitlab-ci/deqp-freedreno-a630-fails.txt
index 41a38a88791..6243f34cf74 100644
--- a/.gitlab-ci/deqp-freedreno-a630-fails.txt
+++ b/.gitlab-ci/deqp-freedreno-a630-fails.txt
@@ -6,8 +6,6 @@ dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_draw
dEQP-VK.compute.indirect_dispatch.upload_buffer.multiple_groups
dEQP-VK.glsl.linkage.varying.struct.int
dEQP-VK.image.texel_view_compatible.graphic.extended.2d_image.texture_read.astc_10x6_unorm_block.r32g32b32a32_uint
-dEQP-VK.pipeline.render_to_image.core.2d_array.huge.height_layers.r8g8b8a8_unorm_d24_unorm_s8_uint
-dEQP-VK.pipeline.render_to_image.core.cube_array.huge.width_height_layers.r8g8b8a8_unorm_d24_unorm_s8_uint
dEQP-VK.renderpass2.dedicated_allocation.formats.d24_unorm_s8_uint.input.dont_care.store.self_dep_clear_draw
dEQP-VK.renderpass2.suballocation.formats.d24_unorm_s8_uint.input.dont_care.store.self_dep_clear_draw_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.input.dont_care.dont_care.draw
diff --git a/src/freedreno/vulkan/tu_pass.c b/src/freedreno/vulkan/tu_pass.c
index c3ca8eb939f..beb2cf0c59e 100644
--- a/src/freedreno/vulkan/tu_pass.c
+++ b/src/freedreno/vulkan/tu_pass.c
@@ -339,6 +339,11 @@ create_render_pass_common(struct tu_render_pass *pass,
uint32_t align = MAX2(1, att->cpp >> block_align_shift);
uint32_t nblocks = MAX2((gmem_blocks * att->cpp / cpp_total) & ~(align - 1), align);
+ if (nblocks > gmem_blocks) {
+ pixels = 0;
+ break;
+ }
+
gmem_blocks -= nblocks;
cpp_total -= att->cpp;
offset += nblocks * gmem_align;
More information about the mesa-commit
mailing list