summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-06-26 09:34:02 -0600
committerBrian Paul <[email protected]>2013-06-26 10:42:59 -0600
commitbc6eb8068ff2faed93b79d5858c223da9d0c7689 (patch)
tree3b3ba2173ba72d5ed4ba4534961df2f3741aa31e /src/mesa
parent202299d16e64eea0552c6c9a96139823a8244e4d (diff)
st/mesa: add casts to silence MSVC warnings
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c2
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c4
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c2
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c6
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 27a910b5fca..723ab561cfd 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -205,7 +205,7 @@ static void st_bind_ubos(struct st_context *st,
* Take the minimum just to be sure.
*/
if (!binding->AutomaticSize)
- cb.buffer_size = MIN2(cb.buffer_size, binding->Size);
+ cb.buffer_size = MIN2(cb.buffer_size, (unsigned) binding->Size);
}
else {
cb.buffer_offset = 0;
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index b8e2fad25d7..8da664afbf2 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -346,8 +346,8 @@ is_scissor_enabled(struct gl_context *ctx, struct gl_renderbuffer *rb)
return ctx->Scissor.Enabled &&
(ctx->Scissor.X > 0 ||
ctx->Scissor.Y > 0 ||
- ctx->Scissor.Width < rb->Width ||
- ctx->Scissor.Height < rb->Height);
+ (unsigned) ctx->Scissor.Width < rb->Width ||
+ (unsigned) ctx->Scissor.Height < rb->Height);
}
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 9fab113fa76..b5df58c033f 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -208,7 +208,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y,
const uint bytesPerRow = width * util_format_get_blocksize(dst_format);
GLuint row;
- for (row = 0; row < height; row++) {
+ for (row = 0; row < (unsigned) height; row++) {
GLvoid *dest = _mesa_image_address3d(pack, pixels,
width, height, format,
type, 0, row, 0);
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 68c334ed8a0..c167744f4dd 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -734,7 +734,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
const uint bytesPerRow = width * util_format_get_blocksize(src_format);
GLuint row, slice;
- for (slice = 0; slice < depth; slice++) {
+ for (slice = 0; slice < (unsigned) depth; slice++) {
if (gl_target == GL_TEXTURE_1D_ARRAY) {
/* 1D array textures.
* We need to convert gallium coords to GL coords.
@@ -747,7 +747,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
else {
ubyte *slice_map = map;
- for (row = 0; row < height; row++) {
+ for (row = 0; row < (unsigned) height; row++) {
GLvoid *src = _mesa_image_address3d(unpack, pixels,
width, height, format,
type, slice, row, 0);
@@ -1625,7 +1625,7 @@ st_AllocTextureStorage(struct gl_context *ctx,
GLuint ptWidth, ptHeight, ptDepth, ptLayers, bindings;
enum pipe_format fmt;
GLint level;
- int num_samples = texImage->NumSamples;
+ GLuint num_samples = texImage->NumSamples;
assert(levels > 0);
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index e5512af2a0d..d01a21ebffc 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -118,7 +118,7 @@ compute_num_levels(struct gl_context *ctx,
baseImage = _mesa_get_tex_image(ctx, texObj, target, texObj->BaseLevel);
numLevels = texObj->BaseLevel + baseImage->MaxNumLevels;
- numLevels = MIN2(numLevels, texObj->MaxLevel + 1);
+ numLevels = MIN2(numLevels, (GLuint) texObj->MaxLevel + 1);
assert(numLevels >= 1);
return numLevels;