tgsi/exec: fix system value handling.
a) SysSemanticToIndex needs to be indexed with the semantic name not the decl->Declaration.Semantic. b) doing this in run is too late, as the mappings are all setup prior to run in the execs. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
4040fff81d
commit
9013d9267c
|
@ -964,6 +964,11 @@ tgsi_exec_machine_bind_shader(
|
||||||
++mach->NumOutputs;
|
++mach->NumOutputs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (parse.FullToken.FullDeclaration.Declaration.File == TGSI_FILE_SYSTEM_VALUE) {
|
||||||
|
const struct tgsi_full_declaration *decl = &parse.FullToken.FullDeclaration;
|
||||||
|
mach->SysSemanticToIndex[decl->Semantic.Name] = decl->Range.First;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(declarations + numDeclarations,
|
memcpy(declarations + numDeclarations,
|
||||||
&parse.FullToken.FullDeclaration,
|
&parse.FullToken.FullDeclaration,
|
||||||
sizeof(declarations[0]));
|
sizeof(declarations[0]));
|
||||||
|
@ -2777,9 +2782,6 @@ exec_declaration(struct tgsi_exec_machine *mach,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decl->Declaration.File == TGSI_FILE_SYSTEM_VALUE) {
|
|
||||||
mach->SysSemanticToIndex[decl->Declaration.Semantic] = decl->Range.First;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef void (* micro_unary_op)(union tgsi_exec_channel *dst,
|
typedef void (* micro_unary_op)(union tgsi_exec_channel *dst,
|
||||||
|
|
Loading…
Reference in New Issue