tgsi/build: pass Memory.Texture and .Format through tgsi_build_full_instruction
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 28 Apr 2016 22:34:40 +0000 (17:34 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 29 Apr 2016 16:39:32 +0000 (11:39 -0500)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/auxiliary/tgsi/tgsi_build.c

index 7e30bb646e2316378055b85c7b36ffd4311d830f..d525c8ff34e91b07f5fecf35e42156b0f34e302f 100644 (file)
@@ -791,6 +791,8 @@ tgsi_default_instruction_memory( void )
 static struct tgsi_instruction_memory
 tgsi_build_instruction_memory(
    unsigned qualifier,
+   unsigned texture,
+   unsigned format,
    struct tgsi_token *prev_token,
    struct tgsi_instruction *instruction,
    struct tgsi_header *header )
@@ -798,8 +800,8 @@ tgsi_build_instruction_memory(
    struct tgsi_instruction_memory instruction_memory;
 
    instruction_memory.Qualifier = qualifier;
-   instruction_memory.Texture = 0;
-   instruction_memory.Format = 0;
+   instruction_memory.Texture = texture;
+   instruction_memory.Format = format;
    instruction_memory.Padding = 0;
    instruction->Memory = 1;
 
@@ -1177,6 +1179,8 @@ tgsi_build_full_instruction(
 
       *instruction_memory = tgsi_build_instruction_memory(
          full_inst->Memory.Qualifier,
+         full_inst->Memory.Texture,
+         full_inst->Memory.Format,
          prev_token,
          instruction,
          header );