summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/codegen
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-01-08 00:12:35 +0100
committerChristoph Bumiller <[email protected]>2012-01-10 00:39:35 +0100
commit7fd802b96cd916e5cadf7eda7329105169dd29bb (patch)
treeb3a0f0d2faf1ccb9ab43c64fdc989d1ffd30816c /src/gallium/drivers/nv50/codegen
parentca03372657f73a30b7b2f827d6f76473e57487ee (diff)
nv50/ir: handle TGSI_SEMANTIC_VERTEXID
Diffstat (limited to 'src/gallium/drivers/nv50/codegen')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_driver.h1
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_from_sm4.cpp6
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp3
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_driver.h b/src/gallium/drivers/nv50/codegen/nv50_ir_driver.h
index 4baef537370..73fb023c378 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_driver.h
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_driver.h
@@ -71,7 +71,6 @@ struct nv50_ir_varying
#define NV50_SEMANTIC_CLIPDISTANCE (TGSI_SEMANTIC_COUNT + 0)
#define NV50_SEMANTIC_TEXCOORD (TGSI_SEMANTIC_COUNT + 1)
#define NV50_SEMANTIC_POINTCOORD (TGSI_SEMANTIC_COUNT + 2)
-#define NV50_SEMANTIC_VERTEXID (TGSI_SEMANTIC_COUNT + 3)
#define NV50_SEMANTIC_VIEWPORTINDEX (TGSI_SEMANTIC_COUNT + 4)
#define NV50_SEMANTIC_LAYER (TGSI_SEMANTIC_COUNT + 5)
#define NV50_SEMANTIC_INVOCATIONID (TGSI_SEMANTIC_COUNT + 6)
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_from_sm4.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_from_sm4.cpp
index 11720d2db67..4f3189eade0 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_sm4.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_sm4.cpp
@@ -18,7 +18,7 @@ static nv50_ir::SVSemantic irSemantic(unsigned sn)
case NV50_SEMANTIC_VIEWPORTINDEX: return nv50_ir::SV_VIEWPORT_INDEX;
case TGSI_SEMANTIC_PSIZE: return nv50_ir::SV_POINT_SIZE;
case NV50_SEMANTIC_CLIPDISTANCE: return nv50_ir::SV_CLIP_DISTANCE;
- case NV50_SEMANTIC_VERTEXID: return nv50_ir::SV_VERTEX_ID;
+ case TGSI_SEMANTIC_VERTEXID: return nv50_ir::SV_VERTEX_ID;
case TGSI_SEMANTIC_INSTANCEID: return nv50_ir::SV_INSTANCE_ID;
case TGSI_SEMANTIC_PRIMID: return nv50_ir::SV_PRIMITIVE_ID;
case NV50_SEMANTIC_TESSFACTOR: return nv50_ir::SV_TESS_FACTOR;
@@ -652,7 +652,7 @@ Converter::tgsiSemantic(SVSemantic sv, int index)
case SV_VIEWPORT_INDEX: return NV50_SEMANTIC_VIEWPORTINDEX;
case SV_POINT_SIZE: return TGSI_SEMANTIC_PSIZE;
case SV_CLIP_DISTANCE: return NV50_SEMANTIC_CLIPDISTANCE;
- case SV_VERTEX_ID: return NV50_SEMANTIC_VERTEXID;
+ case SV_VERTEX_ID: return TGSI_SEMANTIC_VERTEXID;
case SV_INSTANCE_ID: return TGSI_SEMANTIC_INSTANCEID;
case SV_PRIMITIVE_ID: return TGSI_SEMANTIC_PRIMID;
case SV_TESS_FACTOR: return NV50_SEMANTIC_TESSFACTOR;
@@ -712,7 +712,7 @@ Converter::parseSignature()
info.in[r].sn = TGSI_SEMANTIC_POSITION;
break;
case D3D_NAME_VERTEX_ID:
- info.in[r].sn = NV50_SEMANTIC_VERTEXID;
+ info.in[r].sn = TGSI_SEMANTIC_VERTEXID;
break;
case D3D_NAME_PRIMITIVE_ID:
info.in[r].sn = TGSI_SEMANTIC_PRIMID;
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 6678398cfb2..8b368953fa9 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
@@ -321,6 +321,7 @@ static nv50_ir::SVSemantic translateSysVal(uint sysval)
case TGSI_SEMANTIC_PSIZE: return nv50_ir::SV_POINT_SIZE;
case TGSI_SEMANTIC_PRIMID: return nv50_ir::SV_PRIMITIVE_ID;
case TGSI_SEMANTIC_INSTANCEID: return nv50_ir::SV_INSTANCE_ID;
+ case TGSI_SEMANTIC_VERTEXID: return nv50_ir::SV_VERTEX_ID;
default:
assert(0);
return nv50_ir::SV_CLOCK;
@@ -769,7 +770,7 @@ int Source::inferSysValDirection(unsigned sn) const
{
switch (sn) {
case TGSI_SEMANTIC_INSTANCEID:
-// case TGSI_SEMANTIC_VERTEXID:
+ case TGSI_SEMANTIC_VERTEXID:
return 1;
#if 0
case TGSI_SEMANTIC_LAYER: