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:
parent
c7239dfe5d
commit
80f6a31ff3
|
@ -94,17 +94,11 @@ shade_quads(struct lp_rasterizer_task *task,
|
||||||
unsigned mask)
|
unsigned mask)
|
||||||
{
|
{
|
||||||
const struct lp_rast_state *state = task->state;
|
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;
|
const struct lp_scene *scene = task->scene;
|
||||||
uint8_t *color = scene->cbufs[0].map;
|
const unsigned stride = scene->cbufs[0].stride;
|
||||||
unsigned stride = scene->cbufs[0].stride;
|
uint8_t *cbufs[1] = { scene->cbufs[0].map + y * stride + x * 4 };
|
||||||
uint8_t *cbufs[1];
|
unsigned strides[1] = { stride };
|
||||||
unsigned strides[1];
|
|
||||||
|
|
||||||
color += x * 4;
|
|
||||||
color += y * stride;
|
|
||||||
cbufs[0] = color;
|
|
||||||
strides[0] = stride;
|
|
||||||
|
|
||||||
assert(!variant->key.depth.enabled);
|
assert(!variant->key.depth.enabled);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue