cso_draw_vbo(struct cso_context *cso,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count draw)
+ const struct pipe_draw_start_count_bias draw)
{
struct u_vbuf *vbuf = cso->vbuf_current;
void
cso_multi_draw(struct cso_context *cso,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct u_vbuf *vbuf = cso->vbuf_current;
cso_draw_arrays(struct cso_context *cso, uint mode, uint start, uint count)
{
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
util_draw_init_info(&info);
uint start_instance, uint instance_count)
{
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
util_draw_init_info(&info);
cso_draw_vbo(struct cso_context *cso,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count draw);
+ const struct pipe_draw_start_count_bias draw);
/* info->draw_id can be changed by the callee if increment_draw_id is true. */
void
cso_multi_draw(struct cso_context *cso,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
void
void draw_vbo(struct draw_context *draw,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
static boolean
draw_pt_arrays(struct draw_context *draw,
unsigned prim,
- const struct pipe_draw_start_count *draw_info,
+ const struct pipe_draw_start_count_bias *draw_info,
unsigned num_draws)
{
struct draw_pt_front_end *frontend = NULL;
const void *elements)
{
const unsigned elt_max = draw->pt.user.eltMax;
- struct pipe_draw_start_count cur;
+ struct pipe_draw_start_count_bias cur;
cur.start = start;
cur.count = 0;
static void
draw_pt_arrays_restart(struct draw_context *draw,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw_info,
+ const struct pipe_draw_start_count_bias *draw_info,
unsigned num_draws)
{
const unsigned prim = info->mode;
static void
resolve_draw_info(const struct pipe_draw_info *raw_info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *raw_draw,
+ const struct pipe_draw_start_count_bias *raw_draw,
struct pipe_draw_info *info,
- struct pipe_draw_start_count *draw,
+ struct pipe_draw_start_count_bias *draw,
struct pipe_vertex_buffer *vertex_buffer)
{
memcpy(info, raw_info, sizeof(struct pipe_draw_info));
- memcpy(draw, raw_draw, sizeof(struct pipe_draw_start_count));
+ memcpy(draw, raw_draw, sizeof(struct pipe_draw_start_count_bias));
struct draw_so_target *target =
(struct draw_so_target *)indirect->count_from_stream_output;
static void
draw_instances(struct draw_context *draw,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
unsigned instance;
draw_vbo(struct draw_context *draw,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
unsigned index_limit;
unsigned fpstate = util_fpstate_get();
struct pipe_draw_info resolved_info;
- struct pipe_draw_start_count resolved_draw;
+ struct pipe_draw_start_count_bias resolved_draw;
struct pipe_draw_info *use_info = (struct pipe_draw_info *)info;
- struct pipe_draw_start_count *use_draws = (struct pipe_draw_start_count *)draws;
+ struct pipe_draw_start_count_bias *use_draws = (struct pipe_draw_start_count_bias *)draws;
if (info->instance_count == 0)
return;
static void
dd_dump_draw_vbo(struct dd_draw_state *dstate, struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw, FILE *f)
+ const struct pipe_draw_start_count_bias *draw, FILE *f)
{
int sh, i;
dd_context_draw_vbo(struct pipe_context *_pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct dd_context *dctx = dd_context(_pipe);
struct call_draw_info {
struct pipe_draw_info info;
struct pipe_draw_indirect_info indirect;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
};
struct call_get_query_result_resource {
static void noop_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
}
static void
rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *_info,
const struct pipe_draw_indirect_info *_indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
trace_context_draw_vbo(struct pipe_context *_pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct trace_context *tr_ctx = trace_context(_pipe);
trace_dump_struct_end();
}
-void trace_dump_draw_start_count(const struct pipe_draw_start_count *state)
+void trace_dump_draw_start_count(const struct pipe_draw_start_count_bias *state)
{
if (!trace_dumping_enabled_locked())
return;
- trace_dump_struct_begin("pipe_draw_start_count");
+ trace_dump_struct_begin("pipe_draw_start_count_bias");
trace_dump_member(uint, state, start);
trace_dump_member(uint, state, count);
trace_dump_struct_end();
void trace_dump_draw_info(const struct pipe_draw_info *state);
-void trace_dump_draw_start_count(const struct pipe_draw_start_count *state);
+void trace_dump_draw_start_count(const struct pipe_draw_start_count_bias *state);
void trace_dump_draw_indirect_info(const struct pipe_draw_indirect_info *state);
util_primconvert_draw_vbo(struct primconvert_context *pc,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct pipe_draw_info new_info;
- struct pipe_draw_start_count new_draw;
+ struct pipe_draw_start_count_bias new_draw;
struct pipe_transfer *src_transfer = NULL;
u_translate_func trans_func;
u_generate_func gen_func;
return;
}
- const struct pipe_draw_start_count *draw = &draws[0];
+ const struct pipe_draw_start_count_bias *draw = &draws[0];
/* Filter out degenerate primitives, u_upload_alloc() will assert
* on size==0 so just bail:
void util_primconvert_draw_vbo(struct primconvert_context *pc,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
#endif /* U_PRIMCONVERT_H_ */
}
for (unsigned i = 0; i < draw_count; i++) {
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
draw.count = params[0];
info.instance_count = params[1];
void
util_draw_multi(struct pipe_context *pctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct pipe_draw_info tmp_info = *info;
uint count)
{
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
util_draw_init_info(&info);
info.mode = mode;
uint count)
{
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
util_draw_init_info(&info);
info.index.user = indices;
uint instance_count)
{
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
util_draw_init_info(&info);
info.mode = mode;
uint instance_count)
{
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
util_draw_init_info(&info);
info.index.user = indices;
void
util_draw_multi(struct pipe_context *pctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
unsigned
util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state);
void
-util_dump_draw_start_count(FILE *stream, const struct pipe_draw_start_count *state);
+util_dump_draw_start_count(FILE *stream, const struct pipe_draw_start_count_bias *state);
void
util_dump_draw_indirect_info(FILE *stream,
}
void
-util_dump_draw_start_count(FILE *stream, const struct pipe_draw_start_count *state)
+util_dump_draw_start_count(FILE *stream, const struct pipe_draw_start_count_bias *state)
{
- util_dump_struct_begin(stream, "pipe_draw_start_count");
+ util_dump_struct_begin(stream, "pipe_draw_start_count_bias");
util_dump_member(stream, uint, state, start);
util_dump_member(stream, uint, state, count);
util_dump_struct_end(stream);
bool
util_upload_index_buffer(struct pipe_context *pipe,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
struct pipe_resource **out_buffer,
unsigned *out_offset, unsigned alignment)
{
bool util_upload_index_buffer(struct pipe_context *pipe,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
struct pipe_resource **out_buffer,
unsigned *out_offset, unsigned alignment);
util_translate_prim_restart_ib(struct pipe_context *context,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect_info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
struct pipe_resource **dst_buffer)
{
struct pipe_screen *screen = context->screen;
util_draw_vbo_without_prim_restart(struct pipe_context *context,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect_info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
const void *src_map;
struct range_info ranges = {0};
struct pipe_draw_info new_info;
- struct pipe_draw_start_count new_draw;
+ struct pipe_draw_start_count_bias new_draw;
struct pipe_transfer *src_transfer = NULL;
unsigned i, start, count;
DrawElementsIndirectCommand indirect;
util_translate_prim_restart_ib(struct pipe_context *context,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
struct pipe_resource **dst_buffer);
enum pipe_error
util_draw_vbo_without_prim_restart(struct pipe_context *context,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
static inline unsigned
util_prim_restart_index_from_size(unsigned index_size)
first_info->info.drawid == 0 &&
is_next_call_a_mergeable_draw(first_info, next, &next_info)) {
/* Merge up to 256 draw calls. */
- struct pipe_draw_start_count multi[256];
+ struct pipe_draw_start_count_bias multi[256];
unsigned num_draws = 2;
/* u_threaded_context stores start/count in min/max_index for single draws. */
/* u_threaded_context stores start/count in min/max_index for single draws. */
/* Drivers using u_threaded_context shouldn't use min/max_index. */
- struct pipe_draw_start_count *draw =
- (struct pipe_draw_start_count *)&info->info.min_index;
- STATIC_ASSERT(offsetof(struct pipe_draw_start_count, start) == 0);
- STATIC_ASSERT(offsetof(struct pipe_draw_start_count, count) == 4);
+ struct pipe_draw_start_count_bias *draw =
+ (struct pipe_draw_start_count_bias *)&info->info.min_index;
+ STATIC_ASSERT(offsetof(struct pipe_draw_start_count_bias, start) == 0);
+ STATIC_ASSERT(offsetof(struct pipe_draw_start_count_bias, count) == 4);
info->info.index_bounds_valid = false;
info->info.has_user_indices = false;
struct tc_draw_indirect {
struct pipe_draw_info info;
struct pipe_draw_indirect_info indirect;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
};
static void
struct tc_draw_multi {
struct pipe_draw_info info;
unsigned num_draws;
- struct pipe_draw_start_count slot[]; /* variable-sized array */
+ struct pipe_draw_start_count_bias slot[]; /* variable-sized array */
};
static void
void
tc_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
STATIC_ASSERT(DRAW_INFO_SIZE_WITHOUT_INDEXBUF_AND_MIN_MAX_INDEX +
void
tc_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
static inline struct threaded_context *
static enum pipe_error
u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned vb_mask, unsigned out_vb,
int start_vertex, unsigned num_vertices,
int min_index, boolean unroll_indices)
static boolean
u_vbuf_translate_begin(struct u_vbuf *mgr,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
int start_vertex, unsigned num_vertices,
int min_index, boolean unroll_indices)
{
void u_vbuf_get_minmax_index(struct pipe_context *pipe,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned *out_min_index, unsigned *out_max_index)
{
struct pipe_transfer *transfer = NULL;
assert(info->index_size);
for (unsigned i = 0; i < draw_count; i++) {
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
unsigned offset = i * stride / 4;
draw.count = indirect_data[offset + 0];
void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count draw)
+ const struct pipe_draw_start_count_bias draw)
{
struct pipe_context *pipe = mgr->pipe;
int start_vertex;
const uint32_t incompatible_vb_mask =
mgr->incompatible_vb_mask & used_vb_mask;
struct pipe_draw_info new_info;
- struct pipe_draw_start_count new_draw;
+ struct pipe_draw_start_count_bias new_draw;
/* Normal draw. No fallback and no user buffers. */
if (!incompatible_vb_mask &&
const struct pipe_vertex_buffer *bufs);
void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count draw);
+ const struct pipe_draw_start_count_bias draw);
void u_vbuf_get_minmax_index(struct pipe_context *pipe,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned *out_min_index, unsigned *out_max_index);
/* Save/restore functionality. */
d3d12_draw_vbo(struct pipe_context *pctx,
const struct pipe_draw_info *dinfo,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
void
static unsigned
fill_state_vars(struct d3d12_context *ctx,
const struct pipe_draw_info *dinfo,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
struct d3d12_shader *shader,
uint32_t *values)
{
static void
set_graphics_root_parameters(struct d3d12_context *ctx,
const struct pipe_draw_info *dinfo,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
unsigned num_params = 0;
twoface_emulation(struct d3d12_context *ctx,
struct d3d12_rasterizer_state *rast,
const struct pipe_draw_info *dinfo,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
/* draw backfaces */
ctx->base.bind_rasterizer_state(&ctx->base, rast->twoface_back);
d3d12_draw_vbo(struct pipe_context *pctx,
const struct pipe_draw_info *dinfo,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
static void
etna_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
static void
draw_impl(struct fd_context *ctx, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw, struct fd_ringbuffer *ring,
+ const struct pipe_draw_start_count_bias *draw, struct fd_ringbuffer *ring,
unsigned index_offset, bool binning) assert_dt
{
OUT_PKT3(ring, CP_SET_CONSTANT, 2);
static bool
fd2_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *pinfo,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *pdraw,
+ const struct pipe_draw_start_count_bias *pdraw,
unsigned index_offset) assert_dt
{
if (!ctx->prog.fs || !ctx->prog.vs)
};
/* clang-format on */
- struct pipe_draw_start_count draw = *pdraw;
+ struct pipe_draw_start_count_bias draw = *pdraw;
unsigned count = draw.count;
unsigned step = step_tbl[pinfo->mode];
unsigned num_vertices = ctx->batch->num_vertices;
static bool
fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned index_offset) in_dt
{
struct fd3_emit emit = {
const struct fd3_program_state *prog;
const struct pipe_draw_info *info;
const struct pipe_draw_indirect_info *indirect;
- const struct pipe_draw_start_count *draw;
+ const struct pipe_draw_start_count_bias *draw;
bool binning_pass;
struct ir3_cache_key key;
enum fd_dirty_3d_state dirty;
static bool
fd4_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned index_offset) in_dt
{
struct fd4_context *fd4_ctx = fd4_context(ctx);
enum pc_di_primtype primtype, enum pc_di_vis_cull_mode vismode,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw, unsigned index_offset)
+ const struct pipe_draw_start_count_bias *draw, unsigned index_offset)
{
struct pipe_resource *idx_buffer = NULL;
enum a4xx_index_size idx_type;
const struct fd4_program_state *prog;
const struct pipe_draw_info *info;
const struct pipe_draw_indirect_info *indirect;
- const struct pipe_draw_start_count *draw;
+ const struct pipe_draw_start_count_bias *draw;
bool binning_pass;
struct ir3_cache_key key;
enum fd_dirty_3d_state dirty;
static bool
fd5_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned index_offset) in_dt
{
struct fd5_context *fd5_ctx = fd5_context(ctx);
enum pc_di_primtype primtype, enum pc_di_vis_cull_mode vismode,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw, unsigned index_offset)
+ const struct pipe_draw_start_count_bias *draw, unsigned index_offset)
{
struct pipe_resource *idx_buffer = NULL;
enum a4xx_index_size idx_type;
const struct fd5_program_state *prog;
const struct pipe_draw_info *info;
const struct pipe_draw_indirect_info *indirect;
- const struct pipe_draw_start_count *draw;
+ const struct pipe_draw_start_count_bias *draw;
bool binning_pass;
struct ir3_cache_key key;
enum fd_dirty_3d_state dirty;
static void
draw_emit(struct fd_ringbuffer *ring, struct CP_DRAW_INDX_OFFSET_0 *draw0,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw, unsigned index_offset)
+ const struct pipe_draw_start_count_bias *draw, unsigned index_offset)
{
if (info->index_size) {
assert(!info->has_user_indices);
static bool
fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned index_offset) assert_dt
{
struct fd6_context *fd6_ctx = fd6_context(ctx);
const struct fd_vertex_state *vtx;
const struct pipe_draw_info *info;
const struct pipe_draw_indirect_info *indirect;
- const struct pipe_draw_start_count *draw;
+ const struct pipe_draw_start_count_bias *draw;
struct ir3_cache_key key;
enum fd_dirty_3d_state dirty;
uint32_t dirty_groups;
static unsigned
prim_count(const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
/* PIPE_PRIM_MAX used internally for RECTLIST blits on 3d pipe: */
unsigned vtx_per_prim =
*/
static unsigned
primitive_stream_size_bits(const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned num_bins)
{
unsigned num_prims = prim_count(info, draw);
void
fd6_vsc_update_sizes(struct fd_batch *batch, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
if (!batch->num_bins_per_pipe) {
batch->num_bins_per_pipe = fd_gmem_estimate_bins_per_pipe(batch);
void fd6_vsc_update_sizes(struct fd_batch *batch,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
#endif /* FD6_VSC_H_ */
.max_index = 1,
.instance_count = MAX2(1, pfb->layers),
};
- struct pipe_draw_start_count draw = {
+ struct pipe_draw_start_count_bias draw = {
.count = 2,
};
pctx->draw_vbo(pctx, &info, NULL, &draw, 1);
/* draw: */
bool (*draw_vbo)(struct fd_context *ctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned index_offset) dt;
bool (*clear)(struct fd_context *ctx, unsigned buffers,
const union pipe_color_union *color, double depth,
static void
update_draw_stats(struct fd_context *ctx, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws) assert_dt
{
ctx->stats.draw_calls++;
static void
fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws, unsigned num_draws) in_dt
+ const struct pipe_draw_start_count_bias *draws, unsigned num_draws) in_dt
{
struct fd_context *ctx = fd_context(pctx);
fd_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring,
enum pc_di_primtype primtype, enum pc_di_vis_cull_mode vismode,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw, unsigned index_offset)
+ const struct pipe_draw_start_count_bias *draw, unsigned index_offset)
{
struct pipe_resource *idx_buffer = NULL;
enum pc_di_index_size idx_type = INDEX_SIZE_IGN;
struct fd_ringbuffer *ring, struct fd_context *ctx,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw) assert_dt
+ const struct pipe_draw_start_count_bias *draw) assert_dt
{
assert(v->need_driver_params);
struct fd_ringbuffer *ring, struct fd_context *ctx,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw) assert_dt
+ const struct pipe_draw_start_count_bias *draw) assert_dt
{
debug_assert(v->type == MESA_SHADER_VERTEX);
static void
i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
void iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
void iris_launch_grid(struct pipe_context *, const struct pipe_grid_info *);
iris_update_draw_parameters(struct iris_context *ice,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
bool changed = false;
iris_indirect_draw_vbo(struct iris_context *ice,
const struct pipe_draw_info *dinfo,
const struct pipe_draw_indirect_info *dindirect,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER];
struct pipe_draw_info info = *dinfo;
iris_simple_draw_vbo(struct iris_context *ice,
const struct pipe_draw_info *draw,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *sc)
+ const struct pipe_draw_start_count_bias *sc)
{
struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER];
void
iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
enum intel_measure_snapshot_type type,
const struct pipe_draw_info *draw,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *sc)
+ const struct pipe_draw_start_count_bias *sc)
{
const struct intel_measure_config *config = config_from_context(ice);
enum intel_measure_snapshot_type type,
const struct pipe_draw_info *draw,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *sc);
+ const struct pipe_draw_start_count_bias *sc);
#define iris_measure_snapshot(ice, batch, type, draw, indirect, start_count) \
if (unlikely(((struct iris_screen *) ice->ctx.screen)->measure.config)) \
struct iris_batch *batch,
const struct pipe_draw_info *draw,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *sc);
+ const struct pipe_draw_start_count_bias *sc);
void (*update_surface_base_address)(struct iris_batch *batch,
struct iris_binder *binder);
void (*upload_compute_state)(struct iris_context *ice,
struct iris_batch *batch,
const struct pipe_draw_info *draw,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *sc)
+ const struct pipe_draw_start_count_bias *sc)
{
bool use_predicate = ice->state.predicate == IRIS_PREDICATE_STATE_USE_BIT;
static void
lima_pack_vs_cmd(struct lima_context *ctx, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct lima_context_constant_buffer *ccb =
ctx->const_buffer + PIPE_SHADER_VERTEX;
static void
lima_pack_plbu_cmd(struct lima_context *ctx, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct lima_vs_compiled_shader *vs = ctx->vs;
struct pipe_scissor_state *cscissor = &ctx->clipped_scissor;
static void
lima_update_gp_attribute_info(struct lima_context *ctx, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct lima_job *job = lima_job_get(ctx);
struct lima_vertex_element_state *ve = ctx->vertex_elements;
static void
lima_update_varying(struct lima_context *ctx, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct lima_job *job = lima_job_get(ctx);
struct lima_screen *screen = lima_screen(ctx->base.screen);
static void
lima_draw_vbo_update(struct pipe_context *pctx,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct lima_context *ctx = lima_context(pctx);
struct lima_context_framebuffer *fb = &ctx->framebuffer;
static void
lima_draw_vbo_indexed(struct pipe_context *pctx,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct lima_context *ctx = lima_context(pctx);
struct lima_job *job = lima_job_get(ctx);
static void
lima_draw_vbo_count(struct pipe_context *pctx,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
static const uint32_t max_verts = 65535;
- struct pipe_draw_start_count local_draw = *draw;
+ struct pipe_draw_start_count_bias local_draw = *draw;
unsigned start = draw->start;
unsigned count = draw->count;
lima_draw_vbo(struct pipe_context *pctx,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
static void
llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (!indirect && (!draws[0].count || !info->instance_count))
void
nv30_push_vbo(struct nv30_context *nv30, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
void
nv30_draw_init(struct pipe_context *pipe);
void
nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
bool
nv30_state_validate(struct nv30_context *nv30, uint32_t mask, bool hwtnl);
void
nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw_one)
+ const struct pipe_draw_start_count_bias *draw_one)
{
struct nv30_context *nv30 = nv30_context(pipe);
struct draw_context *draw = nv30->draw;
void
nv30_push_vbo(struct nv30_context *nv30, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct push_context ctx;
unsigned i, index_size;
static void
nv30_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
/* nv50_vbo.c */
void nv50_draw_vbo(struct pipe_context *, const struct pipe_draw_info *,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
void *
/* nv50_push.c */
void nv50_push_vbo(struct nv50_context *, const struct pipe_draw_info *,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
/* nv84_video.c */
struct pipe_video_codec *
void
nv50_push_vbo(struct nv50_context *nv50, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct push_context ctx;
unsigned i, index_size;
void
nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
/* nvc0_vbo.c */
void nvc0_draw_vbo(struct pipe_context *, const struct pipe_draw_info *,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
void *
/* nvc0_push.c */
void nvc0_push_vbo(struct nvc0_context *, const struct pipe_draw_info *,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
void nvc0_push_vbo_indirect(struct nvc0_context *, const struct pipe_draw_info *,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
/* nve4_compute.c */
void nve4_launch_grid(struct pipe_context *, const struct pipe_grid_info *);
void
nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
static void nvc0_push_upload_vertex_ids(struct push_context *,
struct nvc0_context *,
const struct pipe_draw_info *,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
static void
nvc0_push_context_init(struct nvc0_context *nvc0, struct push_context *ctx)
void
nvc0_push_vbo_indirect(struct nvc0_context *nvc0, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
/* The strategy here is to just read the commands from the indirect buffer
* and do the draws. This is suboptimal, but will only happen in the case
uint8_t *buf_data = nouveau_resource_map_offset(
&nvc0->base, buf, indirect->offset, NOUVEAU_BO_RD);
struct pipe_draw_info single = *info;
- struct pipe_draw_start_count sdraw = *draw;
+ struct pipe_draw_start_count_bias sdraw = *draw;
for (i = 0; i < draw_count; i++, buf_data += indirect->stride) {
if (info->index_size) {
DrawElementsIndirectCommand *cmd = (void *)buf_data;
void
nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct push_context ctx;
unsigned i, index_size;
nvc0_push_upload_vertex_ids(struct push_context *ctx,
struct nvc0_context *nvc0,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct nouveau_pushbuf *push = ctx->push;
mali_ptr
panfrost_get_index_buffer_bounded(struct panfrost_context *ctx,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned *min_index, unsigned *max_index)
{
struct panfrost_resource *rsrc = pan_resource(info->index.resource);
mali_ptr
panfrost_get_index_buffer_bounded(struct panfrost_context *ctx,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned *min_index, unsigned *max_index);
void
panfrost_statistics_record(
struct panfrost_context *ctx,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
if (!ctx->active_queries)
return;
static void
panfrost_draw_emit_tiler(struct panfrost_batch *batch,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
void *invocation_template,
mali_ptr shared_mem, mali_ptr indices,
mali_ptr fs_vary, mali_ptr varyings,
static void
panfrost_direct_draw(struct panfrost_context *ctx,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
if (!draw->count || !info->instance_count)
return;
panfrost_indirect_draw(struct panfrost_context *ctx,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
if (indirect->count_from_stream_output) {
- struct pipe_draw_start_count tmp_draw = *draw;
+ struct pipe_draw_start_count_bias tmp_draw = *draw;
struct panfrost_streamout_target *so =
pan_so_target(indirect->count_from_stream_output);
panfrost_draw_vbo(struct pipe_context *pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct panfrost_context *ctx = pan_context(pipe);
static void r300_draw_arrays_immediate(struct r300_context *r300,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct pipe_vertex_element* velem;
struct pipe_vertex_buffer* vbuf;
static void r300_draw_elements_immediate(struct r300_context *r300,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
const uint8_t *ptr1;
const uint16_t *ptr2;
static void r300_draw_elements(struct r300_context *r300,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
int instance_id)
{
struct pipe_resource *indexBuffer =
static void r300_draw_arrays(struct r300_context *r300,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
int instance_id)
{
boolean alt_num_verts = r300->screen->caps.is_r500 &&
static void r300_draw_arrays_instanced(struct r300_context *r300,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
int i;
static void r300_draw_elements_instanced(struct r300_context *r300,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
int i;
static void r300_draw_vbo(struct pipe_context* pipe,
const struct pipe_draw_info *dinfo,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
struct r300_context* r300 = r300_context(pipe);
struct pipe_draw_info info = *dinfo;
- struct pipe_draw_start_count draw = draws[0];
+ struct pipe_draw_start_count_bias draw = draws[0];
if (r300->skip_rendering ||
!u_trim_pipe_prim(info.mode, &draw.count)) {
static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
}
struct r300_context* r300 = r300_context(pipe);
- struct pipe_draw_start_count draw = draws[0];
+ struct pipe_draw_start_count_bias draw = draws[0];
if (r300->skip_rendering) {
return;
void (*draw_vbo)(struct pipe_context *pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
uint32_t rs_cull_mode;
static void r300_stencilref_draw_vbo(struct pipe_context *pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct r300_context *r300 = r300_context(pipe);
static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
enum si_prim_discard_outcome
si_prepare_prim_discard_or_split_draw(struct si_context *sctx, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws, bool primitive_restart,
unsigned total_count)
{
/* Split single draws if splitting multi draws isn't enough. */
struct pipe_draw_info split_draw = *info;
- struct pipe_draw_start_count split_draw_range = draws[0];
+ struct pipe_draw_start_count_bias split_draw_range = draws[0];
unsigned base_start = split_draw_range.start;
split_draw.primitive_restart = primitive_restart;
typedef void (*pipe_draw_vbo_func)(struct pipe_context *pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
struct si_context {
void si_build_prim_discard_compute_shader(struct si_shader_context *ctx);
enum si_prim_discard_outcome
si_prepare_prim_discard_or_split_draw(struct si_context *sctx, const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws, bool primitive_restart,
unsigned total_count);
void si_compute_signal_gfx(struct si_context *sctx);
template <chip_class GFX_VERSION, si_has_ngg NGG, si_has_prim_discard_cs ALLOW_PRIM_DISCARD_CS>
static void si_emit_draw_packets(struct si_context *sctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws,
struct pipe_resource *indexbuf, unsigned index_size,
unsigned index_offset, unsigned instance_count,
static void si_get_draw_start_count(struct si_context *sctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws, unsigned *start, unsigned *count)
{
if (indirect && !indirect->count_from_stream_output) {
static void si_draw_vbo(struct pipe_context *ctx,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
/* Keep code that uses the least number of local variables as close to the beginning
pipe->bind_vs_state(pipe, si_get_blitter_vs(sctx, type, num_instances));
struct pipe_draw_info info = {};
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
info.mode = SI_PRIM_RECTANGLE_LIST;
info.instance_count = num_instances;
static void si_invalid_draw_vbo(struct pipe_context *pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
unreachable("vertex shader not bound");
softpipe_draw_vbo(struct pipe_context *pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
softpipe_draw_vbo(struct pipe_context *pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
void
enum pipe_error
svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned count);
boolean
static enum pipe_error
translate_indices(struct svga_hwtnl *hwtnl,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
enum pipe_prim_type gen_prim,
unsigned orig_nr, unsigned gen_nr,
unsigned gen_size,
enum pipe_error
svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned count)
{
struct pipe_context *pipe = &hwtnl->svga->pipe;
static enum pipe_error
retry_draw_range_elements(struct svga_context *svga,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw,
+ const struct pipe_draw_start_count_bias *draw,
unsigned count)
{
SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_DRAWELEMENTS);
static void
svga_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
svga_swtnl_draw_vbo(struct svga_context *svga,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
#endif
.min_index = svga_render->min_index,
.max_index = svga_render->max_index,
};
- const struct pipe_draw_start_count draw = {
+ const struct pipe_draw_start_count_bias draw = {
.start = 0,
.count = nr_indices,
};
svga_swtnl_draw_vbo(struct svga_context *svga,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw_one)
+ const struct pipe_draw_start_count_bias *draw_one)
{
struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = { 0 };
struct pipe_transfer *ib_transfer = NULL;
static void
swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
swr_update_draw_context(ctx);
struct pipe_draw_info resolved_info;
- struct pipe_draw_start_count resolved_draw;
+ struct pipe_draw_start_count_bias resolved_draw;
/* DrawTransformFeedback */
if (indirect && indirect->count_from_stream_output) {
// trick copied from softpipe to modify const struct *info
void
swr_update_derived(struct pipe_context *pipe,
const struct pipe_draw_info *p_draw_info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
struct swr_context *ctx = swr_context(pipe);
struct swr_screen *screen = swr_screen(pipe->screen);
void swr_update_derived(struct pipe_context *,
const struct pipe_draw_info * = nullptr,
- const struct pipe_draw_start_count *draw = nullptr);
+ const struct pipe_draw_start_count_bias *draw = nullptr);
/*
* Conversion functions: Convert mesa state defines to SWR.
tegra_draw_vbo(struct pipe_context *pcontext,
const struct pipe_draw_info *pinfo,
const struct pipe_draw_indirect_info *pindirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
static void
v3d_update_primitives_generated_counter(struct v3d_context *v3d,
const struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
assert(!v3d->prog.gs);
static void
v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
static void
vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
static void virgl_draw_vbo(struct pipe_context *ctx,
const struct pipe_draw_info *dinfo,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (num_draws > 1) {
int virgl_encoder_draw_vbo(struct virgl_context *ctx,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw)
+ const struct pipe_draw_start_count_bias *draw)
{
uint32_t length = VIRGL_DRAW_VBO_SIZE;
if (info->mode == PIPE_PRIM_PATCHES)
int virgl_encoder_draw_vbo(struct virgl_context *ctx,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draw);
+ const struct pipe_draw_start_count_bias *draw);
int virgl_encoder_create_surface(struct virgl_context *ctx,
zink_draw_vbo(struct pipe_context *pctx,
const struct pipe_draw_info *dinfo,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
void
zink_draw_vbo(struct pipe_context *pctx,
const struct pipe_draw_info *dinfo,
const struct pipe_draw_indirect_info *dindirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (!dindirect && (!draws[0].count || !dinfo->instance_count))
LVP_FROM_HANDLE(lvp_cmd_buffer, cmd_buffer, commandBuffer);
struct lvp_cmd_buffer_entry *cmd;
- uint32_t cmd_size = sizeof(struct pipe_draw_start_count);
+ uint32_t cmd_size = sizeof(struct pipe_draw_start_count_bias);
cmd = cmd_buf_entry_alloc_size(cmd_buffer, cmd_size, LVP_CMD_DRAW);
if (!cmd)
return;
LVP_FROM_HANDLE(lvp_cmd_buffer, cmd_buffer, commandBuffer);
struct lvp_cmd_buffer_entry *cmd;
- uint32_t cmd_size = sizeof(struct pipe_draw_start_count);
+ uint32_t cmd_size = sizeof(struct pipe_draw_start_count_bias);
cmd = cmd_buf_entry_alloc_size(cmd_buffer, cmd_size, LVP_CMD_DRAW_INDEXED);
if (!cmd)
return;
struct rendering_state *state, bool indexed)
{
const struct lvp_subpass *subpass = &state->pass->subpasses[state->subpass];
- struct pipe_draw_start_count draw = {0};
+ struct pipe_draw_start_count_bias draw = {0};
if (indexed) {
state->info.index_bounds_valid = false;
state->info.index_size = state->index_size;
struct rendering_state *state, bool indexed)
{
const struct lvp_subpass *subpass = &state->pass->subpasses[state->subpass];
- struct pipe_draw_start_count draw = {0};
+ struct pipe_draw_start_count_bias draw = {0};
if (indexed) {
state->info.index_bounds_valid = false;
state->info.index_size = state->index_size;
{
struct lvp_cmd_draw_indirect_byte_count *dibc = &cmd->u.draw_indirect_byte_count;
const struct lvp_subpass *subpass = &state->pass->subpasses[state->subpass];
- struct pipe_draw_start_count draw = {0};
+ struct pipe_draw_start_count_bias draw = {0};
pipe_buffer_read(state->pctx,
dibc->counter_buffer->bo,
uint32_t instance_count;
uint32_t first_instance;
uint32_t draw_count;
- struct pipe_draw_start_count draws[0];
+ struct pipe_draw_start_count_bias draws[0];
};
struct lvp_cmd_draw_indexed {
uint32_t first_instance;
bool calc_start;
uint32_t draw_count;
- struct pipe_draw_start_count draws[0];
+ struct pipe_draw_start_count_bias draws[0];
};
struct lvp_cmd_draw_indirect {
struct pipe_stream_output_info so;
struct pipe_stream_output_target *target;
struct pipe_draw_info draw;
- struct pipe_draw_start_count sc;
+ struct pipe_draw_start_count_bias sc;
struct pipe_box box;
bool programmable_vs = This->state.vs && !(This->state.vdecl && This->state.vdecl->position_t);
unsigned offsets[1] = {0};
static inline void
init_draw_info(struct pipe_draw_info *info,
- struct pipe_draw_start_count *draw,
+ struct pipe_draw_start_count_bias *draw,
struct NineDevice9 *dev, D3DPRIMITIVETYPE type, UINT count)
{
info->mode = d3dprimitivetype_to_pipe_prim(type);
{
struct nine_context *context = &device->context;
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
nine_update_state(device);
{
struct nine_context *context = &device->context;
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
nine_update_state(device);
{
struct nine_context *context = &device->context;
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
nine_update_state(device);
struct pipe_device_reset_callback;
struct pipe_draw_info;
struct pipe_draw_indirect_info;
-struct pipe_draw_start_count;
+struct pipe_draw_start_count_bias;
struct pipe_grid_info;
struct pipe_fence_handle;
struct pipe_framebuffer_state;
void (*draw_vbo)(struct pipe_context *pipe,
const struct pipe_draw_info *info,
const struct pipe_draw_indirect_info *indirect,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
/*@}*/
struct pipe_stream_output_target *count_from_stream_output;
};
-struct pipe_draw_start_count {
+struct pipe_draw_start_count_bias {
unsigned start;
unsigned count;
+ int index_bias; /**< a bias to be added to each index */
};
/**
{
union pipe_color_union clear_color = { {1,0,1,1} };
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
ctx->clear(ctx, PIPE_CLEAR_COLOR, NULL, &clear_color, 0, 0);
struct _mesa_prim;
struct _mesa_index_buffer;
struct pipe_draw_info;
-struct pipe_draw_start_count;
+struct pipe_draw_start_count_bias;
/* GL_ARB_vertex_buffer_object */
/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
*/
void (*DrawGallium)(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
/**
*/
void (*DrawGalliumComplex)(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
const unsigned char *mode,
const int *base_vertex,
unsigned num_draws);
void
_mesa_draw_gallium_fallback(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct _mesa_index_buffer ib;
void
_mesa_draw_gallium_complex_fallback(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
const unsigned char *mode,
const int *base_vertex,
unsigned num_draws)
* draws.
*/
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
info.mode = mode;
info.vertices_per_patch = ctx->TessCtrlProgram.patch_vertices;
return;
struct pipe_draw_info info;
- struct pipe_draw_start_count *draw;
+ struct pipe_draw_start_count_bias *draw;
ALLOC_PRIMS(draw, primcount, "glMultiDrawElements");
}
struct pipe_draw_info info;
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
unsigned index_size_shift = get_index_size_shift(type);
struct gl_buffer_object *index_bo = ctx->Array.VAO->IndexBufferObj;
* greater than UINT32_MAX bytes.
*/
max_index_ptr - min_index_ptr <= UINT32_MAX)) {
- struct pipe_draw_start_count *draw;
+ struct pipe_draw_start_count_bias *draw;
ALLOC_PRIMS(draw, primcount, "glMultiDrawElements");
info.increment_draw_id = false;
for (int i = 0; i < primcount; i++) {
- struct pipe_draw_start_count draw;
+ struct pipe_draw_start_count_bias draw;
if (!count[i])
continue;
void
_mesa_draw_gallium_fallback(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
void
_mesa_draw_gallium_complex_fallback(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
const unsigned char *mode,
const int *base_vertex,
unsigned num_draws);
struct st_context *st,
struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
if (info->index_size) {
static void
st_draw_gallium(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
struct st_context *st = st_context(ctx);
static void
st_draw_gallium_complex(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
const unsigned char *mode,
const int *base_vertex,
unsigned num_draws)
struct st_context *st = st_context(ctx);
struct pipe_draw_info info;
struct pipe_draw_indirect_info indirect;
- struct pipe_draw_start_count draw = {0};
+ struct pipe_draw_start_count_bias draw = {0};
assert(stride);
prepare_draw(st, ctx);
struct st_context *st = st_context(ctx);
struct pipe_draw_info info;
struct pipe_draw_indirect_info indirect;
- struct pipe_draw_start_count draw = {0};
+ struct pipe_draw_start_count_bias draw = {0};
prepare_draw(st, ctx);
/* draw here */
for (i = 0; i < nr_prims; i++) {
- struct pipe_draw_start_count d;
+ struct pipe_draw_start_count_bias d;
d.count = prims[i].count;
struct gl_context;
struct pipe_draw_info;
-struct pipe_draw_start_count;
+struct pipe_draw_start_count_bias;
/**
* Max number of primitives (number of glBegin/End pairs) per VBO.
struct {
/* Multi draw where the mode can vary between draws. */
struct pipe_draw_info info;
- struct pipe_draw_start_count draw[VBO_MAX_PRIM];
+ struct pipe_draw_start_count_bias draw[VBO_MAX_PRIM];
GLubyte mode[VBO_MAX_PRIM]; /**< primitive modes per draw */
struct vbo_markers markers[VBO_MAX_PRIM];
unsigned prim_count;
bool
vbo_get_minmax_indices_gallium(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws);
const struct gl_array_attributes*
else {
struct gl_context *ctx = gl_context_from_vbo_exec(exec);
unsigned last = exec->vtx.prim_count - 1;
- struct pipe_draw_start_count *last_draw = &exec->vtx.draw[last];
+ struct pipe_draw_start_count_bias *last_draw = &exec->vtx.draw[last];
const bool last_begin = exec->vtx.markers[last].begin;
GLuint last_count = 0;
if (exec->vtx.prim_count > 0) {
/* close off current primitive */
unsigned last = exec->vtx.prim_count - 1;
- struct pipe_draw_start_count *last_draw = &exec->vtx.draw[last];
+ struct pipe_draw_start_count_bias *last_draw = &exec->vtx.draw[last];
unsigned count = exec->vtx.vert_count - last_draw->start;
last_draw->count = count;
bool
vbo_get_minmax_indices_gallium(struct gl_context *ctx,
struct pipe_draw_info *info,
- const struct pipe_draw_start_count *draws,
+ const struct pipe_draw_start_count_bias *draws,
unsigned num_draws)
{
info->min_index = ~0;
info->max_index = 0;
for (unsigned i = 0; i < num_draws; i++) {
- struct pipe_draw_start_count draw = draws[i];
+ struct pipe_draw_start_count_bias draw = draws[i];
/* Do combination if possible to reduce map/unmap count */
while ((i + 1 < num_draws) &&
struct _mesa_index_buffer ib;
struct pipe_draw_info info;
unsigned char *mode;
- struct pipe_draw_start_count *start_count;
+ struct pipe_draw_start_count_bias *start_count;
unsigned num_draws;
} merged;
node->merged.info.index_size = 4;
node->merged.info.instance_count = 1;
node->merged.info.index.gl_bo = node->merged.ib.obj;
- node->merged.start_count = malloc(merged_prim_count * sizeof(struct pipe_draw_start_count));
+ node->merged.start_count = malloc(merged_prim_count * sizeof(struct pipe_draw_start_count_bias));
if (merged_prim_count == 1) {
node->merged.info.mode = merged_prims[0].mode;
node->merged.mode = NULL;