From dfcf4204120d3fc8f7d8cda818e1c652e091cc35 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Sun, 7 Feb 2016 13:28:01 -0500 Subject: st/glsl_to_tgsi: provide Texture and Format information for image ops MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Ilia Mirkin Reviewed-by: Marek Olšák --- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 12 +++++++++--- src/gallium/auxiliary/tgsi/tgsi_ureg.h | 8 ++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'src/gallium/auxiliary/tgsi') diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index e1a72786476..ab1d03458ef 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -1242,7 +1242,9 @@ ureg_emit_texture_offset(struct ureg_program *ureg, void ureg_emit_memory(struct ureg_program *ureg, unsigned extended_token, - unsigned qualifier) + unsigned qualifier, + unsigned texture, + unsigned format) { union tgsi_any_token *out, *insn; @@ -1253,6 +1255,8 @@ ureg_emit_memory(struct ureg_program *ureg, out[0].value = 0; out[0].insn_memory.Qualifier = qualifier; + out[0].insn_memory.Texture = texture; + out[0].insn_memory.Format = format; } void @@ -1413,7 +1417,9 @@ ureg_memory_insn(struct ureg_program *ureg, unsigned nr_dst, const struct ureg_src *src, unsigned nr_src, - unsigned qualifier) + unsigned qualifier, + unsigned texture, + unsigned format) { struct ureg_emit_insn_result insn; unsigned i; @@ -1430,7 +1436,7 @@ ureg_memory_insn(struct ureg_program *ureg, nr_dst, nr_src); - ureg_emit_memory(ureg, insn.extended_token, qualifier); + ureg_emit_memory(ureg, insn.extended_token, qualifier, texture, format); for (i = 0; i < nr_dst; i++) ureg_emit_dst(ureg, dst[i]); diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index 6a3b5ddf017..04a62a6e160 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h @@ -541,7 +541,9 @@ ureg_memory_insn(struct ureg_program *ureg, unsigned nr_dst, const struct ureg_src *src, unsigned nr_src, - unsigned qualifier); + unsigned qualifier, + unsigned texture, + unsigned format); /*********************************************************************** * Internal instruction helpers, don't call these directly: @@ -582,7 +584,9 @@ ureg_emit_texture_offset(struct ureg_program *ureg, void ureg_emit_memory(struct ureg_program *ureg, unsigned insn_token, - unsigned qualifier); + unsigned qualifier, + unsigned texture, + unsigned format); void ureg_emit_dst( struct ureg_program *ureg, -- cgit v1.2.3