diff options
author | Jason Ekstrand <[email protected]> | 2017-03-02 19:27:57 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-03-14 07:36:20 -0700 |
commit | 0bf0365393497d2d29fd24b4c42f17d5ad9bd4e2 (patch) | |
tree | 955411912c06431b0a672ad2d351d5cb2611aef0 /src/compiler/nir | |
parent | fffa4111dfe6eb10fb478967ca0798331dfd525f (diff) |
nir/lower_tex: Use tex_instr_dest_size for txs destinations
Using coord_components of the source texture is correct for everything
except cube maps where it's off by one.
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_lower_tex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index 66e231762f8..213406aaa98 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -172,7 +172,8 @@ get_texture_size(nir_builder *b, nir_tex_instr *tex) txs->src[0].src = nir_src_for_ssa(nir_imm_int(b, 0)); txs->src[0].src_type = nir_tex_src_lod; - nir_ssa_dest_init(&txs->instr, &txs->dest, tex->coord_components, 32, NULL); + nir_ssa_dest_init(&txs->instr, &txs->dest, + nir_tex_instr_dest_size(txs), 32, NULL); nir_builder_instr_insert(b, &txs->instr); return nir_i2f(b, &txs->dest.ssa); |