Still need to produce decl instructions for vertex shaders...
const float *trans = draw->viewport.translate;
assert(count <= 4);
- assert(draw->vertex_shader.output_semantics[0] == TGSI_SEMANTIC_POSITION);
+ assert(draw->vertex_shader.output_semantic_name[0]
+ == TGSI_SEMANTIC_POSITION);
#ifdef DEBUG
memset( &machine, 0, sizeof( machine ) );
uint declarations[I915_PROGRAM_SIZE];
uint program[I915_PROGRAM_SIZE];
- uint input_semantic[PIPE_MAX_SHADER_INPUTS];
+ uint input_semantic_name[PIPE_MAX_SHADER_INPUTS];
+ uint input_semantic_index[PIPE_MAX_SHADER_INPUTS];
/** points into the i915->current.constants array: */
float (*constants)[4];
const struct tgsi_full_src_register *source)
{
uint index = source->SrcRegister.Index;
- uint src, sem;
+ uint src, sem_name, sem_ind;
switch (source->SrcRegister.File) {
case TGSI_FILE_TEMPORARY:
/* use vertex format info to map a slot number to a VF attrib */
assert(index < p->vertex_info->num_attribs);
- sem = p->input_semantic[index];
+ sem_name = p->input_semantic_name[index];
+ sem_ind = p->input_semantic_index[index];
#if 1
- switch (sem) {
+ switch (sem_name) {
case TGSI_SEMANTIC_POSITION:
printf("SKIP SEM POS\n");
/*
src = i915_emit_decl(p, REG_TYPE_T, p->wpos_tex, D0_CHANNEL_ALL);
*/
break;
- case TGSI_SEMANTIC_COLOR0:
- src = i915_emit_decl(p, REG_TYPE_T, T_DIFFUSE, D0_CHANNEL_ALL);
- break;
- case TGSI_SEMANTIC_COLOR1:
- src = i915_emit_decl(p, REG_TYPE_T, T_SPECULAR, D0_CHANNEL_XYZ);
- src = swizzle(src, X, Y, Z, ONE);
+ case TGSI_SEMANTIC_COLOR:
+ if (sem_ind == 0) {
+ src = i915_emit_decl(p, REG_TYPE_T, T_DIFFUSE, D0_CHANNEL_ALL);
+ }
+ else {
+ /* secondary color */
+ assert(sem_ind == 1);
+ src = i915_emit_decl(p, REG_TYPE_T, T_SPECULAR, D0_CHANNEL_XYZ);
+ src = swizzle(src, X, Y, Z, ONE);
+ }
break;
case TGSI_SEMANTIC_FOG:
src = i915_emit_decl(p, REG_TYPE_T, T_FOG_W, D0_CHANNEL_W);
src = swizzle(src, W, W, W, W);
break;
- case TGSI_SEMANTIC_TEX0:
- case TGSI_SEMANTIC_TEX1:
- case TGSI_SEMANTIC_TEX2:
- case TGSI_SEMANTIC_TEX3:
- case TGSI_SEMANTIC_TEX4:
- case TGSI_SEMANTIC_TEX5:
- case TGSI_SEMANTIC_TEX6:
- case TGSI_SEMANTIC_TEX7:
- src = i915_emit_decl(p, REG_TYPE_T,
- T_TEX0 + (sem - TGSI_SEMANTIC_TEX0),
- D0_CHANNEL_ALL);
+ case TGSI_SEMANTIC_TEXCOORD:
+ src = i915_emit_decl(p, REG_TYPE_T, T_TEX0 + sem_ind, D0_CHANNEL_ALL);
break;
default:
i915_program_error(p, "Bad source->Index");
if (parse.FullToken.FullDeclaration.Declaration.File
== TGSI_FILE_INPUT) {
/* save input register info for use in src_vector() */
- uint ind, sem;
+ uint ind, sem, semi;
ind = parse.FullToken.FullDeclaration.u.DeclarationRange.First;
sem = parse.FullToken.FullDeclaration.Semantic.SemanticName;
+ semi = parse.FullToken.FullDeclaration.Semantic.SemanticIndex;
/*printf("FS Input DECL [%u] sem %u\n", ind, sem);*/
- p->input_semantic[ind] = sem;
+ p->input_semantic_name[ind] = sem;
+ p->input_semantic_index[ind] = semi;
}
break;
i915_program_error(p, "No free texcoord for wpos value");
}
#else
- if (p->shader->input_semantics[0] == TGSI_SEMANTIC_POSITION) {
+ if (p->shader->input_semantic_name[0] == TGSI_SEMANTIC_POSITION) {
/* frag shader using the fragment position input */
#if 0
assert(0);
static void
i915_fixup_depth_write(struct i915_fp_compile *p)
{
- /* XXX assuming depth is always in output[0] */
- if (p->shader->output_semantics[0] == TGSI_SEMANTIC_DEPTH) {
+ /* XXX assuming pos/depth is always in output[0] */
+ if (p->shader->output_semantic_name[0] == TGSI_SEMANTIC_POSITION) {
const uint depth = UREG(REG_TYPE_OD, 0);
i915_emit_arith(p,
/* Note: we'll set the S4_VFMT_XYZ[W] bits below */
for (i = 0; i < fs->num_inputs; i++) {
- switch (fs->input_semantics[i]) {
+ switch (fs->input_semantic_name[i]) {
case TGSI_SEMANTIC_POSITION:
break;
- case TGSI_SEMANTIC_COLOR0:
- front0 = draw_emit_vertex_attr(vinfo, FORMAT_4UB, colorInterp);
- vinfo->hwfmt[0] |= S4_VFMT_COLOR;
- break;
- case TGSI_SEMANTIC_COLOR1:
- assert(0); /* untested */
- front1 = draw_emit_vertex_attr(vinfo, FORMAT_4UB, colorInterp);
- vinfo->hwfmt[0] |= S4_VFMT_SPEC_FOG;
+ case TGSI_SEMANTIC_COLOR:
+ if (fs->input_semantic_index[i] == 0) {
+ front0 = draw_emit_vertex_attr(vinfo, FORMAT_4UB, colorInterp);
+ vinfo->hwfmt[0] |= S4_VFMT_COLOR;
+ }
+ else {
+ assert(fs->input_semantic_index[i] == 1);
+ assert(0); /* untested */
+ front1 = draw_emit_vertex_attr(vinfo, FORMAT_4UB, colorInterp);
+ vinfo->hwfmt[0] |= S4_VFMT_SPEC_FOG;
+ }
break;
- case TGSI_SEMANTIC_TEX0:
- case TGSI_SEMANTIC_TEX1:
- case TGSI_SEMANTIC_TEX2:
- case TGSI_SEMANTIC_TEX3:
- case TGSI_SEMANTIC_TEX4:
- case TGSI_SEMANTIC_TEX5:
- case TGSI_SEMANTIC_TEX6:
- case TGSI_SEMANTIC_TEX7:
+ case TGSI_SEMANTIC_TEXCOORD:
{
- const uint unit = fs->input_semantics[i] - TGSI_SEMANTIC_TEX0;
+ const uint unit = fs->input_semantic_index[i];
uint hwtc;
texCoords[unit] = TRUE;
draw_emit_vertex_attr(vinfo, FORMAT_4F, INTERP_PERSPECTIVE);
/** These fields somewhat constitute the shader "signature" */
ubyte num_inputs;
ubyte num_outputs;
- ubyte input_semantics[PIPE_MAX_SHADER_INPUTS];
- ubyte output_semantics[PIPE_MAX_SHADER_OUTPUTS];
+
+ ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */
+ ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
+
+ ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
+ ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
};
struct pipe_depth_stencil_state
draw_emit_vertex_attr(vinfo, FORMAT_4F, INTERP_LINEAR);
for (i = 0; i < fs->num_inputs; i++) {
- switch (fs->input_semantics[i]) {
+ switch (fs->input_semantic_name[i]) {
case TGSI_SEMANTIC_POSITION:
/* Need Z if depth test is enabled or the fragment program uses the
* fragment position (XYZW).
softpipe->need_z = TRUE;
softpipe->need_w = TRUE;
break;
- case TGSI_SEMANTIC_COLOR0:
- front0 = draw_emit_vertex_attr(vinfo,
- FORMAT_4F, colorInterp);
- break;
- case TGSI_SEMANTIC_COLOR1:
- front1 = draw_emit_vertex_attr(vinfo,
- FORMAT_4F, colorInterp);
+ case TGSI_SEMANTIC_COLOR:
+ if (fs->input_semantic_index[i] == 0) {
+ front0 = draw_emit_vertex_attr(vinfo,
+ FORMAT_4F, colorInterp);
+ }
+ else {
+ assert(fs->input_semantic_index[i] == 1);
+ front1 = draw_emit_vertex_attr(vinfo,
+ FORMAT_4F, colorInterp);
+ }
break;
case TGSI_SEMANTIC_FOG:
draw_emit_vertex_attr(vinfo,
#endif
softpipe->psize_slot = i;
/*case TGSI_SEMANTIC_TEXCOORD:*/
- case TGSI_SEMANTIC_TEX0:
+ case TGSI_SEMANTIC_TEXCOORD:
+ /* unit = fs->input_semantic_index[i] */
draw_emit_vertex_attr(vinfo,
FORMAT_4F, INTERP_PERSPECTIVE);
softpipe->need_w = TRUE;
break;
- case TGSI_SEMANTIC_OTHER:
+ case TGSI_SEMANTIC_GENERIC:
draw_emit_vertex_attr(vinfo, FORMAT_4F, INTERP_PERSPECTIVE);
softpipe->need_w = TRUE;
break;
{
struct tgsi_declaration_semantic ds;
- ds.SemanticName = TGSI_SEMANTIC_DEPTH;
+ ds.SemanticName = TGSI_SEMANTIC_POSITION;
ds.SemanticIndex = 0;
ds.Padding = 0;
static const char *TGSI_SEMANTICS[] =
{
- "SEMANTIC_DEPTH",
- "SEMANTIC_COLOR0",
- "SEMANTIC_COLOR1",
- "SEMANTIC_COLOR0B",
- "SEMANTIC_COLOR1B",
"SEMANTIC_POSITION",
+ "SEMANTIC_COLOR",
+ "SEMANTIC_BCOLOR",
"SEMANTIC_FOG",
- "SEMANTIC_OTHER,"
- "SEMANTIC_TEX0",
+ "SEMANTIC_TEXCOORD",
+ "SEMANTIC_GENERIC,"
};
static const char *TGSI_SEMANTICS_SHORT[] =
{
- "DEPTH",
- "COLOR0",
- "COLOR1",
- "COLOR0B",
- "COLOR1B",
"POSITION",
+ "COLOR",
+ "BCOLOR",
"FOG",
- "OTHER",
- "TEX0"
+ "TEXCOORD",
+ "GENERIC",
};
static const char *TGSI_IMMS[] =
unsigned Padding : 28;
};
-#define TGSI_SEMANTIC_DEPTH 0
-#define TGSI_SEMANTIC_COLOR0 1
-#define TGSI_SEMANTIC_COLOR1 2
-#define TGSI_SEMANTIC_COLOR0B 3 /**< back-face primary color */
-#define TGSI_SEMANTIC_COLOR1B 4 /**< back-face secondary color */
-#define TGSI_SEMANTIC_POSITION 5
-#define TGSI_SEMANTIC_FOG 6
-#define TGSI_SEMANTIC_OTHER 7 /* XXX temp */
-#define TGSI_SEMANTIC_TEX0 8
-#define TGSI_SEMANTIC_TEX1 9
-#define TGSI_SEMANTIC_TEX2 10
-#define TGSI_SEMANTIC_TEX3 11
-#define TGSI_SEMANTIC_TEX4 12
-#define TGSI_SEMANTIC_TEX5 13
-#define TGSI_SEMANTIC_TEX6 14
-#define TGSI_SEMANTIC_TEX7 15
-#define TGSI_SEMANTIC_COUNT 16 /**< number of semantic values */
+#define TGSI_SEMANTIC_POSITION 0
+#define TGSI_SEMANTIC_COLOR 1
+#define TGSI_SEMANTIC_BCOLOR 2 /**< back-face color */
+#define TGSI_SEMANTIC_FOG 3
+#define TGSI_SEMANTIC_TEXCOORD 4
+#define TGSI_SEMANTIC_GENERIC 5
+#define TGSI_SEMANTIC_COUNT 6 /**< number of semantic values */
struct tgsi_declaration_semantic
{
GLuint index,\r
GLuint interpolate,\r
GLuint usage_mask,\r
- GLuint semantic_name )\r
+ GLuint semantic_name,\r
+ GLuint semantic_index )\r
{\r
struct tgsi_full_declaration decl;\r
\r
decl.u.DeclarationRange.First = index;\r
decl.u.DeclarationRange.Last = index;\r
decl.Semantic.SemanticName = semantic_name;\r
+ decl.Semantic.SemanticIndex = semantic_index;\r
decl.Interpolation.Interpolate = interpolate;\r
\r
return decl;\r
make_frag_output_decl(\r
GLuint index,\r
GLuint semantic_name,\r
+ GLuint semantic_index,\r
GLuint usage_mask )\r
{\r
struct tgsi_full_declaration decl;\r
decl.u.DeclarationRange.First = index;\r
decl.u.DeclarationRange.Last = index;\r
decl.Semantic.SemanticName = semantic_name;\r
- decl.Semantic.SemanticIndex = 0;\r
+ decl.Semantic.SemanticIndex = semantic_index;\r
\r
return decl;\r
}\r
const struct gl_fragment_program *program,\r
GLuint numInputs,\r
const GLuint inputMapping[],\r
- const ubyte inputSemantic[],\r
+ const ubyte inputSemanticName[],\r
+ const ubyte inputSemanticIndex[],\r
const GLuint interpMode[],\r
const GLuint outputMapping[],\r
struct tgsi_token *tokens,\r
ti = 3;\r
\r
for (i = 0; i < numInputs; i++) {\r
- switch (inputSemantic[i]) {\r
+ switch (inputSemanticName[i]) {\r
case TGSI_SEMANTIC_POSITION:\r
/* Fragment XY pos */\r
fulldecl = make_frag_input_decl(i,\r
TGSI_INTERPOLATE_CONSTANT,\r
TGSI_WRITEMASK_XY,\r
- TGSI_SEMANTIC_POSITION );\r
+ TGSI_SEMANTIC_POSITION, 0 );\r
ti += tgsi_build_full_declaration(\r
&fulldecl,\r
&tokens[ti],\r
fulldecl = make_frag_input_decl(i,\r
TGSI_INTERPOLATE_LINEAR,\r
TGSI_WRITEMASK_ZW,\r
- TGSI_SEMANTIC_POSITION );\r
+ TGSI_SEMANTIC_POSITION, 0 );\r
ti += tgsi_build_full_declaration(\r
&fulldecl,\r
&tokens[ti],\r
fulldecl = make_frag_input_decl(i,\r
interpMode[i],\r
TGSI_WRITEMASK_XYZW,\r
- inputSemantic[i] );\r
+ inputSemanticName[i],\r
+ inputSemanticIndex[i]);\r
ti += tgsi_build_full_declaration(&fulldecl,\r
&tokens[ti],\r
header,\r
\r
fulldecl = make_frag_output_decl(\r
0,\r
- TGSI_SEMANTIC_DEPTH,\r
+ TGSI_SEMANTIC_POSITION, 0, /* Z / Depth */\r
TGSI_WRITEMASK_Z );\r
ti += tgsi_build_full_declaration(\r
&fulldecl,\r
if( program->Base.OutputsWritten & (1 << FRAG_RESULT_COLR) ) {\r
fulldecl = make_frag_output_decl(\r
1,\r
- TGSI_SEMANTIC_COLOR0,\r
+ TGSI_SEMANTIC_COLOR, 0,\r
TGSI_WRITEMASK_XYZW );\r
ti += tgsi_build_full_declaration(\r
&fulldecl,\r
const struct gl_fragment_program *program,\r
GLuint numInputs,\r
const GLuint inputMapping[],\r
- const ubyte inputSemantic[],\r
+ const ubyte inputSemanticName[],\r
+ const ubyte inputSemanticIndex[],\r
const GLuint interpMode[],\r
const GLuint outputMapping[],\r
struct tgsi_token *tokens,\r
switch (i) {
case FRAG_ATTRIB_WPOS:
- fs.input_semantics[fs.num_inputs] = TGSI_SEMANTIC_POSITION;
+ fs.input_semantic_name[fs.num_inputs] = TGSI_SEMANTIC_POSITION;
+ fs.input_semantic_index[fs.num_inputs] = 0;
interpMode[fs.num_inputs] = TGSI_INTERPOLATE_CONSTANT;
break;
case FRAG_ATTRIB_COL0:
- fs.input_semantics[fs.num_inputs] = TGSI_SEMANTIC_COLOR0;
+ fs.input_semantic_name[fs.num_inputs] = TGSI_SEMANTIC_COLOR;
+ fs.input_semantic_index[fs.num_inputs] = 0;
interpMode[fs.num_inputs] = TGSI_INTERPOLATE_LINEAR;
break;
case FRAG_ATTRIB_COL1:
- fs.input_semantics[fs.num_inputs] = TGSI_SEMANTIC_COLOR1;
+ fs.input_semantic_name[fs.num_inputs] = TGSI_SEMANTIC_COLOR;
+ fs.input_semantic_index[fs.num_inputs] = 1;
interpMode[fs.num_inputs] = TGSI_INTERPOLATE_LINEAR;
break;
+ case FRAG_ATTRIB_FOGC:
+ assert(0);
+ break;
case FRAG_ATTRIB_TEX0:
- fs.input_semantics[fs.num_inputs] = TGSI_SEMANTIC_TEX0;
+ case FRAG_ATTRIB_TEX1:
+ case FRAG_ATTRIB_TEX2:
+ case FRAG_ATTRIB_TEX3:
+ case FRAG_ATTRIB_TEX4:
+ case FRAG_ATTRIB_TEX5:
+ case FRAG_ATTRIB_TEX6:
+ case FRAG_ATTRIB_TEX7:
+ fs.input_semantic_name[fs.num_inputs] = TGSI_SEMANTIC_TEXCOORD;
+ fs.input_semantic_index[fs.num_inputs] = i - FRAG_ATTRIB_TEX0;
interpMode[fs.num_inputs] = TGSI_INTERPOLATE_PERSPECTIVE;
break;
+ case FRAG_ATTRIB_VAR0:
+ /* fall-through */
default:
- assert(0);
+ fs.input_semantic_name[fs.num_inputs] = TGSI_SEMANTIC_GENERIC;
+ fs.input_semantic_index[fs.num_inputs] = i - FRAG_ATTRIB_VAR0;
+ interpMode[fs.num_inputs] = TGSI_INTERPOLATE_PERSPECTIVE;
}
fs.num_inputs++;
if (stfp->Base.Base.OutputsWritten & (1 << i)) {
switch (i) {
case FRAG_RESULT_DEPR:
- fs.output_semantics[fs.num_outputs] = TGSI_SEMANTIC_DEPTH;
+ fs.output_semantic_name[fs.num_outputs] = TGSI_SEMANTIC_POSITION;
outputMapping[i] = fs.num_outputs;
break;
case FRAG_RESULT_COLR:
- fs.output_semantics[fs.num_outputs] = TGSI_SEMANTIC_COLOR0;
+ fs.output_semantic_name[fs.num_outputs] = TGSI_SEMANTIC_COLOR;
outputMapping[i] = fs.num_outputs;
break;
default:
tgsi_mesa_compile_fp_program( &stfp->Base,
fs.num_inputs,
inputMapping,
- fs.input_semantics,
+ fs.input_semantic_name,
+ fs.input_semantic_index,
interpMode,
outputMapping,
stfp->tokens, ST_FP_MAX_TOKENS );
memset(&vs, 0, sizeof(vs));
/*
- * Determine how many inputs there are.
- * Also, compute two look-up tables that map between Mesa VERT_ATTRIB_x
- * values and TGSI generic input indexes.
+ * Determine number of inputs, the mappings between VERT_ATTRIB_x
+ * and TGSI generic input indexes, plus input attrib semantic info.
*/
for (i = 0; i < MAX_VERTEX_PROGRAM_ATTRIBS; i++) {
if (stvp->Base.Base.InputsRead & (1 << i)) {
stvp->index_to_input[vs.num_inputs] = i;
switch (i) {
case VERT_ATTRIB_POS:
- vs.input_semantics[vs.num_inputs] = TGSI_SEMANTIC_POSITION;
+ vs.input_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_POSITION;
+ vs.input_semantic_index[vs.num_inputs] = 0;
+ break;
+ case VERT_ATTRIB_WEIGHT:
+ /* fall-through */
+ case VERT_ATTRIB_NORMAL:
+ /* just label as a generic */
+ vs.input_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_GENERIC;
+ vs.input_semantic_index[vs.num_inputs] = 0;
break;
case VERT_ATTRIB_COLOR0:
- vs.input_semantics[vs.num_inputs] = TGSI_SEMANTIC_COLOR0;
+ vs.input_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_COLOR;
+ vs.input_semantic_index[vs.num_inputs] = 0;
break;
case VERT_ATTRIB_COLOR1:
- vs.input_semantics[vs.num_inputs] = TGSI_SEMANTIC_COLOR1;
+ vs.input_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_COLOR;
+ vs.input_semantic_index[vs.num_inputs] = 1;
break;
case VERT_ATTRIB_TEX0:
- vs.input_semantics[vs.num_inputs] = TGSI_SEMANTIC_TEX0;
+ case VERT_ATTRIB_TEX1:
+ case VERT_ATTRIB_TEX2:
+ case VERT_ATTRIB_TEX3:
+ case VERT_ATTRIB_TEX4:
+ case VERT_ATTRIB_TEX5:
+ case VERT_ATTRIB_TEX6:
+ case VERT_ATTRIB_TEX7:
+ vs.input_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_TEXCOORD;
+ vs.input_semantic_index[vs.num_inputs] = 1 - VERT_ATTRIB_TEX0;
+ break;
+ case VERT_ATTRIB_GENERIC0:
+ case VERT_ATTRIB_GENERIC1:
+ case VERT_ATTRIB_GENERIC2:
+ case VERT_ATTRIB_GENERIC3:
+ case VERT_ATTRIB_GENERIC4:
+ case VERT_ATTRIB_GENERIC5:
+ case VERT_ATTRIB_GENERIC6:
+ case VERT_ATTRIB_GENERIC7:
+ assert(i < VERT_ATTRIB_MAX);
+ vs.input_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_GENERIC;
+ vs.input_semantic_index[vs.num_inputs] = 1 - VERT_ATTRIB_GENERIC0;
break;
default:
- vs.input_semantics[vs.num_inputs] = TGSI_SEMANTIC_OTHER;
+ assert(0);
}
vs.num_inputs++;
}
}
/*
- * Determine number of outputs and the register mapping.
+ * Determine number of outputs, the register mapping and
+ * the semantic information for each vertex output/result.
*/
for (i = 0; i < VERT_RESULT_MAX; i++) {
if (stvp->Base.Base.OutputsWritten & (1 << i)) {
switch (i) {
case VERT_RESULT_HPOS:
- vs.output_semantics[vs.num_outputs] = TGSI_SEMANTIC_POSITION;
+ vs.output_semantic_name[vs.num_outputs] = TGSI_SEMANTIC_POSITION;
+ vs.output_semantic_index[vs.num_inputs] = 0;
break;
case VERT_RESULT_COL0:
- vs.output_semantics[vs.num_inputs] = TGSI_SEMANTIC_COLOR0;
+ vs.output_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_COLOR;
+ vs.output_semantic_index[vs.num_inputs] = 0;
break;
case VERT_RESULT_COL1:
- vs.output_semantics[vs.num_inputs] = TGSI_SEMANTIC_COLOR1;
+ vs.output_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_COLOR;
+ vs.output_semantic_index[vs.num_inputs] = 1;
break;
case VERT_RESULT_BFC0:
- vs.output_semantics[vs.num_inputs] = TGSI_SEMANTIC_COLOR0B;
+ vs.output_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_BCOLOR;
+ vs.output_semantic_index[vs.num_inputs] = 0;
break;
case VERT_RESULT_BFC1:
- vs.output_semantics[vs.num_inputs] = TGSI_SEMANTIC_COLOR1B;
+ vs.output_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_BCOLOR;
+ vs.output_semantic_index[vs.num_inputs] = 1;
+ break;
+ case VERT_RESULT_FOGC:
+ case VERT_RESULT_PSIZ:
+ case VERT_RESULT_EDGE:
+ assert(0);
break;
+ case VERT_RESULT_TEX0:
+ case VERT_RESULT_TEX1:
+ case VERT_RESULT_TEX2:
+ case VERT_RESULT_TEX3:
+ case VERT_RESULT_TEX4:
+ case VERT_RESULT_TEX5:
+ case VERT_RESULT_TEX6:
+ case VERT_RESULT_TEX7:
+ vs.output_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_TEXCOORD;
+ vs.output_semantic_index[vs.num_inputs] = i - VERT_RESULT_TEX0;
+ break;
+ case VERT_RESULT_VAR0:
+ /* fall-through */
default:
- vs.output_semantics[vs.num_outputs] = TGSI_SEMANTIC_OTHER;
+ assert(i - VERT_RESULT_VAR0 < MAX_VARYING);
+ vs.output_semantic_name[vs.num_inputs] = TGSI_SEMANTIC_GENERIC;
+ vs.output_semantic_index[vs.num_inputs] = i - VERT_RESULT_VAR0;
}
+
vs.num_outputs++;
}
}