summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/codegen
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-04-14 21:42:52 +0200
committerChristoph Bumiller <[email protected]>2012-04-14 21:54:04 +0200
commit0bbf1659df3adf51784bcb376e681c05f49b6070 (patch)
treec8a724a37d645e1d531c213124a134a46d739b49 /src/gallium/drivers/nv50/codegen
parent322bc7ed68ed92233c97168c036d0aa50c11a20e (diff)
nv50: hook up to new shader code generator
Diffstat (limited to 'src/gallium/drivers/nv50/codegen')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir.cpp1
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_driver.h1
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp3
3 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
index 048759060ad..1006985ab93 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
@@ -1051,6 +1051,7 @@ nv50_ir_init_prog_info(struct nv50_ir_prog_info *info)
}
info->io.clipDistance = 0xff;
info->io.pointSize = 0xff;
+ info->io.instanceId = 0xff;
info->io.vertexId = 0xff;
info->io.edgeFlagIn = 0xff;
info->io.edgeFlagOut = 0xff;
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_driver.h b/src/gallium/drivers/nv50/codegen/nv50_ir_driver.h
index dc42b8295e9..e734c5b03bd 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_driver.h
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_driver.h
@@ -164,6 +164,7 @@ struct nv50_ir_prog_info
uint8_t cullDistanceMask; /* clip distance mode (1 bit per output) */
int8_t genUserClip; /* request user clip planes for ClipVertex */
uint8_t pointSize; /* output index for PointSize */
+ uint8_t instanceId; /* system value index of InstanceID */
uint8_t vertexId; /* system value index of VertexID */
uint8_t edgeFlagIn;
uint8_t edgeFlagOut;
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
index 1cfaf3aefae..4530dc23715 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
@@ -859,6 +859,9 @@ bool Source::scanDeclaration(const struct tgsi_full_declaration *decl)
break;
case TGSI_FILE_SYSTEM_VALUE:
switch (sn) {
+ case TGSI_SEMANTIC_INSTANCEID:
+ info->io.instanceId = first;
+ break;
case TGSI_SEMANTIC_VERTEXID:
info->io.vertexId = first;
break;