llvmpipe: pass layer count to rast clear
this otherwise passes the fb layer, which is not quite right when using multiview with view indexing cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
This commit is contained in:
committed by
Marge Bot
parent
e19f4c043d
commit
5ef60aef63
@@ -168,7 +168,7 @@ lp_rast_clear_color(struct lp_rasterizer_task *task,
|
||||
0,
|
||||
task->width,
|
||||
task->height,
|
||||
scene->fb_max_layer + 1,
|
||||
scene->cbufs[cbuf].layer_count,
|
||||
&uc);
|
||||
}
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ init_scene_texture(struct lp_scene_surface *ssurf, struct pipe_surface *psurf)
|
||||
assert(ssurf->map);
|
||||
ssurf->format_bytes = util_format_get_blocksize(psurf->format);
|
||||
ssurf->nr_samples = util_res_sample_count(psurf->texture);
|
||||
ssurf->layer_count = psurf->u.tex.last_layer - psurf->u.tex.first_layer + 1;
|
||||
} else {
|
||||
struct llvmpipe_resource *lpr = llvmpipe_resource(psurf->texture);
|
||||
unsigned pixstride = util_format_get_blocksize(psurf->format);
|
||||
|
||||
@@ -127,6 +127,7 @@ struct lp_scene_surface {
|
||||
unsigned format_bytes;
|
||||
unsigned sample_stride;
|
||||
unsigned nr_samples;
|
||||
unsigned layer_count;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user