mesa/st: fix unused variable warnings
Reviewed-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -301,8 +301,9 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
|
||||
/* XXX if the bitmap is larger than the max texture size, break
|
||||
* it up into chunks.
|
||||
*/
|
||||
GLuint maxSize = 1 << (pipe->screen->get_param(pipe->screen,
|
||||
PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
|
||||
GLuint MAYBE_UNUSED maxSize =
|
||||
1 << (pipe->screen->get_param(pipe->screen,
|
||||
PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
|
||||
assert(width <= (GLsizei) maxSize);
|
||||
assert(height <= (GLsizei) maxSize);
|
||||
}
|
||||
|
||||
@@ -464,7 +464,6 @@ make_texture(struct st_context *st,
|
||||
|
||||
{
|
||||
struct pipe_transfer *transfer;
|
||||
GLboolean success;
|
||||
GLubyte *dest;
|
||||
const GLbitfield imageTransferStateSave = ctx->_ImageTransferState;
|
||||
|
||||
@@ -497,9 +496,9 @@ make_texture(struct st_context *st,
|
||||
format, type, /* src format/type */
|
||||
pixels, /* data source */
|
||||
unpack);
|
||||
success = GL_TRUE;
|
||||
}
|
||||
else {
|
||||
bool MAYBE_UNUSED success;
|
||||
success = _mesa_texstore(ctx, 2, /* dims */
|
||||
baseInternalFormat, /* baseInternalFormat */
|
||||
mformat, /* mesa_format */
|
||||
@@ -509,13 +508,13 @@ make_texture(struct st_context *st,
|
||||
format, type, /* src format/type */
|
||||
pixels, /* data source */
|
||||
unpack);
|
||||
|
||||
assert(success);
|
||||
}
|
||||
|
||||
/* unmap */
|
||||
pipe_transfer_unmap(pipe, transfer);
|
||||
|
||||
assert(success);
|
||||
|
||||
/* restore */
|
||||
ctx->_ImageTransferState = imageTransferStateSave;
|
||||
}
|
||||
@@ -570,7 +569,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
|
||||
const unsigned fb_width = _mesa_geometric_width(ctx->DrawBuffer);
|
||||
const unsigned fb_height = _mesa_geometric_height(ctx->DrawBuffer);
|
||||
GLfloat x0, y0, x1, y1;
|
||||
GLsizei maxSize;
|
||||
GLsizei MAYBE_UNUSED maxSize;
|
||||
boolean normalized = sv[0]->texture->target == PIPE_TEXTURE_2D;
|
||||
unsigned cso_state_mask;
|
||||
|
||||
|
||||
@@ -2396,7 +2396,7 @@ copy_image_data_to_texture(struct st_context *st,
|
||||
{
|
||||
/* debug checks */
|
||||
{
|
||||
const struct gl_texture_image *dstImage =
|
||||
const struct gl_texture_image MAYBE_UNUSED *dstImage =
|
||||
stObj->base.Image[stImage->base.Face][dstLevel];
|
||||
assert(dstImage);
|
||||
assert(dstImage->Width == stImage->base.Width);
|
||||
|
||||
@@ -1028,7 +1028,7 @@ test_format_conversion(struct st_context *st)
|
||||
|
||||
pf = st_mesa_format_to_pipe_format(st, i);
|
||||
if (pf != PIPE_FORMAT_NONE) {
|
||||
mesa_format mf = st_pipe_format_to_mesa_format(pf);
|
||||
mesa_format MAYBE_UNUSED mf = st_pipe_format_to_mesa_format(pf);
|
||||
assert(mf == i);
|
||||
}
|
||||
}
|
||||
@@ -1044,7 +1044,8 @@ test_format_conversion(struct st_context *st)
|
||||
continue;
|
||||
|
||||
if (mf != MESA_FORMAT_NONE) {
|
||||
enum pipe_format pf = st_mesa_format_to_pipe_format(st, mf);
|
||||
enum pipe_format MAYBE_UNUSED pf =
|
||||
st_mesa_format_to_pipe_format(st, mf);
|
||||
assert(pf == i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user