nvc0/ir: add support for INVOCATIONID system value
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 24 Apr 2014 02:34:29 +0000 (22:34 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 26 Apr 2014 16:01:13 +0000 (12:01 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
src/gallium/drivers/nouveau/nvc0/nvc0_program.c

index 2fe559124901024f5f7ff9f81bf821252a1c831d..d7a9c2c7d8cea8b232754f765e329bf5758eb11a 100644 (file)
@@ -71,7 +71,6 @@ struct nv50_ir_varying
 
 #define NV50_SEMANTIC_CLIPDISTANCE  (TGSI_SEMANTIC_COUNT + 0)
 #define NV50_SEMANTIC_VIEWPORTINDEX (TGSI_SEMANTIC_COUNT + 4)
-#define NV50_SEMANTIC_INVOCATIONID  (TGSI_SEMANTIC_COUNT + 6)
 #define NV50_SEMANTIC_TESSFACTOR    (TGSI_SEMANTIC_COUNT + 7)
 #define NV50_SEMANTIC_TESSCOORD     (TGSI_SEMANTIC_COUNT + 8)
 #define NV50_SEMANTIC_COUNT         (TGSI_SEMANTIC_COUNT + 10)
index 2c302a7fe1a5dbdd93cebd249c53a4cba2c39b32..e076e72f66c544bd409f33aa50fad5d539e6d509 100644 (file)
@@ -349,6 +349,7 @@ static nv50_ir::SVSemantic translateSysVal(uint sysval)
    case TGSI_SEMANTIC_SAMPLEID:   return nv50_ir::SV_SAMPLE_INDEX;
    case TGSI_SEMANTIC_SAMPLEPOS:  return nv50_ir::SV_SAMPLE_POS;
    case TGSI_SEMANTIC_SAMPLEMASK: return nv50_ir::SV_SAMPLE_MASK;
+   case TGSI_SEMANTIC_INVOCATIONID: return nv50_ir::SV_INVOCATION_ID;
    default:
       assert(0);
       return nv50_ir::SV_CLOCK;
index 1df84f3cc5dcf6d8a835f38680281e254b32889a..1d59fc4cff0c635ff97fe7692546bf108ffa367f 100644 (file)
@@ -51,7 +51,6 @@ nvc0_shader_input_address(unsigned sn, unsigned si, unsigned ubase)
    case TGSI_SEMANTIC_VERTEXID:     return 0x2fc;
    case TGSI_SEMANTIC_TEXCOORD:     return 0x300 + si * 0x10;
    case TGSI_SEMANTIC_FACE:         return 0x3fc;
-   case NV50_SEMANTIC_INVOCATIONID: return ~0;
    default:
       assert(!"invalid TGSI input semantic");
       return ~0;