diff options
author | Dave Airlie <airlied@redhat.com> | 2016-04-26 11:14:24 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-04-26 14:36:37 +1000 |
commit | 8ecfb4dbb27a7ad72440fa6adc445628105383cc (patch) | |
tree | 3acd3a8d19576f57571ac4b07da2bd15d1437801 /src | |
parent | ae11b66d0351ca7d2367aa6ce8acc015c27a13f0 (diff) |
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.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index f582230b0be..a70a7d7e999 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -964,6 +964,11 @@ tgsi_exec_machine_bind_shader( ++mach->NumOutputs; } } + 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, &parse.FullToken.FullDeclaration, 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, |