gl_texture_index ti = TEXTURE_2D_ARRAY_INDEX;
gl_vert_attrib va = VERT_ATTRIB_POS;
gl_varying_slot vs = VARYING_SLOT_POS;
- gl_geom_attrib ga = GEOM_ATTRIB_POSITION;
gl_geom_result gr = GEOM_RESULT_POS;
(void) bi;
(void) ti;
(void) va;
(void) vs;
- (void) ga;
(void) gr;
}
/*********************************************/
-/**
- * Indexes for geometry program attributes.
- */
-typedef enum
-{
- GEOM_ATTRIB_POSITION = VARYING_SLOT_POS,
- GEOM_ATTRIB_COLOR0 = VARYING_SLOT_COL0,
- GEOM_ATTRIB_COLOR1 = VARYING_SLOT_COL1,
- GEOM_ATTRIB_SECONDARY_COLOR0 = VARYING_SLOT_BFC0,
- GEOM_ATTRIB_SECONDARY_COLOR1 = VARYING_SLOT_BFC1,
- GEOM_ATTRIB_FOG_FRAG_COORD = VARYING_SLOT_FOGC,
- GEOM_ATTRIB_POINT_SIZE = VARYING_SLOT_PNTC,
- GEOM_ATTRIB_CLIP_VERTEX = VARYING_SLOT_CLIP_VERTEX,
- GEOM_ATTRIB_PRIMITIVE_ID = VARYING_SLOT_PRIMITIVE_ID,
- GEOM_ATTRIB_TEX_COORD = VARYING_SLOT_TEX0,
-
- GEOM_ATTRIB_VAR0 = VARYING_SLOT_VAR0,
- GEOM_ATTRIB_MAX = VARYING_SLOT_MAX
-} gl_geom_attrib;
-
-/**
- * Bitflags for geometry attributes.
- * These are used in bitfields in many places.
- */
-/*@{*/
-#define GEOM_BIT_COLOR0 (1 << GEOM_ATTRIB_COLOR0)
-#define GEOM_BIT_COLOR1 (1 << GEOM_ATTRIB_COLOR1)
-#define GEOM_BIT_SCOLOR0 (1 << GEOM_ATTRIB_SECONDARY_COLOR0)
-#define GEOM_BIT_SCOLOR1 (1 << GEOM_ATTRIB_SECONDARY_COLOR1)
-#define GEOM_BIT_TEX_COORD (1 << GEOM_ATTRIB_TEX_COORD)
-#define GEOM_BIT_FOG_COORD (1 << GEOM_ATTRIB_FOG_FRAG_COORD)
-#define GEOM_BIT_POSITION (1 << GEOM_ATTRIB_POSITION)
-#define GEOM_BIT_POINT_SIDE (1 << GEOM_ATTRIB_POINT_SIZE)
-#define GEOM_BIT_CLIP_VERTEX (1 << GEOM_ATTRIB_CLIP_VERTEX)
-#define GEOM_BIT_PRIM_ID (1 << GEOM_ATTRIB_PRIMITIVE_ID)
-#define GEOM_BIT_VAR0 (1 << GEOM_ATTRIB_VAR0)
-
-#define GEOM_BIT_VAR(g) (1 << (GEOM_BIT_VAR0 + (g)))
-/*@}*/
-
-
/**
* Indexes for geometry program result attributes
*/
case MESA_SHADER_FRAGMENT:
return index < FRAG_ATTRIB_VAR0 + (GLint) ctx->Const.MaxVarying;
case MESA_SHADER_GEOMETRY:
- return index < GEOM_ATTRIB_VAR0 + (GLint) ctx->Const.MaxVarying;
+ return index < VARYING_SLOT_VAR0 + (GLint) ctx->Const.MaxVarying;
default:
return GL_FALSE;
}
struct st_geometry_program *stgp,
const struct st_gp_variant_key *key)
{
- GLuint inputMapping[GEOM_ATTRIB_MAX];
+ GLuint inputMapping[VARYING_SLOT_MAX];
GLuint outputMapping[GEOM_RESULT_MAX];
struct pipe_context *pipe = st->pipe;
GLuint attr;
* Convert Mesa program inputs to TGSI input register semantics.
*/
inputsRead = stgp->Base.Base.InputsRead;
- for (attr = 0; attr < GEOM_ATTRIB_MAX; attr++) {
+ for (attr = 0; attr < VARYING_SLOT_MAX; attr++) {
if ((inputsRead & BITFIELD64_BIT(attr)) != 0) {
const GLuint slot = gs_num_inputs;
stgp->index_to_input[vslot] = attr;
++vslot;
- if (attr != GEOM_ATTRIB_PRIMITIVE_ID) {
+ if (attr != VARYING_SLOT_PRIMITIVE_ID) {
gs_array_offset += 2;
} else
++gs_builtin_inputs;
#endif
switch (attr) {
- case GEOM_ATTRIB_PRIMITIVE_ID:
+ case VARYING_SLOT_PRIMITIVE_ID:
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_PRIMID;
stgp->input_semantic_index[slot] = 0;
break;
- case GEOM_ATTRIB_POSITION:
+ case VARYING_SLOT_POS:
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_POSITION;
stgp->input_semantic_index[slot] = 0;
break;
- case GEOM_ATTRIB_COLOR0:
+ case VARYING_SLOT_COL0:
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
stgp->input_semantic_index[slot] = 0;
break;
- case GEOM_ATTRIB_COLOR1:
+ case VARYING_SLOT_COL1:
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
stgp->input_semantic_index[slot] = 1;
break;
- case GEOM_ATTRIB_FOG_FRAG_COORD:
+ case VARYING_SLOT_FOGC:
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_FOG;
stgp->input_semantic_index[slot] = 0;
break;
- case GEOM_ATTRIB_TEX_COORD:
+ case VARYING_SLOT_TEX0:
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
stgp->input_semantic_index[slot] = num_generic++;
break;
- case GEOM_ATTRIB_VAR0:
+ case VARYING_SLOT_VAR0:
/* fall-through */
default:
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
/** map GP input back to VP output */
GLuint input_map[PIPE_MAX_SHADER_INPUTS];
- /** maps a Mesa GEOM_ATTRIB_x to a packed TGSI input index */
- GLuint input_to_index[GEOM_ATTRIB_MAX];
- /** maps a TGSI input index back to a Mesa GEOM_ATTRIB_x */
+ /** maps a Mesa VARYING_SLOT_x to a packed TGSI input index */
+ GLuint input_to_index[VARYING_SLOT_MAX];
+ /** maps a TGSI input index back to a Mesa VARYING_SLOT_x */
GLuint index_to_input[PIPE_MAX_SHADER_INPUTS];
GLuint num_inputs;
- GLuint input_to_slot[GEOM_ATTRIB_MAX]; /**< Maps GEOM_ATTRIB_x to slot */
+ GLuint input_to_slot[VARYING_SLOT_MAX]; /**< Maps VARYING_SLOT_x to slot */
GLuint num_input_slots;
ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS];