struct ureg_src inputs[PIPE_MAX_SHADER_INPUTS];
struct ureg_src samplers[PIPE_MAX_SAMPLERS];
- const GLuint *inputMapping;
- const GLuint *outputMapping;
+ const ubyte *inputMapping;
+ const ubyte *outputMapping;
unsigned current_pass;
struct ati_fragment_shader *atifs,
struct gl_program *program,
GLuint numInputs,
- const GLuint inputMapping[],
+ const ubyte inputMapping[],
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
const GLuint interpMode[],
GLuint numOutputs,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
const ubyte outputSemanticName[],
const ubyte outputSemanticIndex[])
{
struct ati_fragment_shader *atifs,
struct gl_program *program,
GLuint numInputs,
- const GLuint inputMapping[],
+ const ubyte inputMapping[],
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
const GLuint interpMode[],
GLuint numOutputs,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
const ubyte outputSemanticName[],
const ubyte outputSemanticIndex[]);
* else copy the current attrib.
*/
static void
-update_attrib(struct gl_context *ctx, const GLuint *outputMapping,
+update_attrib(struct gl_context *ctx, const ubyte *outputMapping,
const struct vertex_header *vert,
GLfloat *dest,
GLuint result, GLuint defaultAttrib)
struct gl_context *ctx = rs->ctx;
struct st_context *st = st_context(ctx);
const GLfloat height = (GLfloat) ctx->DrawBuffer->Height;
- const GLuint *outputMapping = st->vertex_result_to_slot;
+ const ubyte *outputMapping = st->vertex_result_to_slot;
const GLfloat *pos;
GLuint i;
GLboolean edgeflag_culls_prims;
/** Mapping from VARYING_SLOT_x to post-transformed vertex slot */
- const GLuint *vertex_result_to_slot;
+ const ubyte *vertex_result_to_slot;
struct st_vertex_program *vp; /**< Currently bound vertex program */
struct st_fragment_program *fp; /**< Currently bound fragment program */
struct inout_decl *output_decls;
unsigned num_output_decls;
- const GLuint *inputMapping;
- const GLuint *outputMapping;
+ const ubyte *inputMapping;
+ const ubyte *outputMapping;
unsigned procType; /**< PIPE_SHADER_VERTEX/FRAGMENT */
};
return mapping[a.mesa_index] < mapping[b.mesa_index];
}
- const GLuint *mapping;
+ const ubyte *mapping;
};
/* Sort the given array of decls by the corresponding slot (TGSI file index).
static void
sort_inout_decls_by_slot(struct inout_decl *decls,
unsigned count,
- const GLuint mapping[])
+ const ubyte mapping[])
{
sort_inout_decls sorter;
sorter.mapping = mapping;
glsl_to_tgsi_visitor *program,
const struct gl_program *proginfo,
GLuint numInputs,
- const GLuint inputMapping[],
+ const ubyte inputMapping[],
const GLuint inputSlotToAttr[],
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
const GLuint interpMode[],
GLuint numOutputs,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
const GLuint outputSlotToAttr[],
const ubyte outputSemanticName[],
const ubyte outputSemanticIndex[])
void
st_translate_stream_output_info(glsl_to_tgsi_visitor *glsl_to_tgsi,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
struct pipe_stream_output_info *so)
{
if (!glsl_to_tgsi->shader_program->last_vert_prog)
void
st_translate_stream_output_info2(struct gl_transform_feedback_info *info,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
struct pipe_stream_output_info *so)
{
unsigned i;
struct glsl_to_tgsi_visitor *program,
const struct gl_program *proginfo,
GLuint numInputs,
- const GLuint inputMapping[],
+ const ubyte inputMapping[],
const GLuint inputSlotToAttr[],
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
const GLuint interpMode[],
GLuint numOutputs,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
const GLuint outputSlotToAttr[],
const ubyte outputSemanticName[],
const ubyte outputSemanticIndex[]);
void
st_translate_stream_output_info(struct glsl_to_tgsi_visitor *glsl_to_tgsi,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
struct pipe_stream_output_info *so);
void
st_translate_stream_output_info2(struct gl_transform_feedback_info *info,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
struct pipe_stream_output_info *so);
unsigned
struct ureg_src samplers[PIPE_MAX_SAMPLERS];
struct ureg_src systemValues[SYSTEM_VALUE_MAX];
- const GLuint *inputMapping;
- const GLuint *outputMapping;
+ const ubyte *inputMapping;
+ const ubyte *outputMapping;
unsigned procType; /**< PIPE_SHADER_VERTEX/FRAGMENT */
};
struct ureg_program *ureg,
const struct gl_program *program,
GLuint numInputs,
- const GLuint inputMapping[],
+ const ubyte inputMapping[],
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
const GLuint interpMode[],
GLuint numOutputs,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
const ubyte outputSemanticName[],
const ubyte outputSemanticIndex[])
{
struct ureg_program *ureg,
const struct gl_program *program,
GLuint numInputs,
- const GLuint inputMapping[],
+ const ubyte inputMapping[],
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
const GLuint interpMode[],
GLuint numOutputs,
- const GLuint outputMapping[],
+ const ubyte outputMapping[],
const ubyte outputSemanticName[],
const ubyte outputSemanticIndex[]);
enum pipe_error error;
unsigned num_outputs = 0;
unsigned attr;
- unsigned input_to_index[VERT_ATTRIB_MAX] = {0};
+ ubyte input_to_index[VERT_ATTRIB_MAX] = {0};
unsigned output_slot_to_attr[VARYING_SLOT_MAX] = {0};
ubyte output_semantic_name[VARYING_SLOT_MAX] = {0};
ubyte output_semantic_index[VARYING_SLOT_MAX] = {0};
st_translate_fragment_program(struct st_context *st,
struct st_fragment_program *stfp)
{
- GLuint outputMapping[2 * FRAG_RESULT_MAX];
- GLuint inputMapping[VARYING_SLOT_MAX];
+ ubyte outputMapping[2 * FRAG_RESULT_MAX];
+ ubyte inputMapping[VARYING_SLOT_MAX];
GLuint inputSlotToAttr[VARYING_SLOT_MAX];
GLuint interpMode[PIPE_MAX_SHADER_INPUTS]; /* XXX size? */
GLuint attr;
struct pipe_shader_state *out_state)
{
GLuint inputSlotToAttr[VARYING_SLOT_TESS_MAX];
- GLuint inputMapping[VARYING_SLOT_TESS_MAX];
+ ubyte inputMapping[VARYING_SLOT_TESS_MAX];
GLuint outputSlotToAttr[VARYING_SLOT_TESS_MAX];
- GLuint outputMapping[VARYING_SLOT_TESS_MAX];
+ ubyte outputMapping[VARYING_SLOT_TESS_MAX];
GLuint attr;
ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS];
extern "C" {
#endif
-#define ST_DOUBLE_ATTRIB_PLACEHOLDER 0xffffffff
+#define ST_DOUBLE_ATTRIB_PLACEHOLDER 0xff
struct st_external_sampler_key
{
/** maps a Mesa VERT_ATTRIB_x to a packed TGSI input index */
/** maps a TGSI input index back to a Mesa VERT_ATTRIB_x */
- GLuint index_to_input[PIPE_MAX_SHADER_INPUTS];
- GLuint num_inputs;
+ ubyte index_to_input[PIPE_MAX_ATTRIBS];
+ ubyte num_inputs;
/** Maps VARYING_SLOT_x to slot */
- GLuint result_to_output[VARYING_SLOT_MAX];
+ ubyte result_to_output[VARYING_SLOT_MAX];
/** List of translated variants of this vertex program.
*/