diff options
author | Corbin Simpson <[email protected]> | 2009-04-04 02:05:45 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-04-04 02:12:30 -0700 |
commit | 5c50218d009a4c8276aa561bd1483742cf6aa20e (patch) | |
tree | 42903954506843110d9c6c0fc7b7c3a4e8aa6605 /src | |
parent | b7ffe1e8763efdf042e2d5eb33ce4f3d5d365121 (diff) |
r300-gallium: Move swtcl_emit to render to reflect its true purpose.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r300/Makefile | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/SConscript | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_render.c (renamed from src/gallium/drivers/r300/r300_swtcl_emit.c) | 74 |
5 files changed, 41 insertions, 41 deletions
diff --git a/src/gallium/drivers/r300/Makefile b/src/gallium/drivers/r300/Makefile index 9330c286d2b..e44f9b9dfc5 100644 --- a/src/gallium/drivers/r300/Makefile +++ b/src/gallium/drivers/r300/Makefile @@ -11,6 +11,7 @@ C_SOURCES = \ r300_emit.c \ r300_flush.c \ r300_query.c \ + r300_render.c \ r300_screen.c \ r300_state.c \ r300_state_derived.c \ @@ -18,7 +19,6 @@ C_SOURCES = \ r300_state_shader.c \ r300_state_tcl.c \ r300_surface.c \ - r300_swtcl_emit.c \ r300_texture.c include ../../Makefile.template diff --git a/src/gallium/drivers/r300/SConscript b/src/gallium/drivers/r300/SConscript index c914bc7c40a..182ed2d459a 100644 --- a/src/gallium/drivers/r300/SConscript +++ b/src/gallium/drivers/r300/SConscript @@ -12,6 +12,7 @@ r300 = env.ConvenienceLibrary( 'r300_emit.c', 'r300_flush.c', 'r300_query.c', + 'r300_render.c', 'r300_screen.c', 'r300_state.c', 'r300_state_derived.c', @@ -19,7 +20,6 @@ r300 = env.ConvenienceLibrary( 'r300_state_shader.c', 'r300_state_tcl.c', 'r300_surface.c', - 'r300_swtcl_emit.c', 'r300_texture.c', ]) diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index b8584702aad..31efe914171 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -125,7 +125,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300->context.draw_range_elements = r300_draw_range_elements; r300->draw = draw_create(); - draw_set_rasterize_stage(r300->draw, r300_draw_swtcl_stage(r300)); + draw_set_rasterize_stage(r300->draw, r300_draw_stage(r300)); r300->blend_color_state = CALLOC_STRUCT(r300_blend_color_state); r300->rs_block = CALLOC_STRUCT(r300_rs_block); diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 0ca445c0918..9d2a07a7d97 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -306,7 +306,7 @@ static struct r300_context* r300_context(struct pipe_context* context) { } /* Context initialization. */ -struct draw_stage* r300_draw_swtcl_stage(struct r300_context* r300); +struct draw_stage* r300_draw_stage(struct r300_context* r300); void r300_init_state_functions(struct r300_context* r300); void r300_init_surface_functions(struct r300_context* r300); diff --git a/src/gallium/drivers/r300/r300_swtcl_emit.c b/src/gallium/drivers/r300/r300_render.c index 83c25f496bf..57bbc7a9944 100644 --- a/src/gallium/drivers/r300/r300_swtcl_emit.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Corbin Simpson <[email protected]> + * Copyright 2009 Corbin Simpson <[email protected]> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -29,9 +29,9 @@ #include "r300_reg.h" #include "r300_state_derived.h" -/* r300_swtcl_emit: Vertex and index buffer primitive emission. No HW TCL. */ +/* r300_render: Vertex and index buffer primitive emission. */ -struct r300_swtcl_render { +struct r300_render { /* Parent class */ struct vbuf_render base; @@ -52,16 +52,16 @@ struct r300_swtcl_render { size_t vbo_max_used; }; -static INLINE struct r300_swtcl_render* -r300_swtcl_render(struct vbuf_render* render) +static INLINE struct r300_render* +r300_render(struct vbuf_render* render) { - return (struct r300_swtcl_render*)render; + return (struct r300_render*)render; } static const struct vertex_info* -r300_swtcl_render_get_vertex_info(struct vbuf_render* render) +r300_render_get_vertex_info(struct vbuf_render* render) { - struct r300_swtcl_render* r300render = r300_swtcl_render(render); + struct r300_render* r300render = r300_render(render); struct r300_context* r300 = r300render->r300; r300_update_derived_state(r300); @@ -69,11 +69,11 @@ r300_swtcl_render_get_vertex_info(struct vbuf_render* render) return &r300->vertex_info.vinfo; } -static boolean r300_swtcl_render_allocate_vertices(struct vbuf_render* render, +static boolean r300_render_allocate_vertices(struct vbuf_render* render, ushort vertex_size, ushort count) { - struct r300_swtcl_render* r300render = r300_swtcl_render(render); + struct r300_render* r300render = r300_render(render); struct r300_context* r300 = r300render->r300; struct pipe_screen* screen = r300->context.screen; size_t size = (size_t)vertex_size * (size_t)count; @@ -98,9 +98,9 @@ static boolean r300_swtcl_render_allocate_vertices(struct vbuf_render* render, } } -static void* r300_swtcl_render_map_vertices(struct vbuf_render* render) +static void* r300_render_map_vertices(struct vbuf_render* render) { - struct r300_swtcl_render* r300render = r300_swtcl_render(render); + struct r300_render* r300render = r300_render(render); struct pipe_screen* screen = r300render->r300->context.screen; r300render->vbo_map = pipe_buffer_map(screen, r300render->vbo, @@ -109,11 +109,11 @@ static void* r300_swtcl_render_map_vertices(struct vbuf_render* render) return (unsigned char*)r300render->vbo_map + r300render->vbo_offset; } -static void r300_swtcl_render_unmap_vertices(struct vbuf_render* render, +static void r300_render_unmap_vertices(struct vbuf_render* render, ushort min, ushort max) { - struct r300_swtcl_render* r300render = r300_swtcl_render(render); + struct r300_render* r300render = r300_render(render); struct pipe_screen* screen = r300render->r300->context.screen; r300render->vbo_max_used = MAX2(r300render->vbo_max_used, @@ -122,17 +122,17 @@ static void r300_swtcl_render_unmap_vertices(struct vbuf_render* render, pipe_buffer_unmap(screen, r300render->vbo); } -static void r300_swtcl_render_release_vertices(struct vbuf_render* render) +static void r300_render_release_vertices(struct vbuf_render* render) { - struct r300_swtcl_render* r300render = r300_swtcl_render(render); + struct r300_render* r300render = r300_render(render); pipe_buffer_reference(&r300render->vbo, NULL); } -static boolean r300_swtcl_render_set_primitive(struct vbuf_render* render, +static boolean r300_render_set_primitive(struct vbuf_render* render, unsigned prim) { - struct r300_swtcl_render* r300render = r300_swtcl_render(render); + struct r300_render* r300render = r300_render(render); r300render->prim = prim; switch (prim) { @@ -174,7 +174,7 @@ static boolean r300_swtcl_render_set_primitive(struct vbuf_render* render, return TRUE; } -static void prepare_render(struct r300_swtcl_render* render, unsigned count) +static void prepare_render(struct r300_render* render, unsigned count) { struct r300_context* r300 = render->r300; @@ -203,11 +203,11 @@ static void prepare_render(struct r300_swtcl_render* render, unsigned count) END_CS; } -static void r300_swtcl_render_draw_arrays(struct vbuf_render* render, +static void r300_render_draw_arrays(struct vbuf_render* render, unsigned start, unsigned count) { - struct r300_swtcl_render* r300render = r300_swtcl_render(render); + struct r300_render* r300render = r300_render(render); struct r300_context* r300 = r300render->r300; CS_LOCALS(r300); @@ -225,11 +225,11 @@ static void r300_swtcl_render_draw_arrays(struct vbuf_render* render, END_CS; } -static void r300_swtcl_render_draw(struct vbuf_render* render, +static void r300_render_draw(struct vbuf_render* render, const ushort* indices, uint count) { - struct r300_swtcl_render* r300render = r300_swtcl_render(render); + struct r300_render* r300render = r300_render(render); struct r300_context* r300 = r300render->r300; struct pipe_screen* screen = r300->context.screen; struct pipe_buffer* index_buffer; @@ -264,14 +264,14 @@ static void r300_swtcl_render_draw(struct vbuf_render* render, END_CS; } -static void r300_swtcl_render_destroy(struct vbuf_render* render) +static void r300_render_destroy(struct vbuf_render* render) { FREE(render); } -static struct vbuf_render* r300_swtcl_render_create(struct r300_context* r300) +static struct vbuf_render* r300_render_create(struct r300_context* r300) { - struct r300_swtcl_render* r300render = CALLOC_STRUCT(r300_swtcl_render); + struct r300_render* r300render = CALLOC_STRUCT(r300_render); r300render->r300 = r300; @@ -279,25 +279,25 @@ static struct vbuf_render* r300_swtcl_render_create(struct r300_context* r300) r300render->base.max_vertex_buffer_bytes = 128 * 1024; r300render->base.max_indices = 16 * 1024; - r300render->base.get_vertex_info = r300_swtcl_render_get_vertex_info; - r300render->base.allocate_vertices = r300_swtcl_render_allocate_vertices; - r300render->base.map_vertices = r300_swtcl_render_map_vertices; - r300render->base.unmap_vertices = r300_swtcl_render_unmap_vertices; - r300render->base.set_primitive = r300_swtcl_render_set_primitive; - r300render->base.draw = r300_swtcl_render_draw; - r300render->base.draw_arrays = r300_swtcl_render_draw_arrays; - r300render->base.release_vertices = r300_swtcl_render_release_vertices; - r300render->base.destroy = r300_swtcl_render_destroy; + r300render->base.get_vertex_info = r300_render_get_vertex_info; + r300render->base.allocate_vertices = r300_render_allocate_vertices; + r300render->base.map_vertices = r300_render_map_vertices; + r300render->base.unmap_vertices = r300_render_unmap_vertices; + r300render->base.set_primitive = r300_render_set_primitive; + r300render->base.draw = r300_render_draw; + r300render->base.draw_arrays = r300_render_draw_arrays; + r300render->base.release_vertices = r300_render_release_vertices; + r300render->base.destroy = r300_render_destroy; return &r300render->base; } -struct draw_stage* r300_draw_swtcl_stage(struct r300_context* r300) +struct draw_stage* r300_draw_stage(struct r300_context* r300) { struct vbuf_render* render; struct draw_stage* stage; - render = r300_swtcl_render_create(r300); + render = r300_render_create(r300); if (!render) { return NULL; |