summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorJan Vesely <[email protected]>2015-01-15 13:41:04 -0500
committerJosé Fonseca <[email protected]>2015-01-21 14:05:52 +0000
commit3cb10cce371cb62e0c4a988ab939bf640b75ebab (patch)
tree40453928615bb6ac1e4e2dfd3e0bdb3933692197 /src/mesa/state_tracker
parentda1f92779d0b65c4a57ea201cca6d370da63a011 (diff)
mesa: Fix some signed-unsigned comparison warnings
v2: s/unsigned int/unsigned/ in prog_optimize.c Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_blend.c2
-rw-r--r--src/mesa/state_tracker/st_atom_scissor.c2
-rw-r--r--src/mesa/state_tracker/st_atom_viewport.c2
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c6
-rw-r--r--src/mesa/state_tracker/st_draw.c2
-rw-r--r--src/mesa/state_tracker/st_extensions.c5
-rw-r--r--src/mesa/state_tracker/st_format.c3
-rw-r--r--src/mesa/state_tracker/st_manager.c2
-rw-r--r--src/mesa/state_tracker/st_program.c2
9 files changed, 14 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index 064e0c14f1f..6bb4077f370 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -175,7 +175,7 @@ static GLboolean
blend_per_rt(const struct gl_context *ctx)
{
if (ctx->Color.BlendEnabled &&
- (ctx->Color.BlendEnabled != ((1 << ctx->Const.MaxDrawBuffers) - 1))) {
+ (ctx->Color.BlendEnabled != ((1U << ctx->Const.MaxDrawBuffers) - 1))) {
/* This can only happen if GL_EXT_draw_buffers2 is enabled */
return GL_TRUE;
}
diff --git a/src/mesa/state_tracker/st_atom_scissor.c b/src/mesa/state_tracker/st_atom_scissor.c
index b7203094406..4ebe799e35d 100644
--- a/src/mesa/state_tracker/st_atom_scissor.c
+++ b/src/mesa/state_tracker/st_atom_scissor.c
@@ -47,7 +47,7 @@ update_scissor( struct st_context *st )
const struct gl_context *ctx = st->ctx;
const struct gl_framebuffer *fb = ctx->DrawBuffer;
GLint miny, maxy;
- int i;
+ unsigned i;
bool changed = false;
for (i = 0 ; i < ctx->Const.MaxViewports; i++) {
scissor[i].minx = 0;
diff --git a/src/mesa/state_tracker/st_atom_viewport.c b/src/mesa/state_tracker/st_atom_viewport.c
index efa056e10cd..2f62590c4f1 100644
--- a/src/mesa/state_tracker/st_atom_viewport.c
+++ b/src/mesa/state_tracker/st_atom_viewport.c
@@ -44,7 +44,7 @@ update_viewport( struct st_context *st )
{
struct gl_context *ctx = st->ctx;
GLfloat yScale, yBias;
- int i;
+ unsigned i;
/* _NEW_BUFFERS
*/
if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 7b6a444e6f5..296ea1e0d29 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -408,9 +408,9 @@ st_update_renderbuffer_surface(struct st_context *st,
{
struct pipe_context *pipe = st->pipe;
struct pipe_resource *resource = strb->texture;
- int rtt_width = strb->Base.Width;
- int rtt_height = strb->Base.Height;
- int rtt_depth = strb->Base.Depth;
+ unsigned rtt_width = strb->Base.Width;
+ unsigned rtt_height = strb->Base.Height;
+ unsigned rtt_depth = strb->Base.Depth;
/*
* For winsys fbo, it is possible that the renderbuffer is sRGB-capable but
* the format of strb->texture is linear (because we have no control over
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index b6ccdd7c232..488f6ead201 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -226,7 +226,7 @@ st_draw_vbo(struct gl_context *ctx,
}
info.indexed = TRUE;
- if (min_index != ~0 && max_index != ~0) {
+ if (min_index != ~0U && max_index != ~0U) {
info.min_index = min_index;
info.max_index = max_index;
}
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index e472b84a833..48ed9d203f1 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -411,7 +411,8 @@ void st_init_extensions(struct pipe_screen *screen,
struct st_config_options *options,
boolean has_lib_dxtc)
{
- int i, glsl_feature_level;
+ unsigned i;
+ int glsl_feature_level;
GLboolean *extension_table = (GLboolean *) extensions;
static const struct st_extension_cap_mapping cap_mapping[] = {
@@ -705,7 +706,7 @@ void st_init_extensions(struct pipe_screen *screen,
extensions->EXT_texture_integer = GL_FALSE;
}
- consts->UniformBooleanTrue = consts->NativeIntegers ? ~0 : fui(1.0f);
+ consts->UniformBooleanTrue = consts->NativeIntegers ? ~0U : fui(1.0f);
/* Below are the cases which cannot be moved into tables easily. */
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 6c53567fca1..66cace106a4 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -1797,7 +1797,8 @@ st_choose_format(struct st_context *st, GLenum internalFormat,
unsigned bindings, boolean allow_dxt)
{
struct pipe_screen *screen = st->pipe->screen;
- int i, j;
+ unsigned i;
+ int j;
enum pipe_format pf;
#ifdef DEBUG
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 606d67891c1..5411d84b043 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -685,7 +685,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
if (attribs->major > 1 || attribs->minor > 0) {
/* Is the actual version less than the requested version?
*/
- if (st->ctx->Version < attribs->major * 10 + attribs->minor) {
+ if (st->ctx->Version < attribs->major * 10U + attribs->minor) {
*error = ST_CONTEXT_ERROR_BAD_VERSION;
st_destroy_context(st);
return NULL;
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 737c2694e7f..10a5f2900da 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1095,7 +1095,7 @@ st_translate_geometry_program(struct st_context *st,
/* find max output slot referenced to compute gs_num_outputs */
for (attr = 0; attr < VARYING_SLOT_MAX; attr++) {
- if (outputMapping[attr] != ~0 && outputMapping[attr] > maxSlot)
+ if (outputMapping[attr] != ~0U && outputMapping[attr] > maxSlot)
maxSlot = outputMapping[attr];
}
gs_num_outputs = maxSlot + 1;