diff options
author | Samuel Pitoiset <[email protected]> | 2017-05-17 10:51:59 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-05-18 21:48:16 +0200 |
commit | 5cb2eee5573b69311da95454be1431e536212fbb (patch) | |
tree | de5809f80ab973e510c624679b45d9c4a06e6c7b /src/gallium/auxiliary/tgsi/tgsi_ureg.c | |
parent | ac3f6bf608a10f661ac177d63d5fbdcd11b6c1c2 (diff) |
tgsi: store the sampler view type directly in the instruction
RadeonSI needs to do a special lowering for Gather4 with integer
formats, but with bindless samplers we just can't access the index.
Instead, store the return type in the instruction like the target.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_ureg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 9eb00d09194..5bd779728a4 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -1289,7 +1289,7 @@ ureg_fixup_label(struct ureg_program *ureg, void ureg_emit_texture(struct ureg_program *ureg, unsigned extended_token, - unsigned target, unsigned num_offsets) + unsigned target, unsigned return_type, unsigned num_offsets) { union tgsi_any_token *out, *insn; @@ -1301,6 +1301,7 @@ ureg_emit_texture(struct ureg_program *ureg, out[0].value = 0; out[0].insn_texture.Texture = target; out[0].insn_texture.NumOffsets = num_offsets; + out[0].insn_texture.ReturnType = return_type; } void @@ -1386,6 +1387,7 @@ ureg_tex_insn(struct ureg_program *ureg, const struct ureg_dst *dst, unsigned nr_dst, unsigned target, + unsigned return_type, const struct tgsi_texture_offset *texoffsets, unsigned nr_offset, const struct ureg_src *src, @@ -1407,7 +1409,8 @@ ureg_tex_insn(struct ureg_program *ureg, nr_dst, nr_src); - ureg_emit_texture( ureg, insn.extended_token, target, nr_offset ); + ureg_emit_texture( ureg, insn.extended_token, target, return_type, + nr_offset ); for (i = 0; i < nr_offset; i++) ureg_emit_texture_offset( ureg, &texoffsets[i]); |