llvmpipe: tighten up some code in lp_rast_linear_fallback.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
This commit is contained in:
Brian Paul 2022-06-21 14:45:58 -06:00 committed by Marge Bot
parent c7239dfe5d
commit 80f6a31ff3
1 changed files with 4 additions and 10 deletions

View File

@ -94,17 +94,11 @@ shade_quads(struct lp_rasterizer_task *task,
unsigned mask)
{
const struct lp_rast_state *state = task->state;
struct lp_fragment_shader_variant *variant = state->variant;
const struct lp_fragment_shader_variant *variant = state->variant;
const struct lp_scene *scene = task->scene;
uint8_t *color = scene->cbufs[0].map;
unsigned stride = scene->cbufs[0].stride;
uint8_t *cbufs[1];
unsigned strides[1];
color += x * 4;
color += y * stride;
cbufs[0] = color;
strides[0] = stride;
const unsigned stride = scene->cbufs[0].stride;
uint8_t *cbufs[1] = { scene->cbufs[0].map + y * stride + x * 4 };
unsigned strides[1] = { stride };
assert(!variant->key.depth.enabled);