mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
draw: fix viewmask iterating
the frontend has to be flushed and setup again if only the viewmask has changed since the last draw Fixes:03cbb7b104("draw: add view_mask rendering support") Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22628> (cherry picked from commitbba644ce82)
This commit is contained in:
parent
f655af3782
commit
cc73ff80af
3 changed files with 6 additions and 4 deletions
|
|
@ -454,7 +454,7 @@
|
|||
"description": "draw: fix viewmask iterating",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "03cbb7b104e532a9969e3d847e95bf52e55f0ab3"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ struct draw_context
|
|||
enum pipe_prim_type prim;
|
||||
unsigned opt; /**< bitmask of PT_x flags */
|
||||
unsigned eltSize; /* saved eltSize for flushing */
|
||||
unsigned viewid; /* saved viewid for flushing */
|
||||
ubyte vertices_per_patch;
|
||||
boolean rebind_parameters;
|
||||
|
||||
|
|
|
|||
|
|
@ -103,9 +103,9 @@ draw_pt_arrays(struct draw_context *draw,
|
|||
*/
|
||||
draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE);
|
||||
frontend = NULL;
|
||||
} else if (draw->pt.eltSize != draw->pt.user.eltSize) {
|
||||
/* Flush draw state if eltSize changed.
|
||||
* This could be improved so only the frontend is flushed since it
|
||||
} else if (draw->pt.eltSize != draw->pt.user.eltSize || draw->pt.viewid != draw->pt.user.viewid) {
|
||||
/* Flush draw state if eltSize or viewid changed.
|
||||
* eltSize changes could be improved so only the frontend is flushed since it
|
||||
* converts all indices to ushorts and the fetch part of the middle
|
||||
* always prepares both linear and indexed.
|
||||
*/
|
||||
|
|
@ -121,6 +121,7 @@ draw_pt_arrays(struct draw_context *draw,
|
|||
|
||||
draw->pt.frontend = frontend;
|
||||
draw->pt.eltSize = draw->pt.user.eltSize;
|
||||
draw->pt.viewid = draw->pt.user.viewid;
|
||||
draw->pt.prim = prim;
|
||||
draw->pt.opt = opt;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue