mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 02:10:24 +01:00
cell: more cell_init_*_functions()
This commit is contained in:
parent
5cf2e22654
commit
2ebeab0422
6 changed files with 46 additions and 53 deletions
|
|
@ -113,15 +113,6 @@ cell_create_context(struct pipe_screen *screen,
|
|||
cell->pipe.screen = screen;
|
||||
cell->pipe.destroy = cell_destroy_context;
|
||||
|
||||
/* state setters */
|
||||
cell->pipe.set_vertex_buffers = cell_set_vertex_buffers;
|
||||
cell->pipe.set_vertex_elements = cell_set_vertex_elements;
|
||||
|
||||
cell->pipe.draw_arrays = cell_draw_arrays;
|
||||
cell->pipe.draw_elements = cell_draw_elements;
|
||||
cell->pipe.draw_range_elements = cell_draw_range_elements;
|
||||
cell->pipe.set_edgeflags = cell_set_edgeflags;
|
||||
|
||||
cell->pipe.clear = cell_clear_surface;
|
||||
cell->pipe.flush = cell_flush;
|
||||
|
||||
|
|
@ -131,10 +122,12 @@ cell_create_context(struct pipe_screen *screen,
|
|||
cell->pipe.wait_query = cell_wait_query;
|
||||
#endif
|
||||
|
||||
cell_init_draw_functions(cell);
|
||||
cell_init_state_functions(cell);
|
||||
cell_init_shader_functions(cell);
|
||||
cell_init_surface_functions(cell);
|
||||
cell_init_texture_functions(cell);
|
||||
cell_init_vertex_functions(cell);
|
||||
|
||||
cell->draw = cell_draw_create(cell);
|
||||
|
||||
|
|
|
|||
|
|
@ -77,14 +77,6 @@ cell_unmap_constant_buffers(struct cell_context *sp)
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
cell_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||
unsigned start, unsigned count)
|
||||
{
|
||||
return cell_draw_elements(pipe, NULL, 0, mode, start, count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Draw vertex arrays, with optional indexing.
|
||||
|
|
@ -93,7 +85,7 @@ cell_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
|||
*
|
||||
* XXX should the element buffer be specified/bound with a separate function?
|
||||
*/
|
||||
boolean
|
||||
static boolean
|
||||
cell_draw_range_elements(struct pipe_context *pipe,
|
||||
struct pipe_buffer *indexBuffer,
|
||||
unsigned indexSize,
|
||||
|
|
@ -158,7 +150,7 @@ cell_draw_range_elements(struct pipe_context *pipe,
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
static boolean
|
||||
cell_draw_elements(struct pipe_context *pipe,
|
||||
struct pipe_buffer *indexBuffer,
|
||||
unsigned indexSize,
|
||||
|
|
@ -171,10 +163,29 @@ cell_draw_elements(struct pipe_context *pipe,
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
cell_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||
unsigned start, unsigned count)
|
||||
{
|
||||
return cell_draw_elements(pipe, NULL, 0, mode, start, count);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
static void
|
||||
cell_set_edgeflags(struct pipe_context *pipe, const unsigned *edgeflags)
|
||||
{
|
||||
struct cell_context *cell = cell_context(pipe);
|
||||
draw_set_edgeflags(cell->draw, edgeflags);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
cell_init_draw_functions(struct cell_context *cell)
|
||||
{
|
||||
cell->pipe.draw_arrays = cell_draw_arrays;
|
||||
cell->pipe.draw_elements = cell_draw_elements;
|
||||
cell->pipe.draw_range_elements = cell_draw_range_elements;
|
||||
cell->pipe.set_edgeflags = cell_set_edgeflags;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,26 +29,8 @@
|
|||
#define CELL_DRAW_ARRAYS_H
|
||||
|
||||
|
||||
extern boolean
|
||||
cell_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||
unsigned start, unsigned count);
|
||||
|
||||
extern boolean
|
||||
cell_draw_elements(struct pipe_context *pipe,
|
||||
struct pipe_buffer *indexBuffer,
|
||||
unsigned indexSize,
|
||||
unsigned mode, unsigned start, unsigned count);
|
||||
|
||||
extern boolean
|
||||
cell_draw_range_elements(struct pipe_context *pipe,
|
||||
struct pipe_buffer *indexBuffer,
|
||||
unsigned indexSize,
|
||||
unsigned min_index,
|
||||
unsigned max_index,
|
||||
unsigned mode, unsigned start, unsigned count);
|
||||
|
||||
extern void
|
||||
cell_set_edgeflags(struct pipe_context *pipe, const unsigned *edgeflags);
|
||||
cell_init_draw_functions(struct cell_context *cell);
|
||||
|
||||
|
||||
#endif /* CELL_DRAW_ARRAYS_H */
|
||||
|
|
|
|||
|
|
@ -131,8 +131,9 @@ cell_delete_depth_stencil_alpha_state(struct pipe_context *pipe, void *depth)
|
|||
}
|
||||
|
||||
|
||||
static void cell_set_clip_state( struct pipe_context *pipe,
|
||||
const struct pipe_clip_state *clip )
|
||||
static void
|
||||
cell_set_clip_state(struct pipe_context *pipe,
|
||||
const struct pipe_clip_state *clip)
|
||||
{
|
||||
struct cell_context *cell = cell_context(pipe);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,19 +48,17 @@
|
|||
#define CELL_NEW_VERTEX_INFO 0x8000
|
||||
|
||||
|
||||
void cell_set_vertex_elements(struct pipe_context *,
|
||||
unsigned count,
|
||||
const struct pipe_vertex_element *);
|
||||
|
||||
void cell_set_vertex_buffers(struct pipe_context *,
|
||||
unsigned count,
|
||||
const struct pipe_vertex_buffer *);
|
||||
|
||||
void cell_update_derived( struct cell_context *softpipe );
|
||||
extern void
|
||||
cell_update_derived( struct cell_context *softpipe );
|
||||
|
||||
|
||||
void
|
||||
extern void
|
||||
cell_init_shader_functions(struct cell_context *cell);
|
||||
|
||||
|
||||
extern void
|
||||
cell_init_vertex_functions(struct cell_context *cell);
|
||||
|
||||
|
||||
#endif /* CELL_STATE_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include "draw/draw_context.h"
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
cell_set_vertex_elements(struct pipe_context *pipe,
|
||||
unsigned count,
|
||||
const struct pipe_vertex_element *elements)
|
||||
|
|
@ -53,7 +53,7 @@ cell_set_vertex_elements(struct pipe_context *pipe,
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
cell_set_vertex_buffers(struct pipe_context *pipe,
|
||||
unsigned count,
|
||||
const struct pipe_vertex_buffer *buffers)
|
||||
|
|
@ -69,3 +69,11 @@ cell_set_vertex_buffers(struct pipe_context *pipe,
|
|||
|
||||
draw_set_vertex_buffers(cell->draw, count, buffers);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
cell_init_vertex_functions(struct cell_context *cell)
|
||||
{
|
||||
cell->pipe.set_vertex_buffers = cell_set_vertex_buffers;
|
||||
cell->pipe.set_vertex_elements = cell_set_vertex_elements;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue