summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/program.c2
-rw-r--r--src/mesa/shader/shader_api.c4
-rw-r--r--src/mesa/shader/slang/slang_compile.c2
-rw-r--r--src/mesa/shader/slang/slang_print.c6
4 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index a0817a91ec..b27ed6b7d3 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -467,7 +467,7 @@ _mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count)
for (i = 0; i < prog->NumInstructions; i++) {
struct prog_instruction *inst = prog->Instructions + i;
if (inst->BranchTarget > 0) {
- if (inst->BranchTarget >= start) {
+ if ((GLuint)inst->BranchTarget >= start) {
inst->BranchTarget += count;
}
}
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 856179e1d5..97edb25400 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -1079,7 +1079,7 @@ update_textures_used(struct gl_program *prog)
*/
static void
set_program_uniform(GLcontext *ctx, struct gl_program *program, GLint location,
- GLenum type, GLint count, GLint elems, const void *values)
+ GLenum type, GLsizei count, GLint elems, const void *values)
{
if (program->Parameters->Parameters[location].Type == PROGRAM_SAMPLER) {
/* This controls which texture unit which is used by a sampler */
@@ -1111,7 +1111,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program, GLint location,
}
else {
/* ordinary uniform variable */
- GLuint k, i;
+ GLsizei k, i;
if (count * elems > program->Parameters->Parameters[location].Size) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(count too large)");
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index cdea1c5128..8485103129 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -1934,7 +1934,7 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit,
byte *prod;
GLuint size, start, version;
slang_string preprocessed;
- int maxVersion;
+ GLuint maxVersion;
#if FEATURE_ARB_shading_language_120
maxVersion = 120;
diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c
index f3e127cb13..4a7d4bbbc7 100644
--- a/src/mesa/shader/slang/slang_print.c
+++ b/src/mesa/shader/slang/slang_print.c
@@ -182,14 +182,14 @@ static void
print_generic2(const slang_operation *op, const char *oper,
const char *s, int indent)
{
- int i;
+ GLuint i;
if (oper) {
spaces(indent);
printf("[%p locals %p] %s %s\n", (void*) op, (void*) op->locals, oper, s);
}
for (i = 0; i < op->num_children; i++) {
spaces(indent);
- printf("//child %d:\n", i);
+ printf("//child %u:\n", i);
slang_print_tree(&op->children[i], indent);
}
}
@@ -804,7 +804,7 @@ int
slang_checksum_tree(const slang_operation *op)
{
int s = op->num_children;
- int i;
+ GLuint i;
for (i = 0; i < op->num_children; i++) {
s += slang_checksum_tree(&op->children[i]);