oCol[0] = ureg_saturate(ureg_DECL_output(ureg, TGSI_SEMANTIC_COLOR, 0));
oCol[1] = ureg_saturate(ureg_DECL_output(ureg, TGSI_SEMANTIC_COLOR, 1));
if (key->fog || key->passthrough & (1 << NINE_DECLUSAGE_FOG)) {
- oFog = ureg_DECL_output(ureg, TGSI_SEMANTIC_FOG, 0);
+ oFog = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 16);
oFog = ureg_writemask(oFog, TGSI_WRITEMASK_X);
}
struct ureg_src input;
struct ureg_dst output;
input = vs->aWgt;
- output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 18);
+ output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 19);
ureg_MOV(ureg, output, input);
}
if (key->passthrough & (1 << NINE_DECLUSAGE_BLENDINDICES)) {
struct ureg_src input;
struct ureg_dst output;
input = vs->aInd;
- output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 19);
+ output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 20);
ureg_MOV(ureg, output, input);
}
if (key->passthrough & (1 << NINE_DECLUSAGE_NORMAL)) {
struct ureg_src input;
struct ureg_dst output;
input = vs->aNrm;
- output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 20);
+ output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 21);
ureg_MOV(ureg, output, input);
}
if (key->passthrough & (1 << NINE_DECLUSAGE_TANGENT)) {
struct ureg_src input;
struct ureg_dst output;
input = build_vs_add_input(vs, NINE_DECLUSAGE_TANGENT);
- output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 21);
+ output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 22);
ureg_MOV(ureg, output, input);
}
if (key->passthrough & (1 << NINE_DECLUSAGE_BINORMAL)) {
struct ureg_src input;
struct ureg_dst output;
input = build_vs_add_input(vs, NINE_DECLUSAGE_BINORMAL);
- output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 22);
+ output = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 23);
ureg_MOV(ureg, output, input);
}
if (key->passthrough & (1 << NINE_DECLUSAGE_FOG)) {
ureg_MOV(ureg, ureg_writemask(oCol, TGSI_WRITEMASK_W), ps.rCurSrc);
} else
if (key->fog) {
- struct ureg_src vFog = ureg_DECL_fs_input(ureg, TGSI_SEMANTIC_FOG, 0, TGSI_INTERPOLATE_PERSPECTIVE);
+ struct ureg_src vFog = ureg_DECL_fs_input(ureg, TGSI_SEMANTIC_GENERIC, 16, TGSI_INTERPOLATE_PERSPECTIVE);
ureg_LRP(ureg, ureg_writemask(oCol, TGSI_WRITEMASK_XYZ), _XXXX(vFog), ps.rCurSrc, _CONST(21));
ureg_MOV(ureg, ureg_writemask(oCol, TGSI_WRITEMASK_W), ps.rCurSrc);
} else {
case 1:
if (ureg_dst_is_undef(tx->regs.oFog))
tx->regs.oFog =
- ureg_saturate(ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_FOG, 0));
+ ureg_saturate(ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_GENERIC, 16));
dst = tx->regs.oFog;
break;
case 2:
* are close together or low.
*
*
- * POSITION >= 1: 10 * index + 6
- * COLOR >= 2: 10 * (index-1) + 7
+ * POSITION >= 1: 10 * index + 7
+ * COLOR >= 2: 10 * (index-1) + 8
+ * FOG: 16
* TEXCOORD[0..15]: index
- * BLENDWEIGHT: 10 * index + 18
- * BLENDINDICES: 10 * index + 19
- * NORMAL: 10 * index + 20
- * TANGENT: 10 * index + 21
- * BINORMAL: 10 * index + 22
- * TESSFACTOR: 10 * index + 23
+ * BLENDWEIGHT: 10 * index + 19
+ * BLENDINDICES: 10 * index + 20
+ * NORMAL: 10 * index + 21
+ * TANGENT: 10 * index + 22
+ * BINORMAL: 10 * index + 23
+ * TESSFACTOR: 10 * index + 24
*/
switch (dcl->usage) {
sem->Index = 0;
} else {
sem->Name = TGSI_SEMANTIC_GENERIC;
- sem->Index = 10 * index + 6;
+ sem->Index = 10 * index + 7;
}
break;
case D3DDECLUSAGE_COLOR:
sem->Index = index;
} else {
sem->Name = TGSI_SEMANTIC_GENERIC;
- sem->Index = 10 * (index-1) + 7;
+ sem->Index = 10 * (index-1) + 8;
}
break;
case D3DDECLUSAGE_FOG:
assert(index == 0);
- sem->Name = TGSI_SEMANTIC_FOG;
- sem->Index = 0;
+ sem->Name = TGSI_SEMANTIC_GENERIC;
+ sem->Index = 16;
break;
case D3DDECLUSAGE_PSIZE:
assert(index == 0);
break;
case D3DDECLUSAGE_BLENDWEIGHT:
sem->Name = TGSI_SEMANTIC_GENERIC;
- sem->Index = 10 * index + 18;
+ sem->Index = 10 * index + 19;
break;
case D3DDECLUSAGE_BLENDINDICES:
sem->Name = TGSI_SEMANTIC_GENERIC;
- sem->Index = 10 * index + 19;
+ sem->Index = 10 * index + 20;
break;
case D3DDECLUSAGE_NORMAL:
sem->Name = TGSI_SEMANTIC_GENERIC;
- sem->Index = 10 * index + 20;
+ sem->Index = 10 * index + 21;
break;
case D3DDECLUSAGE_TANGENT:
sem->Name = TGSI_SEMANTIC_GENERIC;
- sem->Index = 10 * index + 21;
+ sem->Index = 10 * index + 22;
break;
case D3DDECLUSAGE_BINORMAL:
sem->Name = TGSI_SEMANTIC_GENERIC;
- sem->Index = 10 * index + 22;
+ sem->Index = 10 * index + 23;
break;
case D3DDECLUSAGE_TESSFACTOR:
sem->Name = TGSI_SEMANTIC_GENERIC;
- sem->Index = 10 * index + 23;
+ sem->Index = 10 * index + 24;
break;
case D3DDECLUSAGE_SAMPLE:
sem->Name = TGSI_SEMANTIC_COUNT;
ureg_MUL(ureg, fog_factor, tx_src_scalar(fog_factor), ureg_imm1f(ureg, -1.442695f));
ureg_EX2(ureg, fog_factor, tx_src_scalar(fog_factor));
} else {
- fog_vs = ureg_scalar(ureg_DECL_fs_input(ureg, TGSI_SEMANTIC_FOG, 0,
+ fog_vs = ureg_scalar(ureg_DECL_fs_input(ureg, TGSI_SEMANTIC_GENERIC, 16,
TGSI_INTERPOLATE_PERSPECTIVE),
TGSI_SWIZZLE_X);
ureg_MOV(ureg, fog_factor, fog_vs);
}
if (IS_VS && tx->version.major < 3 && ureg_dst_is_undef(tx->regs.oFog) && info->fog_enable) {
- tx->regs.oFog = ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_FOG, 0);
+ tx->regs.oFog = ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_GENERIC, 16);
ureg_MOV(tx->ureg, ureg_writemask(tx->regs.oFog, TGSI_WRITEMASK_X), ureg_imm1f(tx->ureg, 0.0f));
}