mesa: clean up Driver.Draw parameter types
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441>
This commit is contained in:
@@ -1134,13 +1134,13 @@ retry:
|
||||
void
|
||||
brw_draw_prims(struct gl_context *ctx,
|
||||
const struct _mesa_prim *prims,
|
||||
GLuint nr_prims,
|
||||
unsigned nr_prims,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
GLboolean index_bounds_valid,
|
||||
GLuint min_index,
|
||||
GLuint max_index,
|
||||
GLuint num_instances,
|
||||
GLuint base_instance)
|
||||
bool index_bounds_valid,
|
||||
unsigned min_index,
|
||||
unsigned max_index,
|
||||
unsigned num_instances,
|
||||
unsigned base_instance)
|
||||
{
|
||||
unsigned i;
|
||||
struct brw_context *brw = brw_context(ctx);
|
||||
|
||||
@@ -46,13 +46,13 @@ brw_emit_vertex_buffer_state(struct brw_context *brw,
|
||||
|
||||
void brw_draw_prims(struct gl_context *ctx,
|
||||
const struct _mesa_prim *prims,
|
||||
GLuint nr_prims,
|
||||
unsigned nr_prims,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
GLboolean index_bounds_valid,
|
||||
GLuint min_index,
|
||||
GLuint max_index,
|
||||
GLuint num_instances,
|
||||
GLuint base_instance);
|
||||
bool index_bounds_valid,
|
||||
unsigned min_index,
|
||||
unsigned max_index,
|
||||
unsigned num_instances,
|
||||
unsigned base_instance);
|
||||
|
||||
void brw_init_draw_functions(struct dd_function_table *functions);
|
||||
void brw_draw_init( struct brw_context *brw );
|
||||
|
||||
@@ -542,11 +542,11 @@ TAG(vbo_check_render_prims)(struct gl_context *ctx,
|
||||
|
||||
static void
|
||||
TAG(vbo_draw)(struct gl_context *ctx,
|
||||
const struct _mesa_prim *prims, GLuint nr_prims,
|
||||
const struct _mesa_prim *prims, unsigned nr_prims,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
GLboolean index_bounds_valid,
|
||||
GLuint min_index, GLuint max_index,
|
||||
GLuint num_instances, GLuint base_instance)
|
||||
bool index_bounds_valid,
|
||||
unsigned min_index, unsigned max_index,
|
||||
unsigned num_instances, unsigned base_instance)
|
||||
{
|
||||
/* Borrow and update the inputs list from the tnl context */
|
||||
const struct tnl_vertex_array* arrays = _tnl_bind_inputs(ctx);
|
||||
|
||||
+4
-4
@@ -546,11 +546,11 @@ struct dd_function_table {
|
||||
* \param base_instance base instance from ARB_base_instance
|
||||
*/
|
||||
void (*Draw)(struct gl_context *ctx,
|
||||
const struct _mesa_prim *prims, GLuint nr_prims,
|
||||
const struct _mesa_prim *prims, unsigned nr_prims,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
GLboolean index_bounds_valid,
|
||||
GLuint min_index, GLuint max_index,
|
||||
GLuint num_instances, GLuint base_instance);
|
||||
bool index_bounds_valid,
|
||||
unsigned min_index, unsigned max_index,
|
||||
unsigned num_instances, unsigned base_instance);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -365,7 +365,7 @@ _mesa_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
|
||||
};
|
||||
|
||||
ctx->Driver.Draw(ctx, &prim, 1, NULL,
|
||||
GL_TRUE, start, start + count - 1,
|
||||
true, start, start + count - 1,
|
||||
numInstances, baseInstance);
|
||||
|
||||
if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
|
||||
|
||||
@@ -158,13 +158,13 @@ prepare_draw(struct st_context *st, struct gl_context *ctx)
|
||||
static void
|
||||
st_draw_vbo(struct gl_context *ctx,
|
||||
const struct _mesa_prim *prims,
|
||||
GLuint nr_prims,
|
||||
unsigned nr_prims,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
GLboolean index_bounds_valid,
|
||||
GLuint min_index,
|
||||
GLuint max_index,
|
||||
GLuint num_instances,
|
||||
GLuint base_instance)
|
||||
bool index_bounds_valid,
|
||||
unsigned min_index,
|
||||
unsigned max_index,
|
||||
unsigned num_instances,
|
||||
unsigned base_instance)
|
||||
{
|
||||
struct st_context *st = st_context(ctx);
|
||||
struct pipe_draw_info info;
|
||||
|
||||
@@ -50,13 +50,13 @@ struct draw_context *st_get_draw_context(struct st_context *st);
|
||||
extern void
|
||||
st_feedback_draw_vbo(struct gl_context *ctx,
|
||||
const struct _mesa_prim *prims,
|
||||
GLuint nr_prims,
|
||||
unsigned nr_prims,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
GLboolean index_bounds_valid,
|
||||
GLuint min_index,
|
||||
GLuint max_index,
|
||||
GLuint num_instances,
|
||||
GLuint base_instance);
|
||||
bool index_bounds_valid,
|
||||
unsigned min_index,
|
||||
unsigned max_index,
|
||||
unsigned num_instances,
|
||||
unsigned base_instance);
|
||||
|
||||
/**
|
||||
* When drawing with VBOs, the addresses specified with
|
||||
|
||||
@@ -95,13 +95,13 @@ set_feedback_vertex_format(struct gl_context *ctx)
|
||||
void
|
||||
st_feedback_draw_vbo(struct gl_context *ctx,
|
||||
const struct _mesa_prim *prims,
|
||||
GLuint nr_prims,
|
||||
unsigned nr_prims,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
GLboolean index_bounds_valid,
|
||||
GLuint min_index,
|
||||
GLuint max_index,
|
||||
GLuint num_instances,
|
||||
GLuint base_instance)
|
||||
bool index_bounds_valid,
|
||||
unsigned min_index,
|
||||
unsigned max_index,
|
||||
unsigned num_instances,
|
||||
unsigned base_instance)
|
||||
{
|
||||
struct st_context *st = st_context(ctx);
|
||||
struct pipe_context *pipe = st->pipe;
|
||||
|
||||
@@ -628,10 +628,10 @@ _tnl_bind_inputs(struct gl_context *ctx)
|
||||
*/
|
||||
void
|
||||
_tnl_draw(struct gl_context *ctx,
|
||||
const struct _mesa_prim *prim, GLuint nr_prims,
|
||||
const struct _mesa_prim *prim, unsigned nr_prims,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
GLboolean index_bounds_valid, GLuint min_index, GLuint max_index,
|
||||
GLuint num_instances, GLuint base_instance)
|
||||
bool index_bounds_valid, unsigned min_index, unsigned max_index,
|
||||
unsigned num_instances, unsigned base_instance)
|
||||
{
|
||||
/* Update TNLcontext::draw_arrays and return that pointer.
|
||||
*/
|
||||
|
||||
+3
-3
@@ -112,10 +112,10 @@ _tnl_draw_prims(struct gl_context *ctx,
|
||||
|
||||
void
|
||||
_tnl_draw(struct gl_context *ctx,
|
||||
const struct _mesa_prim *prim, GLuint nr_prims,
|
||||
const struct _mesa_prim *prim, unsigned nr_prims,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
GLboolean index_bounds_valid, GLuint min_index, GLuint max_index,
|
||||
GLuint num_instances, GLuint base_instance);
|
||||
bool index_bounds_valid, unsigned min_index, unsigned max_index,
|
||||
unsigned num_instances, unsigned base_instance);
|
||||
|
||||
extern void
|
||||
_tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4]);
|
||||
|
||||
@@ -325,7 +325,7 @@ vbo_exec_vtx_flush(struct vbo_exec_context *exec)
|
||||
exec->vtx.vert_count);
|
||||
|
||||
ctx->Driver.Draw(ctx, exec->vtx.prim, exec->vtx.prim_count,
|
||||
NULL, GL_TRUE, 0, exec->vtx.vert_count - 1, 1, 0);
|
||||
NULL, true, 0, exec->vtx.vert_count - 1, 1, 0);
|
||||
|
||||
/* Get new storage -- unless asked not to. */
|
||||
if (!persistent_mapping)
|
||||
|
||||
@@ -252,12 +252,12 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
|
||||
temp_prim.count = MIN2(sub_end_index, end_index) - temp_prim.start;
|
||||
if ((temp_prim.start == sub_prim->start) &&
|
||||
(temp_prim.count == sub_prim->count)) {
|
||||
ctx->Driver.Draw(ctx, &temp_prim, 1, ib, GL_TRUE,
|
||||
ctx->Driver.Draw(ctx, &temp_prim, 1, ib, true,
|
||||
sub_prim->min_index, sub_prim->max_index,
|
||||
num_instances, base_instance);
|
||||
} else {
|
||||
ctx->Driver.Draw(ctx, &temp_prim, 1, ib,
|
||||
GL_FALSE, -1, -1,
|
||||
false, -1, -1,
|
||||
num_instances, base_instance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data)
|
||||
if (node->vertex_count > 0) {
|
||||
GLuint min_index = _vbo_save_get_min_index(node);
|
||||
GLuint max_index = _vbo_save_get_max_index(node);
|
||||
ctx->Driver.Draw(ctx, node->prims, node->prim_count, NULL, GL_TRUE,
|
||||
ctx->Driver.Draw(ctx, node->prims, node->prim_count, NULL, true,
|
||||
min_index, max_index, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user