declaration.Invariant = 0;
declaration.Local = 0;
declaration.Array = 0;
+ declaration.Atomic = 0;
+ declaration.MemType = TGSI_MEMORY_TYPE_GLOBAL;
declaration.Padding = 0;
return declaration;
unsigned invariant,
unsigned local,
unsigned array,
+ unsigned atomic,
+ unsigned mem_type,
struct tgsi_header *header )
{
struct tgsi_declaration declaration;
declaration.Invariant = invariant;
declaration.Local = local;
declaration.Array = array;
+ declaration.Atomic = atomic;
+ declaration.MemType = mem_type;
header_bodysize_grow( header );
return declaration;
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;
}
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 )
{
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 );
full_decl->Declaration.Invariant,
full_decl->Declaration.Local,
full_decl->Declaration.Array,
+ full_decl->Declaration.Atomic,
+ full_decl->Declaration.MemType,
header );
if (maxsize <= size)
*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 );
}
struct tgsi_instruction_memory instruction_memory;
instruction_memory.Qualifier = 0;
+ instruction_memory.Texture = 0;
+ instruction_memory.Format = 0;
instruction_memory.Padding = 0;
return instruction_memory;
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 )
struct tgsi_instruction_memory instruction_memory;
instruction_memory.Qualifier = qualifier;
+ instruction_memory.Texture = texture;
+ instruction_memory.Format = format;
instruction_memory.Padding = 0;
instruction->Memory = 1;
*instruction_memory = tgsi_build_instruction_memory(
full_inst->Memory.Qualifier,
+ full_inst->Memory.Texture,
+ full_inst->Memory.Format,
prev_token,
instruction,
header );
return size;
}
+
+struct tgsi_full_src_register
+tgsi_full_src_register_from_dst(const struct tgsi_full_dst_register *dst)
+{
+ struct tgsi_full_src_register src;
+ src.Register = tgsi_default_src_register();
+ src.Register.File = dst->Register.File;
+ src.Register.Indirect = dst->Register.Indirect;
+ src.Register.Dimension = dst->Register.Dimension;
+ src.Register.Index = dst->Register.Index;
+ src.Indirect = dst->Indirect;
+ src.Dimension = dst->Dimension;
+ src.DimIndirect = dst->DimIndirect;
+ return src;
+}