From 3f0a6c7ac1d13d50dd460358d44586e976195282 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Jun 2022 10:00:11 -0600 Subject: [PATCH] llvmpipe: remove lp_rast_cmd_arg::state field Use the existing 'set_state' field. Some code was using 'state' and other code was using 'set_state'. It didn't really matter since lp_rast_cmd_arg is a union, but this removes some potential confusion. Signed-off-by: Brian Paul Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/drivers/llvmpipe/lp_rast.c | 2 +- src/gallium/drivers/llvmpipe/lp_rast.h | 1 - src/gallium/drivers/llvmpipe/lp_rast_debug.c | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 0e498aaf4a6..f0d56e8a0d7 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -683,7 +683,7 @@ void lp_rast_set_state(struct lp_rasterizer_task *task, const union lp_rast_cmd_arg arg) { - task->state = arg.state; + task->state = arg.set_state; } diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h index c1e712dc2df..277a3810db7 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.h +++ b/src/gallium/drivers/llvmpipe/lp_rast.h @@ -222,7 +222,6 @@ union lp_rast_cmd_arg { uint64_t value; uint64_t mask; } clear_zstencil; - const struct lp_rast_state *state; struct lp_fence *fence; struct llvmpipe_query *query_obj; }; diff --git a/src/gallium/drivers/llvmpipe/lp_rast_debug.c b/src/gallium/drivers/llvmpipe/lp_rast_debug.c index dc46bfd1046..09a4a4fb153 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_debug.c +++ b/src/gallium/drivers/llvmpipe/lp_rast_debug.c @@ -177,7 +177,7 @@ debug_bin( const struct cmd_bin *bin, int x, int y ) while (head) { for (i = 0; i < head->count; i++, j++) { if (head->cmd[i] == LP_RAST_OP_SET_STATE) - state = head->arg[i].state; + state = head->arg[i].set_state; debug_printf("%d: %s %s\n", j, cmd_name(head->cmd[i]), @@ -390,7 +390,7 @@ do_debug_bin( struct tile *tile, debug_printf("%c: %15s", val, cmd_name(block->cmd[k])); if (block->cmd[k] == LP_RAST_OP_SET_STATE) - tile->state = block->arg[k].state; + tile->state = block->arg[k].set_state; if (block->cmd[k] == LP_RAST_OP_CLEAR_COLOR || block->cmd[k] == LP_RAST_OP_CLEAR_ZSTENCIL)