mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
gallivm: swap 1d array coords before casting.
This fixes a llvm validation error seen in dEQP-VK.robustness.robustness2.push.notemplate.rgba32f.dontunroll.nonvolatile.sampled_image.no_fmt_qual.img.samples_1.1d_array.rgen Cc: mesa-stable Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39225>
This commit is contained in:
parent
7bbbd9bee2
commit
1e59dbf66b
1 changed files with 6 additions and 6 deletions
|
|
@ -5535,6 +5535,12 @@ visit_tex(struct lp_build_nir_soa_context *bld, nir_tex_instr *instr)
|
|||
if (!sampler_resource)
|
||||
sampler_resource = texture_resource;
|
||||
|
||||
if (instr->is_array && instr->sampler_dim == GLSL_SAMPLER_DIM_1D) {
|
||||
/* move layer coord for 1d arrays. */
|
||||
coords[2] = coords[1];
|
||||
coords[1] = coord_zero;
|
||||
}
|
||||
|
||||
switch (instr->op) {
|
||||
case nir_texop_tex:
|
||||
case nir_texop_tg4:
|
||||
|
|
@ -5554,12 +5560,6 @@ visit_tex(struct lp_build_nir_soa_context *bld, nir_tex_instr *instr)
|
|||
;
|
||||
}
|
||||
|
||||
if (instr->is_array && instr->sampler_dim == GLSL_SAMPLER_DIM_1D) {
|
||||
/* move layer coord for 1d arrays. */
|
||||
coords[2] = coords[1];
|
||||
coords[1] = coord_zero;
|
||||
}
|
||||
|
||||
uint32_t samp_base_index = 0, tex_base_index = 0;
|
||||
if (!sampler_deref_instr) {
|
||||
int samp_src_index = nir_tex_instr_src_index(instr, nir_tex_src_sampler_handle);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue