Commit c95dcc49 authored by Keith Whitwell's avatar Keith Whitwell Committed by Zack Rusin

remove usage of vertex_header

parent 7a8ad75c
...@@ -212,12 +212,6 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle, ...@@ -212,12 +212,6 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
case EMIT_1F: case EMIT_1F:
feme->fetch[i].emit = emit_R32_FLOAT; feme->fetch[i].emit = emit_R32_FLOAT;
break; break;
case EMIT_HEADER:
feme->fetch[i].ptr = (const ubyte *)&zero;
feme->fetch[i].pitch = 0;
feme->fetch[i].fetch = fetch_R32_FLOAT;
feme->fetch[i].emit = emit_R32_FLOAT;
break;
case EMIT_1F_PSIZE: case EMIT_1F_PSIZE:
feme->fetch[i].ptr = (const ubyte *)&feme->draw->rasterizer->point_size; feme->fetch[i].ptr = (const ubyte *)&feme->draw->rasterizer->point_size;
feme->fetch[i].pitch = 0; feme->fetch[i].pitch = 0;
......
...@@ -126,13 +126,6 @@ dump_emitted_vertex(const struct vertex_info *vinfo, const uint8_t *data) ...@@ -126,13 +126,6 @@ dump_emitted_vertex(const struct vertex_info *vinfo, const uint8_t *data)
case EMIT_OMIT: case EMIT_OMIT:
debug_printf("EMIT_OMIT:"); debug_printf("EMIT_OMIT:");
break; break;
case EMIT_ALL:
assert(i == 0);
assert(j == 0);
debug_printf("EMIT_ALL:\t");
for(k = 0; k < vinfo->size*4; ++k)
debug_printf("%02x ", *data++);
break;
case EMIT_1F: case EMIT_1F:
debug_printf("EMIT_1F:\t"); debug_printf("EMIT_1F:\t");
debug_printf("%f ", *(float *)data); data += sizeof(float); debug_printf("%f ", *(float *)data); data += sizeof(float);
...@@ -217,19 +210,6 @@ emit_vertex( struct vbuf_stage *vbuf, ...@@ -217,19 +210,6 @@ emit_vertex( struct vbuf_stage *vbuf,
case EMIT_OMIT: case EMIT_OMIT:
/* no-op */ /* no-op */
break; break;
case EMIT_ALL:
/* just copy the whole vertex as-is to the vbuf */
assert(i == 0);
assert(j == 0);
memcpy(vbuf->vertex_ptr, vertex, vinfo->size * 4);
vbuf->vertex_ptr += vinfo->size;
count += vinfo->size;
break;
case EMIT_HEADER:
memcpy(vbuf->vertex_ptr, vertex, sizeof(*vertex));
*vbuf->vertex_ptr += sizeof(*vertex) / 4;
count += sizeof(*vertex) / 4;
break;
case EMIT_1F: case EMIT_1F:
*vbuf->vertex_ptr++ = fui(vertex->data[j][0]); *vbuf->vertex_ptr++ = fui(vertex->data[j][0]);
count++; count++;
......
...@@ -52,9 +52,6 @@ draw_compute_vertex_size(struct vertex_info *vinfo) ...@@ -52,9 +52,6 @@ draw_compute_vertex_size(struct vertex_info *vinfo)
switch (vinfo->emit[i]) { switch (vinfo->emit[i]) {
case EMIT_OMIT: case EMIT_OMIT:
break; break;
case EMIT_HEADER:
vinfo->size += sizeof(struct vertex_header) / 4;
break;
case EMIT_4UB: case EMIT_4UB:
/* fall-through */ /* fall-through */
case EMIT_1F_PSIZE: case EMIT_1F_PSIZE:
...@@ -71,8 +68,6 @@ draw_compute_vertex_size(struct vertex_info *vinfo) ...@@ -71,8 +68,6 @@ draw_compute_vertex_size(struct vertex_info *vinfo)
case EMIT_4F: case EMIT_4F:
vinfo->size += 4; vinfo->size += 4;
break; break;
case EMIT_ALL:
/* fall-through */
default: default:
assert(0); assert(0);
} }
......
...@@ -47,8 +47,6 @@ ...@@ -47,8 +47,6 @@
*/ */
enum attrib_emit { enum attrib_emit {
EMIT_OMIT, /**< don't emit the attribute */ EMIT_OMIT, /**< don't emit the attribute */
EMIT_ALL, /**< emit whole post-xform vertex, w/ header */
EMIT_HEADER, /**< emit vertex_header struct (XXX temp?) */
EMIT_1F, EMIT_1F,
EMIT_1F_PSIZE, /**< insert constant point size */ EMIT_1F_PSIZE, /**< insert constant point size */
EMIT_2F, EMIT_2F,
......
...@@ -205,7 +205,7 @@ void draw_vf_set_vertex_info( struct draw_vertex_fetch *vf, ...@@ -205,7 +205,7 @@ void draw_vf_set_vertex_info( struct draw_vertex_fetch *vf,
const struct vertex_info *vinfo, const struct vertex_info *vinfo,
float point_size ) float point_size )
{ {
unsigned i, j, k; unsigned i, j;
struct draw_vf_attr *a = vf->attr; struct draw_vf_attr *a = vf->attr;
struct draw_vf_attr_map attrs[PIPE_MAX_SHADER_INPUTS]; struct draw_vf_attr_map attrs[PIPE_MAX_SHADER_INPUTS];
unsigned count = 0; /* for debug/sanity */ unsigned count = 0; /* for debug/sanity */
...@@ -217,60 +217,6 @@ void draw_vf_set_vertex_info( struct draw_vertex_fetch *vf, ...@@ -217,60 +217,6 @@ void draw_vf_set_vertex_info( struct draw_vertex_fetch *vf,
case EMIT_OMIT: case EMIT_OMIT:
/* no-op */ /* no-op */
break; break;
case EMIT_ALL: {
/* just copy the whole vertex as-is to the vbuf */
unsigned s = vinfo->size;
assert(i == 0);
assert(j == 0);
/* copy the vertex header */
/* XXX: we actually don't copy the header, just pad it */
attrs[nr_attrs].attrib = 0;
attrs[nr_attrs].format = DRAW_EMIT_PAD;
attrs[nr_attrs].offset = offsetof(struct vertex_header, data);
s -= offsetof(struct vertex_header, data)/4;
count += offsetof(struct vertex_header, data)/4;
nr_attrs++;
/* copy the vertex data */
for(k = 0; k < (s & ~0x3); k += 4) {
attrs[nr_attrs].attrib = k/4;
attrs[nr_attrs].format = DRAW_EMIT_4F;
attrs[nr_attrs].offset = 0;
nr_attrs++;
count += 4;
}
/* tail */
/* XXX: actually, this shouldn't be needed */
attrs[nr_attrs].attrib = k/4;
attrs[nr_attrs].offset = 0;
switch(s & 0x3) {
case 0:
break;
case 1:
attrs[nr_attrs].format = DRAW_EMIT_1F;
nr_attrs++;
count += 1;
break;
case 2:
attrs[nr_attrs].format = DRAW_EMIT_2F;
nr_attrs++;
count += 2;
break;
case 3:
attrs[nr_attrs].format = DRAW_EMIT_3F;
nr_attrs++;
count += 3;
break;
}
break;
}
case EMIT_HEADER:
/* XXX emit new DRAW_EMIT_HEADER attribute??? */
attrs[nr_attrs].attrib = 0;
attrs[nr_attrs].format = DRAW_EMIT_PAD;
attrs[nr_attrs].offset = offsetof(struct vertex_header, data);
count += offsetof(struct vertex_header, data)/4;
nr_attrs++;
break;
case EMIT_1F: case EMIT_1F:
attrs[nr_attrs].attrib = j; attrs[nr_attrs].attrib = j;
attrs[nr_attrs].format = DRAW_EMIT_1F; attrs[nr_attrs].format = DRAW_EMIT_1F;
......
...@@ -27,6 +27,7 @@ C_SOURCES = \ ...@@ -27,6 +27,7 @@ C_SOURCES = \
sp_quad_stencil.c \ sp_quad_stencil.c \
sp_quad_stipple.c \ sp_quad_stipple.c \
sp_screen.c \ sp_screen.c \
sp_setup.c \
sp_state_blend.c \ sp_state_blend.c \
sp_state_clip.c \ sp_state_clip.c \
sp_state_derived.c \ sp_state_derived.c \
......
...@@ -14,6 +14,7 @@ softpipe = env.ConvenienceLibrary( ...@@ -14,6 +14,7 @@ softpipe = env.ConvenienceLibrary(
'sp_flush.c', 'sp_flush.c',
'sp_prim_setup.c', 'sp_prim_setup.c',
'sp_prim_vbuf.c', 'sp_prim_vbuf.c',
'sp_setup.c',
'sp_quad_alpha_test.c', 'sp_quad_alpha_test.c',
'sp_quad_blend.c', 'sp_quad_blend.c',
'sp_quad.c', 'sp_quad.c',
......
...@@ -69,6 +69,12 @@ typedef void (*vbuf_draw_func)( struct pipe_context *pipe, ...@@ -69,6 +69,12 @@ typedef void (*vbuf_draw_func)( struct pipe_context *pipe,
extern struct draw_stage * extern struct draw_stage *
sp_draw_render_stage( struct softpipe_context *softpipe ); sp_draw_render_stage( struct softpipe_context *softpipe );
extern struct setup_context *
sp_draw_setup_context( struct draw_stage * );
extern void
sp_draw_flush( struct draw_stage * );
extern struct draw_stage * extern struct draw_stage *
sp_draw_vbuf_stage( struct draw_context *draw_context, sp_draw_vbuf_stage( struct draw_context *draw_context,
......
...@@ -39,14 +39,16 @@ ...@@ -39,14 +39,16 @@
#include "sp_context.h" #include "sp_context.h"
#include "sp_state.h" #include "sp_state.h"
#include "sp_prim_vbuf.h" #include "sp_prim_vbuf.h"
#include "sp_prim_setup.h"
#include "sp_setup.h"
#include "draw/draw_context.h" #include "draw/draw_context.h"
#include "draw/draw_private.h"
#include "draw/draw_vbuf.h" #include "draw/draw_vbuf.h"
#define SP_MAX_VBUF_INDEXES 1024 #define SP_MAX_VBUF_INDEXES 1024
#define SP_MAX_VBUF_SIZE 4096 #define SP_MAX_VBUF_SIZE 4096
typedef const float (*cptrf4)[4];
/** /**
* Subclass of vbuf_render. * Subclass of vbuf_render.
...@@ -69,7 +71,6 @@ softpipe_vbuf_render(struct vbuf_render *vbr) ...@@ -69,7 +71,6 @@ softpipe_vbuf_render(struct vbuf_render *vbr)
} }
static const struct vertex_info * static const struct vertex_info *
sp_vbuf_get_vertex_info(struct vbuf_render *vbr) sp_vbuf_get_vertex_info(struct vbuf_render *vbr)
{ {
...@@ -122,22 +123,19 @@ sp_vbuf_set_primitive(struct vbuf_render *vbr, unsigned prim) ...@@ -122,22 +123,19 @@ sp_vbuf_set_primitive(struct vbuf_render *vbr, unsigned prim)
* Recalculate prim's determinant. * Recalculate prim's determinant.
* XXX is this needed? * XXX is this needed?
*/ */
static void static float
calc_det(struct prim_header *header) calc_det( const float (*v0)[4],
const float (*v1)[4],
const float (*v2)[4] )
{ {
/* Window coords: */
const float *v0 = header->v[0]->data[0];
const float *v1 = header->v[1]->data[0];
const float *v2 = header->v[2]->data[0];
/* edge vectors e = v0 - v2, f = v1 - v2 */ /* edge vectors e = v0 - v2, f = v1 - v2 */
const float ex = v0[0] - v2[0]; const float ex = v0[0][0] - v2[0][0];
const float ey = v0[1] - v2[1]; const float ey = v0[0][1] - v2[0][1];
const float fx = v1[0] - v2[0]; const float fx = v1[0][0] - v2[0][0];
const float fy = v1[1] - v2[1]; const float fy = v1[0][1] - v2[0][1];
/* det = cross(e,f).z */ /* det = cross(e,f).z */
header->det = ex * fy - ey * fx; return ex * fy - ey * fx;
} }
...@@ -147,48 +145,51 @@ sp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr_indices) ...@@ -147,48 +145,51 @@ sp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr_indices)
struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr);
struct softpipe_context *softpipe = cvbr->softpipe; struct softpipe_context *softpipe = cvbr->softpipe;
struct draw_stage *setup = softpipe->setup; struct draw_stage *setup = softpipe->setup;
struct prim_header prim;
unsigned vertex_size = softpipe->vertex_info_vbuf.size * sizeof(float); unsigned vertex_size = softpipe->vertex_info_vbuf.size * sizeof(float);
unsigned i, j; unsigned i, j;
void *vertex_buffer = cvbr->vertex_buffer; void *vertex_buffer = cvbr->vertex_buffer;
cptrf4 v[3];
prim.det = 0; struct setup_context *setup_ctx = sp_draw_setup_context(setup);
prim.reset_line_stipple = 0;
prim.edgeflags = 0;
prim.pad = 0;
switch (cvbr->prim) { switch (cvbr->prim) {
case PIPE_PRIM_TRIANGLES: case PIPE_PRIM_TRIANGLES:
for (i = 0; i < nr_indices; i += 3) { for (i = 0; i < nr_indices; i += 3) {
for (j = 0; j < 3; j++) for (j = 0; j < 3; j++)
prim.v[j] = (struct vertex_header *)((char *)vertex_buffer + v[j] = (cptrf4)((char *)vertex_buffer +
indices[i+j] * vertex_size); indices[i+j] * vertex_size);
calc_det(&prim); setup_tri( setup_ctx,
setup->tri( setup, &prim ); calc_det(v[0], v[1], v[2]),
v[0],
v[1],
v[2]);
} }
break; break;
case PIPE_PRIM_LINES: case PIPE_PRIM_LINES:
for (i = 0; i < nr_indices; i += 2) { for (i = 0; i < nr_indices; i += 2) {
for (j = 0; j < 2; j++) for (j = 0; j < 2; j++)
prim.v[j] = (struct vertex_header *)((char *)vertex_buffer + v[j] = (cptrf4)((char *)vertex_buffer +
indices[i+j] * vertex_size); indices[i+j] * vertex_size);
setup->line( setup, &prim ); setup_line( setup_ctx,
v[0],
v[1] );
} }
break; break;
case PIPE_PRIM_POINTS: case PIPE_PRIM_POINTS:
for (i = 0; i < nr_indices; i++) { for (i = 0; i < nr_indices; i++) {
prim.v[0] = (struct vertex_header *)((char *)vertex_buffer + v[0] = (cptrf4)((char *)vertex_buffer +
indices[i] * vertex_size); indices[i] * vertex_size);
setup->point( setup, &prim );
setup_point( setup_ctx,
v[0] );
} }
break; break;
} }
setup->flush( setup, 0 ); sp_draw_flush( setup );
} }
...@@ -202,111 +203,131 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) ...@@ -202,111 +203,131 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr);
struct softpipe_context *softpipe = cvbr->softpipe; struct softpipe_context *softpipe = cvbr->softpipe;
struct draw_stage *setup = softpipe->setup; struct draw_stage *setup = softpipe->setup;
struct prim_header prim;
const void *vertex_buffer = cvbr->vertex_buffer; const void *vertex_buffer = cvbr->vertex_buffer;
const unsigned vertex_size = softpipe->vertex_info_vbuf.size * sizeof(float); const unsigned vertex_size = softpipe->vertex_info_vbuf.size * sizeof(float);
unsigned i; unsigned i;
struct setup_context *setup_ctx = sp_draw_setup_context(setup);
prim.det = 0; cptrf4 v[3];
prim.reset_line_stipple = 0;
prim.edgeflags = 0;
prim.pad = 0;
#define VERTEX(I) \ #define VERTEX(I) \
(struct vertex_header *) ((char *) vertex_buffer + (I) * vertex_size) (cptrf4) ((char *) vertex_buffer + (I) * vertex_size)
switch (cvbr->prim) { switch (cvbr->prim) {
case PIPE_PRIM_POINTS: case PIPE_PRIM_POINTS:
for (i = 0; i < nr; i++) { for (i = 0; i < nr; i++) {
prim.v[0] = VERTEX(i); v[0] = VERTEX(i);
setup->point( setup, &prim ); setup_point( setup_ctx, v[0] );
} }
break; break;
case PIPE_PRIM_LINES: case PIPE_PRIM_LINES:
assert(nr % 2 == 0); assert(nr % 2 == 0);
for (i = 0; i < nr; i += 2) { for (i = 0; i < nr; i += 2) {
prim.v[0] = VERTEX(i); v[0] = VERTEX(i);
prim.v[1] = VERTEX(i + 1); v[1] = VERTEX(i + 1);
setup->line( setup, &prim ); setup_line( setup_ctx, v[0], v[1] );
} }
break; break;
case PIPE_PRIM_LINE_STRIP: case PIPE_PRIM_LINE_STRIP:
for (i = 1; i < nr; i++) { for (i = 1; i < nr; i++) {
prim.v[0] = VERTEX(i - 1); v[0] = VERTEX(i - 1);
prim.v[1] = VERTEX(i); v[1] = VERTEX(i);
setup->line( setup, &prim ); setup_line( setup_ctx, v[0], v[1] );
} }
break; break;
case PIPE_PRIM_TRIANGLES: case PIPE_PRIM_TRIANGLES:
assert(nr % 3 == 0); assert(nr % 3 == 0);
for (i = 0; i < nr; i += 3) { for (i = 0; i < nr; i += 3) {
prim.v[0] = VERTEX(i + 0); v[0] = VERTEX(i + 0);
prim.v[1] = VERTEX(i + 1); v[1] = VERTEX(i + 1);
prim.v[2] = VERTEX(i + 2); v[2] = VERTEX(i + 2);
calc_det(&prim); setup_tri( setup_ctx,
setup->tri( setup, &prim ); calc_det(v[0], v[1], v[2]),
v[0],
v[1],
v[2] );
} }
break; break;
case PIPE_PRIM_TRIANGLE_STRIP: case PIPE_PRIM_TRIANGLE_STRIP:
assert(nr >= 3); assert(nr >= 3);
for (i = 2; i < nr; i++) { for (i = 2; i < nr; i++) {
prim.v[0] = VERTEX(i - 2); v[0] = VERTEX(i - 2);
prim.v[1] = VERTEX(i - 1); v[1] = VERTEX(i - 1);
prim.v[2] = VERTEX(i); v[2] = VERTEX(i);
calc_det(&prim); setup_tri( setup_ctx,
setup->tri( setup, &prim ); calc_det(v[0], v[1], v[2]),
v[0],
v[1],
v[2] );
} }
break; break;
case PIPE_PRIM_TRIANGLE_FAN: case PIPE_PRIM_TRIANGLE_FAN:
assert(nr >= 3); assert(nr >= 3);
for (i = 2; i < nr; i++) { for (i = 2; i < nr; i++) {
prim.v[0] = VERTEX(0); v[0] = VERTEX(0);
prim.v[1] = VERTEX(i - 1); v[1] = VERTEX(i - 1);
prim.v[2] = VERTEX(i); v[2] = VERTEX(i);
calc_det(&prim); setup_tri( setup_ctx,
setup->tri( setup, &prim ); calc_det(v[0], v[1], v[2]),
v[0],
v[1],
v[2] );
} }
break; break;
case PIPE_PRIM_QUADS: case PIPE_PRIM_QUADS:
assert(nr % 4 == 0); assert(nr % 4 == 0);
for (i = 0; i < nr; i += 4) { for (i = 0; i < nr; i += 4) {
prim.v[0] = VERTEX(i + 0); v[0] = VERTEX(i + 0);
prim.v[1] = VERTEX(i + 1); v[1] = VERTEX(i + 1);
prim.v[2] = VERTEX(i + 2); v[2] = VERTEX(i + 2);
calc_det(&prim); setup_tri( setup_ctx,
setup->tri( setup, &prim ); calc_det(v[0], v[1], v[2]),
v[0],
prim.v[0] = VERTEX(i + 0); v[1],
prim.v[1] = VERTEX(i + 2); v[2] );
prim.v[2] = VERTEX(i + 3);
calc_det(&prim); v[0] = VERTEX(i + 0);
setup->tri( setup, &prim ); v[1] = VERTEX(i + 2);
v[2] = VERTEX(i + 3);
setup_tri( setup_ctx,
calc_det(v[0], v[1], v[2]),
v[0],
v[1],
v[2] );
} }
break; break;
case PIPE_PRIM_QUAD_STRIP: case PIPE_PRIM_QUAD_STRIP:
assert(nr >= 4); assert(nr >= 4);
for (i = 2; i < nr; i += 2) { for (i = 2; i < nr; i += 2) {
prim.v[0] = VERTEX(i - 2); v[0] = VERTEX(i - 2);
prim.v[1] = VERTEX(i); v[1] = VERTEX(i);
prim.v[2] = VERTEX(i + 1); v[2] = VERTEX(i + 1);
calc_det(&prim); setup_tri( setup_ctx,
setup->tri( setup, &prim ); calc_det(v[0], v[1], v[2]),
v[0],
prim.v[0] = VERTEX(i - 2); v[1],
prim.v[1] = VERTEX(i + 1); v[2] );
prim.v[2] = VERTEX(i - 1);
calc_det(&prim); v[0] = VERTEX(i - 2);
setup->tri( setup, &prim ); v[1] = VERTEX(i + 1);
v[2] = VERTEX(i - 1);
setup_tri( setup_ctx,
calc_det(v[0], v[1], v[2]),
v[0],
v[1],
v[2] );
} }
break; break;
case PIPE_PRIM_POLYGON: case PIPE_PRIM_POLYGON:
/* draw as tri fan */ /* draw as tri fan */
for (i = 2; i < nr; i++) { for (i = 2; i < nr; i++) {
prim.v[0] = VERTEX(0); v[0] = VERTEX(0);
prim.v[1] = VERTEX(i - 1); v[1] = VERTEX(i - 1);
prim.v[2] = VERTEX(i); v[2] = VERTEX(i);
calc_det(&prim); setup_tri( setup_ctx,
setup->tri( setup, &prim ); calc_det(v[0], v[1], v[2]),
v[0],
v[1],
v[2] );
} }
break; break;
default: default:
......
This diff is collapsed.
/**************************************************************************
*
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
#ifndef SP_SETUP_H
#define SP_SETUP_H
struct setup_context;
struct softpipe_context;
void setup_tri( struct setup_context *setup,
float det,
const float (*v0)[4],
const float (*v1)[4],
const float (*v2)[4] );
void
setup_line(struct setup_context *setup,
const float (*v0)[4],
const float (*v1)[4]);
void
setup_point( struct setup_context *setup,
const float (*v0)[4] );
struct setup_context *setup_create_context( struct softpipe_context *softpipe );
void setup_prepare( struct setup_context *setup );
void setup_destroy_context( struct setup_context *setup );
#endif
...@@ -71,25 +71,16 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe) ...@@ -71,25 +71,16 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe)
* simply emit the whole post-xform vertex as-is: * simply emit the whole post-xform vertex as-is:
*/ */
struct vertex_info *vinfo_vbuf = &softpipe->vertex_info_vbuf; struct vertex_info *vinfo_vbuf = &softpipe->vertex_info_vbuf;
#if 0
vinfo_vbuf->num_attribs = 0;
/* special-case to allow memcpy of whole vertex */
draw_emit_vertex_attr(vinfo_vbuf, EMIT_ALL, INTERP_NONE, 0);
/* size in dwords or floats */
vinfo_vbuf->size = 4 * draw_num_vs_outputs(softpipe->draw)
+ sizeof(struct vertex_header) / 4;
#else
/* for pass-through mode, we need a more explicit list of attribs */
const uint num = draw_num_vs_outputs(softpipe->draw); const uint num = draw_num_vs_outputs(softpipe->draw);
uint i; uint i;
/* No longer any need to try and emit draw vertex_header info.