From 24aed6a53c2d4665ac844f4198491b291c9ddc13 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 21 Apr 2020 12:25:44 +0300 Subject: [PATCH 1/2] iris: don't assert on unfinished aux import in copy paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After a resource is created the first command using it could be a copy command. In iris_state we finish the import on surface/view creation but we don't do that for copies. v2: Move finish call to gallium entrypoints (Ken) Signed-off-by: Lionel Landwerlin Cc: Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2725 Reviewed-by: Tapani Pälli (v1) Reviewed-by: Kenneth Graunke (cherry picked from commit 612e35c8d94241b07b32a6010ccd1a3edd473439) Part-of: --- src/gallium/drivers/iris/iris_blit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/iris/iris_blit.c b/src/gallium/drivers/iris/iris_blit.c index 4b43901d4b3c..fe655a3f8f1a 100644 --- a/src/gallium/drivers/iris/iris_blit.c +++ b/src/gallium/drivers/iris/iris_blit.c @@ -731,6 +731,7 @@ iris_resource_copy_region(struct pipe_context *ctx, const struct pipe_box *src_box) { struct iris_context *ice = (void *) ctx; + struct iris_screen *screen = (void *) ctx->screen; struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER]; struct iris_resource *src = (void *) p_src; struct iris_resource *dst = (void *) p_dst; -- GitLab From b622b66d339dc800a597fcb3bca884ac29d2c822 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 27 Apr 2020 13:53:59 +0100 Subject: [PATCH 2/2] aco: consider blocks unreachable if they are in the logical cfg backport of 9392ddab4399d796fdf37602f586965ec17f2b2a Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 0b69eb51c89e..7f0b9148daa0 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -8276,7 +8276,6 @@ static bool visit_if(isel_context *ctx, nir_if *if_stmt) ctx->block = ctx->program->insert_block(std::move(BB_endif)); append_logical_start(ctx->block); } - return !ctx->cf_info.has_branch; } else { /* non-uniform condition */ /** * To maintain a logical and linear CFG without critical edges, @@ -8312,9 +8311,9 @@ static bool visit_if(isel_context *ctx, nir_if *if_stmt) visit_cf_list(ctx, &if_stmt->else_list); end_divergent_if(ctx, &ic); - - return true; } + + return !ctx->cf_info.has_branch && !ctx->block->logical_preds.empty(); } static bool visit_cf_list(isel_context *ctx, -- GitLab