mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 23:41:13 +00:00
vc4: Use util_draw_multi() helper
Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742>
This commit is contained in:
parent
c9137bd118
commit
fc0c3e22c9
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "util/u_blitter.h"
|
||||
#include "util/u_draw.h"
|
||||
#include "util/u_prim.h"
|
||||
#include "util/format/u_format.h"
|
||||
#include "util/u_pack_color.h"
|
||||
@ -292,16 +293,10 @@ vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
|
||||
const struct pipe_draw_start_count *draws,
|
||||
unsigned num_draws)
|
||||
{
|
||||
if (num_draws > 1) {
|
||||
struct pipe_draw_info tmp_info = *info;
|
||||
|
||||
for (unsigned i = 0; i < num_draws; i++) {
|
||||
vc4_draw_vbo(pctx, &tmp_info, indirect, &draws[i], 1);
|
||||
if (tmp_info.increment_draw_id)
|
||||
tmp_info.drawid++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (num_draws > 1) {
|
||||
util_draw_multi(pctx, info, indirect, draws, num_draws);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!indirect && (!draws[0].count || !info->instance_count))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user