summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-07-20 12:17:46 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2015-07-23 03:33:08 -0400
commit59438a4d0e8ffd7cc4c741d00eff0c87d9813b5f (patch)
tree483c33073c2250e7d200f243ef7ba6bfb753543c /src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
parent4b2a58a523715c28c96267286054baf511e15303 (diff)
nvc0/ir: mark varyings as per-patch based on semantic name
Also add proper handling for PATCH semantics Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 2fcf41d6913..2b7e9ebbcca 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1036,6 +1036,13 @@ bool Source::scanDeclaration(const struct tgsi_full_declaration *decl)
if (decl->Interp.Location || info->io.sampleInterp)
info->in[i].centroid = 1;
}
+
+ if (sn == TGSI_SEMANTIC_PATCH ||
+ sn == TGSI_SEMANTIC_TESSOUTER ||
+ sn == TGSI_SEMANTIC_TESSINNER)
+ info->in[i].patch = 1;
+ if (sn == TGSI_SEMANTIC_PATCH)
+ info->numPatchConstants = MAX2(info->numPatchConstants, si + 1);
}
}
break;
@@ -1070,6 +1077,13 @@ bool Source::scanDeclaration(const struct tgsi_full_declaration *decl)
case TGSI_SEMANTIC_VIEWPORT_INDEX:
info->io.viewportId = i;
break;
+ case TGSI_SEMANTIC_PATCH:
+ info->numPatchConstants = MAX2(info->numPatchConstants, si + 1);
+ /* fallthrough */
+ case TGSI_SEMANTIC_TESSOUTER:
+ case TGSI_SEMANTIC_TESSINNER:
+ info->out[i].patch = 1;
+ break;
default:
break;
}