summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-01-07 14:16:27 -0700
committerBrian Paul <[email protected]>2012-01-07 14:16:27 -0700
commit488dd2c1912132fe7ee5e81b05fb64ba62a46098 (patch)
tree6001b0d4ae1e9278514766d739ade3a9b23fae82 /src/gallium/auxiliary/draw
parent59d2c4f8e5a00133c093137b2f4836313f633d60 (diff)
gallium: make vbuf_render::set_primitive() return void
All the implementations of this function always return TRUE.
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_emit.c23
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_emit.c8
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c6
-rw-r--r--src/gallium/auxiliary/draw/draw_vbuf.h2
4 files changed, 10 insertions, 29 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c
index c8dfc16911e..8f483828e15 100644
--- a/src/gallium/auxiliary/draw/draw_pt_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_emit.c
@@ -54,7 +54,6 @@ void draw_pt_emit_prepare( struct pt_emit *emit,
unsigned dst_offset;
struct translate_key hw_key;
unsigned i;
- boolean ok;
/* XXX: need to flush to get prim_vbuf.c to release its allocation??
*/
@@ -66,11 +65,7 @@ void draw_pt_emit_prepare( struct pt_emit *emit,
*/
emit->prim = prim;
- ok = draw->render->set_primitive(draw->render, emit->prim);
- if (!ok) {
- assert(0);
- return;
- }
+ draw->render->set_primitive(draw->render, emit->prim);
/* Must do this after set_primitive() above:
*/
@@ -113,10 +108,10 @@ void draw_pt_emit_prepare( struct pt_emit *emit,
if (!emit->translate ||
translate_key_compare(&emit->translate->key, &hw_key) != 0)
- {
- translate_key_sanitize(&hw_key);
- emit->translate = translate_cache_find(emit->cache, &hw_key);
- }
+ {
+ translate_key_sanitize(&hw_key);
+ emit->translate = translate_cache_find(emit->cache, &hw_key);
+ }
*max_vertices = (draw->render->max_vertex_buffer_bytes /
(vinfo->size * 4));
@@ -147,10 +142,7 @@ void draw_pt_emit( struct pt_emit *emit,
/* XXX: and work out some way to coordinate the render primitive
* between vbuf.c and here...
*/
- if (!draw->render->set_primitive(draw->render, emit->prim)) {
- assert(0);
- return;
- }
+ draw->render->set_primitive(draw->render, emit->prim);
render->allocate_vertices(render,
(ushort)translate->key.output_stride,
@@ -221,8 +213,7 @@ void draw_pt_emit_linear(struct pt_emit *emit,
/* XXX: and work out some way to coordinate the render primitive
* between vbuf.c and here...
*/
- if (!draw->render->set_primitive(draw->render, emit->prim))
- goto fail;
+ draw->render->set_primitive(draw->render, emit->prim);
if (!render->allocate_vertices(render,
(ushort)translate->key.output_stride,
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
index 0ab11d015c6..97d66e5f11d 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
@@ -98,7 +98,6 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
struct draw_context *draw = feme->draw;
const struct vertex_info *vinfo;
unsigned i, dst_offset;
- boolean ok;
struct translate_key key;
unsigned gs_out_prim = (draw->gs.geometry_shader ?
@@ -107,12 +106,7 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
- ok = draw->render->set_primitive( draw->render,
- gs_out_prim );
- if (!ok) {
- assert(0);
- return;
- }
+ draw->render->set_primitive(draw->render, gs_out_prim);
/* Must do this after set_primitive() above:
*/
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
index 0dbbfe2b73c..4bed256dfb0 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
@@ -83,11 +83,7 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
*/
assert(!draw->gs.geometry_shader);
- if (!draw->render->set_primitive( draw->render,
- prim )) {
- assert(0);
- return;
- }
+ draw->render->set_primitive(draw->render, prim);
/* Must do this after set_primitive() above:
*/
diff --git a/src/gallium/auxiliary/draw/draw_vbuf.h b/src/gallium/auxiliary/draw/draw_vbuf.h
index e32803c0720..1f1a7b4972f 100644
--- a/src/gallium/auxiliary/draw/draw_vbuf.h
+++ b/src/gallium/auxiliary/draw/draw_vbuf.h
@@ -95,7 +95,7 @@ struct vbuf_render {
* the discretion of the driver, for the benefit of the passthrough
* path.
*/
- boolean (*set_primitive)( struct vbuf_render *, unsigned prim );
+ void (*set_primitive)( struct vbuf_render *, unsigned prim );
/**
* Draw indexed primitives. Note that indices are ushort. The driver