#include "util/u_format.h"
+#include "util/u_helpers.h"
#include "util/u_inlines.h"
#include "util/u_prim.h"
#include "util/u_prim_restart.h"
svga->curr.rast->templ.cull_face == PIPE_FACE_FRONT_AND_BACK)
goto done;
+ /* Upload a user index buffer. */
+ struct pipe_index_buffer ibuffer_saved = {};
+ if (info->indexed && svga->curr.ib.user_buffer &&
+ !util_save_and_upload_index_buffer(pipe, info, &svga->curr.ib,
+ &ibuffer_saved)) {
+ return;
+ }
+
/*
* Mark currently bound target surfaces as dirty
* doesn't really matter if it is done before drawing.
}
done:
+ if (info->indexed && ibuffer_saved.user_buffer)
+ pipe->set_index_buffer(pipe, &ibuffer_saved);
+
SVGA_STATS_TIME_POP(svga_sws(svga));
-;
}
case PIPE_CAP_NPOT_TEXTURES:
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+ case PIPE_CAP_USER_INDEX_BUFFERS:
return 1;
case PIPE_CAP_TWO_SIDED_STENCIL:
return 1;
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
return 0;
case PIPE_CAP_USER_VERTEX_BUFFERS:
- case PIPE_CAP_USER_INDEX_BUFFERS:
return 0;
case PIPE_CAP_USER_CONSTANT_BUFFERS:
return 1;