diff options
author | Eric Anholt <[email protected]> | 2015-06-19 19:47:44 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-06-20 00:16:32 -0700 |
commit | c00903867417f1522047b7c50ea9248e1aa2f50c (patch) | |
tree | f78ac953dae6e1c8e447abc9b4dd9e332fafe7c2 /src | |
parent | bb107110a4d97191841985076dd9f2fbd0937dfc (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index bb45eb1288e..ba47c51d9bd 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -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); |