We don't support ARB_vertex_blend.
Note that the attribute aliasing check for ARB_vertex_program had to be
rewritten.
vbo_context: 20344 -> 20008 bytes
gl_context: 74672 -> 74616 bytes
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
{
static const char *names[] = {
ENUM(VERT_ATTRIB_POS),
- ENUM(VERT_ATTRIB_WEIGHT),
ENUM(VERT_ATTRIB_NORMAL),
ENUM(VERT_ATTRIB_COLOR0),
ENUM(VERT_ATTRIB_COLOR1),
typedef enum
{
VERT_ATTRIB_POS,
- VERT_ATTRIB_WEIGHT,
VERT_ATTRIB_NORMAL,
VERT_ATTRIB_COLOR0,
VERT_ATTRIB_COLOR1,
*/
/*@{*/
#define VERT_BIT_POS BITFIELD64_BIT(VERT_ATTRIB_POS)
-#define VERT_BIT_WEIGHT BITFIELD64_BIT(VERT_ATTRIB_WEIGHT)
#define VERT_BIT_NORMAL BITFIELD64_BIT(VERT_ATTRIB_NORMAL)
#define VERT_BIT_COLOR0 BITFIELD64_BIT(VERT_ATTRIB_COLOR0)
#define VERT_BIT_COLOR1 BITFIELD64_BIT(VERT_ATTRIB_COLOR1)
}
break;
case 1:
- assert(attrib == VERT_ATTRIB_WEIGHT);
- emitsize = (VB->AttribPtr[attrib]->size);
- vfmt0 |= emitsize << R200_VTX_WEIGHT_COUNT_SHIFT;
+ unreachable("r200: vertex weight attrib unsupported");
break;
case 2:
assert(attrib == VERT_ATTRIB_NORMAL);
free_inputs &= ~(1 << 0);
array_count++;
}
- if (mesa_vp->info.inputs_read & VERT_BIT_WEIGHT) {
- vp->inputs[VERT_ATTRIB_WEIGHT] = 12;
- vp->inputmap_rev[1] = VERT_ATTRIB_WEIGHT;
- array_count++;
- }
if (mesa_vp->info.inputs_read & VERT_BIT_NORMAL) {
vp->inputs[VERT_ATTRIB_NORMAL] = 1;
vp->inputmap_rev[2] = VERT_ATTRIB_NORMAL;
/* Init the individual arrays */
for (i = 0; i < ARRAY_SIZE(vao->VertexAttrib); i++) {
switch (i) {
- case VERT_ATTRIB_WEIGHT:
- init_array(ctx, vao, VERT_ATTRIB_WEIGHT, 1, GL_FLOAT);
- break;
case VERT_ATTRIB_NORMAL:
init_array(ctx, vao, VERT_ATTRIB_NORMAL, 3, GL_FLOAT);
break;
}
/* redo special cases: */
- ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_WEIGHT], 1.0, 0.0, 0.0, 0.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], 0.0, 0.0, 1.0, 1.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], 1.0, 1.0, 1.0, 1.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR1], 0.0, 0.0, 0.0, 1.0 );
*/
static const char *const vertAttribs[] = {
"vertex.position",
- "vertex.weight",
"vertex.normal",
"vertex.color.primary",
"vertex.color.secondary",
{dot}texture { return TEXTURE; }
{dot}transpose { return TRANSPOSE; }
{dot}attrib { return_token_or_DOT(require_ARB_vp, VTXATTRIB); }
-{dot}weight { return_token_or_DOT(require_ARB_vp, WEIGHT); }
texture { return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); }
1D { return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); }
%token TEX_SHADOW1D TEX_SHADOW2D TEX_SHADOWRECT
%token TEX_ARRAY1D TEX_ARRAY2D TEX_ARRAYSHADOW1D TEX_ARRAYSHADOW2D
%token VERTEX VTXATTRIB
-%token WEIGHT
%token <string> IDENTIFIER USED_IDENTIFIER
%type <string> string
{
$$ = VERT_ATTRIB_POS;
}
- | WEIGHT vtxOptWeightNum
- {
- $$ = VERT_ATTRIB_WEIGHT;
- }
| NORMAL
{
$$ = VERT_ATTRIB_NORMAL;
}
;
-vtxOptWeightNum: | '[' vtxWeightNum ']';
vtxWeightNum: INTEGER;
fragAttribItem: POSITION
validate_inputs(struct YYLTYPE *locp, struct asm_parser_state *state)
{
const GLbitfield64 inputs = state->prog->info.inputs_read | state->InputsBound;
+ GLbitfield ff_inputs = 0;
- if (((inputs & VERT_BIT_FF_ALL) & (inputs >> VERT_ATTRIB_GENERIC0)) != 0) {
+ /* Since Mesa internal attribute indices are different from
+ * how NV_vertex_program defines attribute aliasing, we have to construct
+ * a separate usage mask based on how the aliasing is defined.
+ *
+ * Note that attribute aliasing is optional if NV_vertex_program is
+ * unsupported.
+ */
+ if (inputs & VERT_BIT_POS)
+ ff_inputs |= 1 << 0;
+ if (inputs & VERT_BIT_NORMAL)
+ ff_inputs |= 1 << 2;
+ if (inputs & VERT_BIT_COLOR0)
+ ff_inputs |= 1 << 3;
+ if (inputs & VERT_BIT_COLOR1)
+ ff_inputs |= 1 << 4;
+ if (inputs & VERT_BIT_FOG)
+ ff_inputs |= 1 << 5;
+
+ ff_inputs |= ((inputs & VERT_BIT_TEX_ALL) >> VERT_ATTRIB_TEX0) << 8;
+
+ if ((ff_inputs & (inputs >> VERT_ATTRIB_GENERIC0)) != 0) {
yyerror(locp, state, "illegal use of generic attribute and name attribute");
return 0;
}
*/
enum {
_TNL_ATTRIB_POS,
- _TNL_ATTRIB_WEIGHT,
_TNL_ATTRIB_NORMAL,
_TNL_ATTRIB_COLOR0,
_TNL_ATTRIB_COLOR1,
/**
* Handy attribute ranges:
*/
-#define _TNL_FIRST_PROG _TNL_ATTRIB_WEIGHT
+#define _TNL_FIRST_PROG _TNL_ATTRIB_NORMAL
#define _TNL_LAST_PROG _TNL_ATTRIB_TEX7
#define _TNL_FIRST_TEX _TNL_ATTRIB_TEX0
*/
enum {
VBO_ATTRIB_POS,
- VBO_ATTRIB_WEIGHT,
VBO_ATTRIB_NORMAL,
VBO_ATTRIB_COLOR0,
VBO_ATTRIB_COLOR1,