mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 09:10:11 +01:00
draw: remove dead data structures
This commit is contained in:
parent
415e8e039b
commit
6094e79f4e
2 changed files with 0 additions and 79 deletions
|
|
@ -83,16 +83,6 @@ struct draw_context *draw_create( void )
|
||||||
ASSIGN_4V( draw->plane[5], 0, 0, -1, 1 ); /* mesa's a bit wonky */
|
ASSIGN_4V( draw->plane[5], 0, 0, -1, 1 ); /* mesa's a bit wonky */
|
||||||
draw->nr_planes = 6;
|
draw->nr_planes = 6;
|
||||||
|
|
||||||
/* Statically allocate maximum sized vertices for the cache - could be cleverer...
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
char *tmp = align_malloc(VS_QUEUE_LENGTH * MAX_VERTEX_ALLOCATION, 16);
|
|
||||||
if (!tmp)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
draw->vs.vertex_cache = tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* these defaults are oriented toward the needs of softpipe */
|
/* these defaults are oriented toward the needs of softpipe */
|
||||||
draw->wide_point_threshold = 1000000.0; /* infinity */
|
draw->wide_point_threshold = 1000000.0; /* infinity */
|
||||||
draw->wide_line_threshold = 1.0;
|
draw->wide_line_threshold = 1.0;
|
||||||
|
|
@ -162,10 +152,6 @@ void draw_destroy( struct draw_context *draw )
|
||||||
align_free(draw->machine.Outputs);
|
align_free(draw->machine.Outputs);
|
||||||
tgsi_exec_machine_free_data(&draw->machine);
|
tgsi_exec_machine_free_data(&draw->machine);
|
||||||
|
|
||||||
|
|
||||||
if (draw->vs.vertex_cache)
|
|
||||||
align_free( draw->vs.vertex_cache ); /* Frees all the vertices. */
|
|
||||||
|
|
||||||
/* Not so fast -- we're just borrowing this at the moment.
|
/* Not so fast -- we're just borrowing this at the moment.
|
||||||
*
|
*
|
||||||
if (draw->render)
|
if (draw->render)
|
||||||
|
|
@ -254,8 +240,6 @@ draw_set_vertex_buffers(struct draw_context *draw,
|
||||||
{
|
{
|
||||||
assert(count <= PIPE_MAX_ATTRIBS);
|
assert(count <= PIPE_MAX_ATTRIBS);
|
||||||
|
|
||||||
draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE/*STATE_CHANGE*/ );
|
|
||||||
|
|
||||||
memcpy(draw->vertex_buffer, buffers, count * sizeof(buffers[0]));
|
memcpy(draw->vertex_buffer, buffers, count * sizeof(buffers[0]));
|
||||||
draw->nr_vertex_buffers = count;
|
draw->nr_vertex_buffers = count;
|
||||||
}
|
}
|
||||||
|
|
@ -268,8 +252,6 @@ draw_set_vertex_elements(struct draw_context *draw,
|
||||||
{
|
{
|
||||||
assert(count <= PIPE_MAX_ATTRIBS);
|
assert(count <= PIPE_MAX_ATTRIBS);
|
||||||
|
|
||||||
draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE/*STATE_CHANGE*/ );
|
|
||||||
|
|
||||||
memcpy(draw->vertex_element, elements, count * sizeof(elements[0]));
|
memcpy(draw->vertex_element, elements, count * sizeof(elements[0]));
|
||||||
draw->nr_vertex_elements = count;
|
draw->nr_vertex_elements = count;
|
||||||
}
|
}
|
||||||
|
|
@ -282,7 +264,6 @@ void
|
||||||
draw_set_mapped_vertex_buffer(struct draw_context *draw,
|
draw_set_mapped_vertex_buffer(struct draw_context *draw,
|
||||||
unsigned attr, const void *buffer)
|
unsigned attr, const void *buffer)
|
||||||
{
|
{
|
||||||
draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE/*STATE_CHANGE*/ );
|
|
||||||
draw->user.vbuffer[attr] = buffer;
|
draw->user.vbuffer[attr] = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -291,7 +272,6 @@ void
|
||||||
draw_set_mapped_constant_buffer(struct draw_context *draw,
|
draw_set_mapped_constant_buffer(struct draw_context *draw,
|
||||||
const void *buffer)
|
const void *buffer)
|
||||||
{
|
{
|
||||||
draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE/*STATE_CHANGE*/ );
|
|
||||||
draw->user.constants = buffer;
|
draw->user.constants = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -195,9 +195,6 @@ struct draw_context
|
||||||
/* Support prototype passthrough path:
|
/* Support prototype passthrough path:
|
||||||
*/
|
*/
|
||||||
struct {
|
struct {
|
||||||
unsigned prim; /* XXX: to be removed */
|
|
||||||
unsigned hw_vertex_size; /* XXX: to be removed */
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
struct draw_pt_middle_end *opt[PT_MAX_MIDDLE];
|
struct draw_pt_middle_end *opt[PT_MAX_MIDDLE];
|
||||||
} middle;
|
} middle;
|
||||||
|
|
@ -272,54 +269,6 @@ struct draw_context
|
||||||
/** TGSI program interpreter runtime state */
|
/** TGSI program interpreter runtime state */
|
||||||
struct tgsi_exec_machine machine;
|
struct tgsi_exec_machine machine;
|
||||||
|
|
||||||
/* Vertex fetch internal state
|
|
||||||
*/
|
|
||||||
struct {
|
|
||||||
const ubyte *src_ptr[PIPE_MAX_ATTRIBS];
|
|
||||||
unsigned pitch[PIPE_MAX_ATTRIBS];
|
|
||||||
fetch_func fetch[PIPE_MAX_ATTRIBS];
|
|
||||||
unsigned nr_attrs;
|
|
||||||
full_fetch_func fetch_func;
|
|
||||||
pt_fetch_func pt_fetch;
|
|
||||||
} vertex_fetch;
|
|
||||||
|
|
||||||
/* Post-tnl vertex cache:
|
|
||||||
*/
|
|
||||||
struct {
|
|
||||||
unsigned referenced; /**< bitfield */
|
|
||||||
|
|
||||||
struct {
|
|
||||||
unsigned in; /* client array element */
|
|
||||||
unsigned out; /* index in vs queue/array */
|
|
||||||
} idx[VCACHE_SIZE + VCACHE_OVERFLOW];
|
|
||||||
|
|
||||||
unsigned overflow;
|
|
||||||
|
|
||||||
/** To find space in the vertex cache: */
|
|
||||||
struct vertex_header *(*get_vertex)( struct draw_context *draw,
|
|
||||||
unsigned i );
|
|
||||||
} vcache;
|
|
||||||
|
|
||||||
/* Vertex shader queue:
|
|
||||||
*/
|
|
||||||
struct {
|
|
||||||
unsigned elts[VS_QUEUE_LENGTH]; /**< index into the user's vertex arrays */
|
|
||||||
char *vertex_cache;
|
|
||||||
unsigned queue_nr;
|
|
||||||
unsigned post_nr;
|
|
||||||
} vs;
|
|
||||||
|
|
||||||
/* Prim pipeline queue:
|
|
||||||
*/
|
|
||||||
struct {
|
|
||||||
/* Need to queue up primitives until their vertices have been
|
|
||||||
* transformed by a vs queue flush.
|
|
||||||
*/
|
|
||||||
struct prim_header queue[PRIM_QUEUE_LENGTH];
|
|
||||||
unsigned queue_nr;
|
|
||||||
} pq;
|
|
||||||
|
|
||||||
|
|
||||||
/* This (and the tgsi_exec_machine struct) probably need to be moved somewhere private.
|
/* This (and the tgsi_exec_machine struct) probably need to be moved somewhere private.
|
||||||
*/
|
*/
|
||||||
struct gallivm_cpu_engine *engine;
|
struct gallivm_cpu_engine *engine;
|
||||||
|
|
@ -372,9 +321,6 @@ boolean draw_pt_arrays( struct draw_context *draw,
|
||||||
|
|
||||||
void draw_pt_reset_vertex_ids( struct draw_context *draw );
|
void draw_pt_reset_vertex_ids( struct draw_context *draw );
|
||||||
|
|
||||||
#define DRAW_FLUSH_SHADER_QUEUE 0x1 /* sized not to overflow, never raised */
|
|
||||||
#define DRAW_FLUSH_PRIM_QUEUE 0x2
|
|
||||||
#define DRAW_FLUSH_VERTEX_CACHE 0x4
|
|
||||||
#define DRAW_FLUSH_STATE_CHANGE 0x8
|
#define DRAW_FLUSH_STATE_CHANGE 0x8
|
||||||
#define DRAW_FLUSH_BACKEND 0x10
|
#define DRAW_FLUSH_BACKEND 0x10
|
||||||
|
|
||||||
|
|
@ -416,10 +362,5 @@ dot4(const float *a, const float *b)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE struct vertex_header *
|
|
||||||
draw_header_from_block(char *block, int size, int num)
|
|
||||||
{
|
|
||||||
return (struct vertex_header*)(block + num * size);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* DRAW_PRIVATE_H */
|
#endif /* DRAW_PRIVATE_H */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue