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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20696>
(cherry picked from commit edca10e9c9)
This commit is contained in:
Bas Nieuwenhuizen 2023-01-13 16:32:41 +01:00 committed by Dylan Baker
parent 54cfb552ab
commit 2114fdf5eb
4 changed files with 2 additions and 8 deletions

View file

@ -157,7 +157,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
},

View file

@ -1,5 +1,4 @@
dEQP-VK.dynamic_rendering.basic.*
dEQP-VK.glsl.texture_functions.query.texturequerylod.*
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

View file

@ -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

View file

@ -9626,7 +9626,7 @@ visit_tex(isel_context* ctx, nir_tex_instr* instr)
unsigned wqm_coord_count = 0;
std::vector<Temp> 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));