llvmpipe: fix unused variables warnings

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8337>
This commit is contained in:
Michel Zou 2021-01-11 20:31:32 +01:00 committed by Marge Bot
parent bd8e84eb8d
commit d20de35471
2 changed files with 5 additions and 4 deletions

View file

@ -881,8 +881,8 @@ lp_build_depth_stencil_test(struct gallivm_state *gallivm,
/* Sanity checking */
{
const unsigned z_swizzle = format_desc->swizzle[0];
const unsigned s_swizzle = format_desc->swizzle[1];
ASSERTED const unsigned z_swizzle = format_desc->swizzle[0];
ASSERTED const unsigned s_swizzle = format_desc->swizzle[1];
assert(z_swizzle != PIPE_SWIZZLE_NONE ||
s_swizzle != PIPE_SWIZZLE_NONE);

View file

@ -104,8 +104,9 @@ lp_setup_alloc_triangle(struct lp_scene *scene,
tri->inputs.stride = input_array_sz;
{
char *a = (char *)tri;
char *b = (char *)&GET_PLANES(tri)[nr_planes];
ASSERTED char *a = (char *)tri;
ASSERTED char *b = (char *)&GET_PLANES(tri)[nr_planes];
assert(b - a == *tri_size);
}