From c1a38fed995c3d03d8197a5ab444617868437107 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Fri, 13 Jan 2023 16:32:41 +0100 Subject: [PATCH] aco: Pass correct number of coords to Vega 1D LOD instruction. If we pass a physical 2D texture descriptor we should also pass 2 coords. Otherwise it just uses the random content in the second register which ends up funny sometimes. Cc: mesa-stable Part-of: (cherry picked from commit edca10e9c907a21f44698121e97d0eef92c7961a) --- .pick_status.json | 2 +- src/amd/ci/radv-renoir-aco-flakes.txt | 1 - src/amd/ci/radv-vega10-aco-flakes.txt | 5 ----- src/amd/compiler/aco_instruction_selection.cpp | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 8761ca7c005..c197791cc05 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5503,7 +5503,7 @@ "description": "aco: Pass correct number of coords to Vega 1D LOD instruction.", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/ci/radv-renoir-aco-flakes.txt b/src/amd/ci/radv-renoir-aco-flakes.txt index 3d6ef1bba76..2fef273df98 100644 --- a/src/amd/ci/radv-renoir-aco-flakes.txt +++ b/src/amd/ci/radv-renoir-aco-flakes.txt @@ -1,5 +1,4 @@ dEQP-VK.dynamic_rendering.basic.* -dEQP-VK.glsl.texture_functions.query.texturequerylod.isampler1d_fragment dEQP-VK.image.sample_texture.64_bit_compressed_format_two_samplers dEQP-VK.image.sample_texture.64_bit_compressed_format_two_samplers_cubemap dEQP-VK.image.sample_texture.128_bit_compressed_format_two_samplers diff --git a/src/amd/ci/radv-vega10-aco-flakes.txt b/src/amd/ci/radv-vega10-aco-flakes.txt index c6cac31e496..c0b2704d050 100644 --- a/src/amd/ci/radv-vega10-aco-flakes.txt +++ b/src/amd/ci/radv-vega10-aco-flakes.txt @@ -1,9 +1,4 @@ dEQP-VK.dynamic_rendering.basic.* -dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler1darray_float_zero_uv_width_fragment -dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler1d_fixed_fragment -dEQP-VK.glsl.texture_functions.query.texturequerylod.usampler1darray_fragment -dEQP-VK.glsl.texture_functions.query.texturequerylod.usampler1darray_zero_uv_width_fragment -dEQP-VK.glsl.texture_functions.query.texturequerylod.isampler1darray_fragment dEQP-VK.image.sample_texture.64_bit_compressed_format_two_samplers dEQP-VK.image.sample_texture.64_bit_compressed_format_two_samplers_cubemap dEQP-VK.image.sample_texture.128_bit_compressed_format_two_samplers diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 7472b45804a..7ab54194197 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -9627,7 +9627,7 @@ visit_tex(isel_context* ctx, nir_tex_instr* instr) unsigned wqm_coord_count = 0; std::vector unpacked_coord; if (ctx->options->gfx_level == GFX9 && instr->sampler_dim == GLSL_SAMPLER_DIM_1D && - instr->op != nir_texop_lod && instr->coord_components) { + instr->coord_components) { RegClass rc = a16 ? v2b : v1; for (unsigned i = 0; i < coord.bytes() / rc.bytes(); i++) unpacked_coord.emplace_back(emit_extract_vector(ctx, coord, i, rc));