summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-08-14 09:45:54 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-08-14 09:45:54 +0000
commit4c58069f5013f0a621503525f7d5193bfe9976b3 (patch)
treebd8f8a08b889e9a8b99c9de01ae12459d527ea6d /lib/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c
parent5caa025e6b62d0456faad86c89f239a14d1eaadb (diff)
Import Mesa 17.1.6
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c')
-rw-r--r--lib/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c84
1 files changed, 16 insertions, 68 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c
index d525c8ff3..39c20b5e8 100644
--- a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -239,7 +239,10 @@ tgsi_default_declaration_semantic( void )
ds.Name = TGSI_SEMANTIC_POSITION;
ds.Index = 0;
- ds.Padding = 0;
+ ds.StreamX = 0;
+ ds.StreamY = 0;
+ ds.StreamZ = 0;
+ ds.StreamW = 0;
return ds;
}
@@ -248,6 +251,10 @@ static struct tgsi_declaration_semantic
tgsi_build_declaration_semantic(
unsigned semantic_name,
unsigned semantic_index,
+ unsigned streamx,
+ unsigned streamy,
+ unsigned streamz,
+ unsigned streamw,
struct tgsi_declaration *declaration,
struct tgsi_header *header )
{
@@ -258,7 +265,10 @@ tgsi_build_declaration_semantic(
ds.Name = semantic_name;
ds.Index = semantic_index;
- ds.Padding = 0;
+ ds.StreamX = streamx;
+ ds.StreamY = streamy;
+ ds.StreamZ = streamz;
+ ds.StreamW = streamw;
declaration_grow( declaration, header );
@@ -461,6 +471,10 @@ tgsi_build_full_declaration(
*ds = tgsi_build_declaration_semantic(
full_decl->Semantic.Name,
full_decl->Semantic.Index,
+ full_decl->Semantic.StreamX,
+ full_decl->Semantic.StreamY,
+ full_decl->Semantic.StreamZ,
+ full_decl->Semantic.StreamW,
declaration,
header );
}
@@ -623,7 +637,6 @@ tgsi_default_instruction( void )
instruction.NrTokens = 0;
instruction.Opcode = TGSI_OPCODE_MOV;
instruction.Saturate = 0;
- instruction.Predicate = 0;
instruction.NumDstRegs = 1;
instruction.NumSrcRegs = 1;
instruction.Label = 0;
@@ -637,7 +650,6 @@ tgsi_default_instruction( void )
static struct tgsi_instruction
tgsi_build_instruction(unsigned opcode,
unsigned saturate,
- unsigned predicate,
unsigned num_dst_regs,
unsigned num_src_regs,
struct tgsi_header *header)
@@ -652,7 +664,6 @@ tgsi_build_instruction(unsigned opcode,
instruction = tgsi_default_instruction();
instruction.Opcode = opcode;
instruction.Saturate = saturate;
- instruction.Predicate = predicate;
instruction.NumDstRegs = num_dst_regs;
instruction.NumSrcRegs = num_src_regs;
@@ -673,47 +684,6 @@ instruction_grow(
header_bodysize_grow( header );
}
-struct tgsi_instruction_predicate
-tgsi_default_instruction_predicate(void)
-{
- struct tgsi_instruction_predicate instruction_predicate;
-
- instruction_predicate.SwizzleX = TGSI_SWIZZLE_X;
- instruction_predicate.SwizzleY = TGSI_SWIZZLE_Y;
- instruction_predicate.SwizzleZ = TGSI_SWIZZLE_Z;
- instruction_predicate.SwizzleW = TGSI_SWIZZLE_W;
- instruction_predicate.Negate = 0;
- instruction_predicate.Index = 0;
- instruction_predicate.Padding = 0;
-
- return instruction_predicate;
-}
-
-static struct tgsi_instruction_predicate
-tgsi_build_instruction_predicate(int index,
- unsigned negate,
- unsigned swizzleX,
- unsigned swizzleY,
- unsigned swizzleZ,
- unsigned swizzleW,
- struct tgsi_instruction *instruction,
- struct tgsi_header *header)
-{
- struct tgsi_instruction_predicate instruction_predicate;
-
- instruction_predicate = tgsi_default_instruction_predicate();
- instruction_predicate.SwizzleX = swizzleX;
- instruction_predicate.SwizzleY = swizzleY;
- instruction_predicate.SwizzleZ = swizzleZ;
- instruction_predicate.SwizzleW = swizzleW;
- instruction_predicate.Negate = negate;
- instruction_predicate.Index = index;
-
- instruction_grow(instruction, header);
-
- return instruction_predicate;
-}
-
static struct tgsi_instruction_label
tgsi_default_instruction_label( void )
{
@@ -1052,7 +1022,6 @@ tgsi_default_full_instruction( void )
unsigned i;
full_instruction.Instruction = tgsi_default_instruction();
- full_instruction.Predicate = tgsi_default_instruction_predicate();
full_instruction.Label = tgsi_default_instruction_label();
full_instruction.Texture = tgsi_default_instruction_texture();
full_instruction.Memory = tgsi_default_instruction_memory();
@@ -1088,32 +1057,11 @@ tgsi_build_full_instruction(
*instruction = tgsi_build_instruction(full_inst->Instruction.Opcode,
full_inst->Instruction.Saturate,
- full_inst->Instruction.Predicate,
full_inst->Instruction.NumDstRegs,
full_inst->Instruction.NumSrcRegs,
header);
prev_token = (struct tgsi_token *) instruction;
- if (full_inst->Instruction.Predicate) {
- struct tgsi_instruction_predicate *instruction_predicate;
-
- if (maxsize <= size) {
- return 0;
- }
- instruction_predicate = (struct tgsi_instruction_predicate *)&tokens[size];
- size++;
-
- *instruction_predicate =
- tgsi_build_instruction_predicate(full_inst->Predicate.Index,
- full_inst->Predicate.Negate,
- full_inst->Predicate.SwizzleX,
- full_inst->Predicate.SwizzleY,
- full_inst->Predicate.SwizzleZ,
- full_inst->Predicate.SwizzleW,
- instruction,
- header);
- }
-
if (full_inst->Instruction.Label) {
struct tgsi_instruction_label *instruction_label;