From c898eae27221bd23b11327553c215a94369eeb99 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sat, 19 Apr 2008 15:35:22 +0100 Subject: [PATCH] draw: always emit header in draw_pt_fetch.c --- src/gallium/auxiliary/draw/draw_pt.h | 1 - src/gallium/auxiliary/draw/draw_pt_fetch.c | 8 ++------ src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_pt.h b/src/gallium/auxiliary/draw/draw_pt.h index 1119e9c..eaf8e03 100644 --- a/src/gallium/auxiliary/draw/draw_pt.h +++ b/src/gallium/auxiliary/draw/draw_pt.h @@ -176,7 +176,6 @@ struct pt_emit *draw_pt_emit_create( struct draw_context *draw ); struct pt_fetch; void draw_pt_fetch_prepare( struct pt_fetch *fetch, - boolean emit_header, unsigned vertex_size ); void draw_pt_fetch_run( struct pt_fetch *fetch, diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c index 1aed251..037e376 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c @@ -54,7 +54,6 @@ struct pt_fetch { * */ void draw_pt_fetch_prepare( struct pt_fetch *fetch, - boolean emit_header, unsigned vertex_size ) { struct draw_context *draw = fetch->draw; @@ -66,16 +65,13 @@ void draw_pt_fetch_prepare( struct pt_fetch *fetch, memset(&key, 0, sizeof(key)); - /* If PT_SHADE is not set, then we are creating post-shader - * vertices, meaning that we need to emit/leave space for a vertex - * header. + /* Always emit/leave space for a vertex header. * * It's worth considering whether the vertex headers should contain * a pointer to the 'data', rather than having it inline. * Something to look at after we've fully switched over to the pt * paths. */ - if (emit_header) { /* Need to set header->vertex_id = 0xffff somehow. */ @@ -121,7 +117,7 @@ void draw_pt_fetch_prepare( struct pt_fetch *fetch, fetch->translate = translate_create( &key ); - if (emit_header) { + { static struct vertex_header vh = { 0, 0, 0, 0xffff }; fetch->translate->set_buffer(fetch->translate, draw->nr_vertex_buffers, diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index 0b9e8d1..560f1bc 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -71,7 +71,6 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, draw_pt_fetch_prepare( fpme->fetch, - (opt & (PT_CLIPTEST | PT_PIPELINE)) != 0, fpme->vertex_size ); /* XXX: it's not really gl rasterization rules we care about here, -- 2.7.4