diff options
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/arbprogparse.c | 10 | ||||
-rw-r--r-- | src/mesa/shader/nvfragparse.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/nvvertparse.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/program.c | 28 |
4 files changed, 21 insertions, 21 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 09b1caeaaeb..a64360adbe3 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -2488,7 +2488,7 @@ parse_src_reg (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head, return 1; } - *File = src->param_binding_type; + *File = (enum register_file) src->param_binding_type; switch (*(*inst)++) { case ARRAY_INDEX_ABSOLUTE: @@ -2536,7 +2536,7 @@ parse_src_reg (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head, if (parse_param_use (ctx, inst, vc_head, Program, &src)) return 1; - *File = src->param_binding_type; + *File = (enum register_file) src->param_binding_type; *Index = src->param_binding_begin; break; } @@ -2563,7 +2563,7 @@ parse_src_reg (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head, /* XXX: We have to handle offsets someplace in here! -- or are those above? */ case vt_param: - *File = src->param_binding_type; + *File = (enum register_file) src->param_binding_type; *Index = src->param_binding_begin; break; @@ -4056,7 +4056,7 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target, GLuint i; ASSERT(target == GL_FRAGMENT_PROGRAM_ARB); - if (!_mesa_parse_arb_program(ctx, target, str, len, &ap)) { + if (!_mesa_parse_arb_program(ctx, target, (const GLubyte*) str, len, &ap)) { /* Error in the program. Just return. */ return; } @@ -4108,7 +4108,7 @@ _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target, ASSERT(target == GL_VERTEX_PROGRAM_ARB); - if (!_mesa_parse_arb_program(ctx, target, str, len, &ap)) { + if (!_mesa_parse_arb_program(ctx, target, (const GLubyte*) str, len, &ap)) { /* Error in the program. Just return. */ return; } diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index e56bf589fbb..95d3e42ef70 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -1213,7 +1213,7 @@ Parse_PrintInstruction(struct parse_state *parseState, for (len = 0; str[len] != '\''; len++) /* find closing quote */ ; parseState->pos += len + 1; - msg = _mesa_malloc(len + 1); + msg = (GLubyte*) _mesa_malloc(len + 1); _mesa_memcpy(msg, str, len); msg[len] = 0; diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index fc44a49d4c7..7aac631934a 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -1048,7 +1048,7 @@ Parse_PrintInstruction(struct parse_state *parseState, struct prog_instruction * for (len = 0; str[len] != '\''; len++) /* find closing quote */ ; parseState->pos += len + 1; - msg = _mesa_malloc(len + 1); + msg = (GLubyte*) _mesa_malloc(len + 1); _mesa_memcpy(msg, str, len); msg[len] = 0; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index c668ce8a5a0..4e8dacea7e3 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -369,7 +369,7 @@ add_parameter(struct program_parameter_list *paramList, paramList->Size * sizeof(struct program_parameter)); tmp = paramList->ParameterValues; - paramList->ParameterValues = ALIGN_MALLOC(paramList->Size * 4 * sizeof(GLfloat), 16); + paramList->ParameterValues = (GLfloat(*)[4]) ALIGN_MALLOC(paramList->Size * 4 * sizeof(GLfloat), 16); if (tmp) { _mesa_memcpy(paramList->ParameterValues, tmp, n * 4 * sizeof(GLfloat)); @@ -1153,17 +1153,17 @@ make_state_string(const GLint state[6]) char tmp[30]; append(str, "state."); - append_token(str, state[0]); + append_token(str, (enum state_index) state[0]); switch (state[0]) { case STATE_MATERIAL: append_face(str, state[1]); - append_token(str, state[2]); + append_token(str, (enum state_index) state[2]); break; case STATE_LIGHT: append(str, "light"); append_index(str, state[1]); /* light number [i]. */ - append_token(str, state[2]); /* coefficients */ + append_token(str, (enum state_index) state[2]); /* coefficients */ break; case STATE_LIGHTMODEL_AMBIENT: append(str, "lightmodel.ambient"); @@ -1179,11 +1179,11 @@ make_state_string(const GLint state[6]) case STATE_LIGHTPROD: append_index(str, state[1]); /* light number [i]. */ append_face(str, state[2]); - append_token(str, state[3]); + append_token(str, (enum state_index) state[3]); break; case STATE_TEXGEN: append_index(str, state[1]); /* tex unit [i] */ - append_token(str, state[2]); /* plane coef */ + append_token(str, (enum state_index) state[2]); /* plane coef */ break; case STATE_TEXENV_COLOR: append_index(str, state[1]); /* tex unit [i] */ @@ -1206,11 +1206,11 @@ make_state_string(const GLint state[6]) /* state[3] = first column to fetch */ /* state[4] = last column to fetch */ /* state[5] = transpose, inverse or invtrans */ - const enum state_index mat = state[1]; + const enum state_index mat = (enum state_index) state[1]; const GLuint index = (GLuint) state[2]; const GLuint first = (GLuint) state[3]; const GLuint last = (GLuint) state[4]; - const enum state_index modifier = state[5]; + const enum state_index modifier = (enum state_index) state[5]; append_token(str, mat); if (index) append_index(str, index); @@ -1229,7 +1229,7 @@ make_state_string(const GLint state[6]) case STATE_VERTEX_PROGRAM: /* state[1] = {STATE_ENV, STATE_LOCAL} */ /* state[2] = parameter index */ - append_token(str, state[1]); + append_token(str, (enum state_index) state[1]); append_index(str, state[2]); break; case STATE_INTERNAL: @@ -1523,7 +1523,7 @@ static void print_dst_reg(const struct prog_dst_register *dstReg) { _mesa_printf(" %s[%d]%s", - program_file_string(dstReg->File), + program_file_string((enum register_file) dstReg->File), dstReg->Index, writemask_string(dstReg->WriteMask)); } @@ -1532,7 +1532,7 @@ static void print_src_reg(const struct prog_src_register *srcReg) { _mesa_printf("%s[%d]%s", - program_file_string(srcReg->File), + program_file_string((enum register_file) srcReg->File), srcReg->Index, swizzle_string(srcReg->Swizzle, srcReg->NegateBase, GL_FALSE)); @@ -1551,7 +1551,7 @@ _mesa_print_instruction(const struct prog_instruction *inst) if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) { _mesa_printf(", "); _mesa_printf("%s[%d]%s", - program_file_string(inst->SrcReg[0].File), + program_file_string((enum register_file) inst->SrcReg[0].File), inst->SrcReg[0].Index, swizzle_string(inst->SrcReg[0].Swizzle, inst->SrcReg[0].NegateBase, GL_FALSE)); @@ -1564,7 +1564,7 @@ _mesa_print_instruction(const struct prog_instruction *inst) _mesa_printf("_SAT"); print_dst_reg(&inst->DstReg); _mesa_printf("%s[%d], %s;\n", - program_file_string(inst->SrcReg[0].File), + program_file_string((enum register_file) inst->SrcReg[0].File), inst->SrcReg[0].Index, swizzle_string(inst->SrcReg[0].Swizzle, inst->SrcReg[0].NegateBase, GL_TRUE)); @@ -1611,7 +1611,7 @@ _mesa_print_instruction(const struct prog_instruction *inst) if (inst->DstReg.File != PROGRAM_UNDEFINED) { _mesa_printf(" %s[%d]%s", - program_file_string(inst->DstReg.File), + program_file_string((enum register_file) inst->DstReg.File), inst->DstReg.Index, writemask_string(inst->DstReg.WriteMask)); } |