summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_build.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-05-17 10:51:59 +0200
committerSamuel Pitoiset <[email protected]>2017-05-18 21:48:16 +0200
commit5cb2eee5573b69311da95454be1431e536212fbb (patch)
treede5809f80ab973e510c624679b45d9c4a06e6c7b /src/gallium/auxiliary/tgsi/tgsi_build.c
parentac3f6bf608a10f661ac177d63d5fbdcd11b6c1c2 (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_build.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 39c20b5e886..00843241f88 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -720,6 +720,7 @@ tgsi_default_instruction_texture( void )
instruction_texture.Texture = TGSI_TEXTURE_UNKNOWN;
instruction_texture.NumOffsets = 0;
+ instruction_texture.ReturnType = TGSI_RETURN_TYPE_UNKNOWN;
instruction_texture.Padding = 0;
return instruction_texture;
@@ -729,6 +730,7 @@ static struct tgsi_instruction_texture
tgsi_build_instruction_texture(
unsigned texture,
unsigned num_offsets,
+ unsigned return_type,
struct tgsi_token *prev_token,
struct tgsi_instruction *instruction,
struct tgsi_header *header )
@@ -737,6 +739,7 @@ tgsi_build_instruction_texture(
instruction_texture.Texture = texture;
instruction_texture.NumOffsets = num_offsets;
+ instruction_texture.ReturnType = return_type;
instruction_texture.Padding = 0;
instruction->Texture = 1;
@@ -1090,7 +1093,8 @@ tgsi_build_full_instruction(
*instruction_texture = tgsi_build_instruction_texture(
full_inst->Texture.Texture,
- full_inst->Texture.NumOffsets,
+ full_inst->Texture.NumOffsets,
+ full_inst->Texture.ReturnType,
prev_token,
instruction,
header );