diff options
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_program.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_program.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_program.c b/src/gallium/drivers/nvc0/nvc0_program.c index 2f4eae8f052..2f1b41704a5 100644 --- a/src/gallium/drivers/nvc0/nvc0_program.c +++ b/src/gallium/drivers/nvc0/nvc0_program.c @@ -27,33 +27,6 @@ #include "nv50/codegen/nv50_ir_driver.h" #include "nve4_compute.h" -/* If only they told use the actual semantic instead of just GENERIC ... */ -static void -nvc0_mesa_varying_hack(struct nv50_ir_varying *var) -{ - unsigned c; - - if (var->sn != TGSI_SEMANTIC_GENERIC) - return; - - if (var->si <= 7) /* gl_TexCoord */ - for (c = 0; c < 4; ++c) - var->slot[c] = (0x300 + var->si * 0x10 + c * 0x4) / 4; - else - if (var->si == 9) /* gl_PointCoord */ - for (c = 0; c < 4; ++c) - var->slot[c] = (0x2e0 + c * 0x4) / 4; - else - if (var->si <= 39) - for (c = 0; c < 4; ++c) /* move down user varyings (first has index 8) */ - var->slot[c] -= 0x80 / 4; - else { - NOUVEAU_ERR("too many varyings / invalid location: %u !\n", var->si); - for (c = 0; c < 4; ++c) - var->slot[c] = (0x270 + c * 0x4) / 4; /* catch invalid indices */ - } -} - static uint32_t nvc0_shader_input_address(unsigned sn, unsigned si, unsigned ubase) { @@ -69,11 +42,11 @@ nvc0_shader_input_address(unsigned sn, unsigned si, unsigned ubase) case NV50_SEMANTIC_CLIPDISTANCE: return 0x2c0 + si * 0x4; case TGSI_SEMANTIC_CLIPDIST: return 0x2c0 + si * 0x10; case TGSI_SEMANTIC_CLIPVERTEX: return 0x260; - case NV50_SEMANTIC_POINTCOORD: return 0x2e0; + case TGSI_SEMANTIC_PCOORD: return 0x2e0; case NV50_SEMANTIC_TESSCOORD: return 0x2f0; case TGSI_SEMANTIC_INSTANCEID: return 0x2f8; case TGSI_SEMANTIC_VERTEXID: return 0x2fc; - case NV50_SEMANTIC_TEXCOORD: return 0x300 + si * 0x10; + case TGSI_SEMANTIC_TEXCOORD: return 0x300 + si * 0x10; case TGSI_SEMANTIC_FACE: return 0x3fc; case NV50_SEMANTIC_INVOCATIONID: return ~0; default: @@ -99,7 +72,7 @@ nvc0_shader_output_address(unsigned sn, unsigned si, unsigned ubase) case NV50_SEMANTIC_CLIPDISTANCE: return 0x2c0 + si * 0x4; case TGSI_SEMANTIC_CLIPDIST: return 0x2c0 + si * 0x10; case TGSI_SEMANTIC_CLIPVERTEX: return 0x260; - case NV50_SEMANTIC_TEXCOORD: return 0x300 + si * 0x10; + case TGSI_SEMANTIC_TEXCOORD: return 0x300 + si * 0x10; case TGSI_SEMANTIC_EDGEFLAG: return ~0; default: assert(!"invalid TGSI output semantic"); @@ -149,8 +122,6 @@ nvc0_sp_assign_input_slots(struct nv50_ir_prog_info *info) for (c = 0; c < 4; ++c) info->in[i].slot[c] = (offset + c * 0x4) / 4; - - nvc0_mesa_varying_hack(&info->in[i]); } return 0; @@ -194,8 +165,6 @@ nvc0_sp_assign_output_slots(struct nv50_ir_prog_info *info) for (c = 0; c < 4; ++c) info->out[i].slot[c] = (offset + c * 0x4) / 4; - - nvc0_mesa_varying_hack(&info->out[i]); } return 0; |