mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 11:58:10 +02:00
vc4: Use a defined t value for 1D textures.
This doesn't fix the broken 1D cases of texsubimage, but it does prevent segfaulting when dumping the QIR code generated in fbo-1d.
This commit is contained in:
parent
bb107110a4
commit
c009038674
1 changed files with 3 additions and 1 deletions
|
|
@ -325,7 +325,9 @@ ntq_emit_tex(struct vc4_compile *c, nir_tex_instr *instr)
|
|||
switch (instr->src[i].src_type) {
|
||||
case nir_tex_src_coord:
|
||||
s = ntq_get_src(c, instr->src[i].src, 0);
|
||||
if (instr->sampler_dim != GLSL_SAMPLER_DIM_1D)
|
||||
if (instr->sampler_dim == GLSL_SAMPLER_DIM_1D)
|
||||
t = qir_uniform_f(c, 0.5);
|
||||
else
|
||||
t = ntq_get_src(c, instr->src[i].src, 1);
|
||||
if (instr->sampler_dim == GLSL_SAMPLER_DIM_CUBE)
|
||||
r = ntq_get_src(c, instr->src[i].src, 2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue