All the implementations of this function always return TRUE.
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??
*/
*/
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:
*/
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));
/* 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,
/* 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,
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 ?
- 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:
*/
*/
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:
*/
* 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
i915_vbuf_update_vbo_state(render);
}
-static boolean
+static void
i915_vbuf_render_set_primitive(struct vbuf_render *render,
unsigned prim)
{
case PIPE_PRIM_POINTS:
i915_render->hwprim = PRIM3D_POINTLIST;
i915_render->fallback = 0;
- return TRUE;
+ break;
case PIPE_PRIM_LINES:
i915_render->hwprim = PRIM3D_LINELIST;
i915_render->fallback = 0;
- return TRUE;
+ break;
case PIPE_PRIM_LINE_LOOP:
i915_render->hwprim = PRIM3D_LINELIST;
i915_render->fallback = PIPE_PRIM_LINE_LOOP;
- return TRUE;
+ break;
case PIPE_PRIM_LINE_STRIP:
i915_render->hwprim = PRIM3D_LINESTRIP;
i915_render->fallback = 0;
- return TRUE;
+ break;
case PIPE_PRIM_TRIANGLES:
i915_render->hwprim = PRIM3D_TRILIST;
i915_render->fallback = 0;
- return TRUE;
+ break;
case PIPE_PRIM_TRIANGLE_STRIP:
i915_render->hwprim = PRIM3D_TRISTRIP;
i915_render->fallback = 0;
- return TRUE;
+ break;
case PIPE_PRIM_TRIANGLE_FAN:
i915_render->hwprim = PRIM3D_TRIFAN;
i915_render->fallback = 0;
- return TRUE;
+ break;
case PIPE_PRIM_QUADS:
i915_render->hwprim = PRIM3D_TRILIST;
i915_render->fallback = PIPE_PRIM_QUADS;
- return TRUE;
+ break;
case PIPE_PRIM_QUAD_STRIP:
i915_render->hwprim = PRIM3D_TRILIST;
i915_render->fallback = PIPE_PRIM_QUAD_STRIP;
- return TRUE;
+ break;
case PIPE_PRIM_POLYGON:
i915_render->hwprim = PRIM3D_POLY;
i915_render->fallback = 0;
- return TRUE;
+ break;
default:
/* FIXME: Actually, can handle a lot more just fine... */
- return FALSE;
+ assert(0 && "unexpected prim in i915_vbuf_render_set_primitive()");
}
}
}
-static boolean
+static void
lp_setup_set_primitive(struct vbuf_render *vbr, unsigned prim)
{
lp_setup_context(vbr)->prim = prim;
- return TRUE;
}
typedef const float (*const_float4_ptr)[4];
r300render->vbo_max_used = 0;
}
-static boolean r300_render_set_primitive(struct vbuf_render* render,
- unsigned prim)
+static void r300_render_set_primitive(struct vbuf_render* render,
+ unsigned prim)
{
struct r300_render* r300render = r300_render(render);
r300render->prim = prim;
r300render->hwprim = r300_translate_primitive(prim);
-
- return TRUE;
}
static void r300_render_draw_arrays(struct vbuf_render* render,
}
-static boolean
+static void
sp_vbuf_set_primitive(struct vbuf_render *vbr, unsigned prim)
{
struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr);
cvbr->softpipe->reduced_prim = u_reduced_prim(prim);
cvbr->prim = prim;
- return TRUE;
}
svga_render->vbuf_used = MAX2(svga_render->vbuf_used, used);
}
-static boolean
+static void
svga_vbuf_render_set_primitive( struct vbuf_render *render,
unsigned prim )
{
struct svga_vbuf_render *svga_render = svga_vbuf_render(render);
svga_render->prim = prim;
-
- return TRUE;
}
static void