summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/Makefile1
-rw-r--r--src/gallium/auxiliary/draw/SConscript2
-rw-r--r--src/gallium/auxiliary/draw/draw_aaline.c6
-rw-r--r--src/gallium/auxiliary/draw/draw_aapoint.c6
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c26
-rw-r--r--src/gallium/auxiliary/draw/draw_context.h5
-rw-r--r--src/gallium/auxiliary/draw/draw_passthrough.c106
-rw-r--r--src/gallium/auxiliary/draw/draw_prim.c47
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h6
-rw-r--r--src/gallium/auxiliary/draw/draw_pstipple.c20
-rw-r--r--src/gallium/auxiliary/draw/draw_validate.c63
-rw-r--r--src/gallium/auxiliary/draw/draw_vbuf.c5
-rw-r--r--src/gallium/auxiliary/draw/draw_vertex.c3
-rw-r--r--src/gallium/auxiliary/draw/draw_vertex.h1
-rw-r--r--src/gallium/auxiliary/draw/draw_vf.c8
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_exec.c13
-rw-r--r--src/gallium/auxiliary/draw/draw_wide_point.c3
17 files changed, 280 insertions, 41 deletions
diff --git a/src/gallium/auxiliary/draw/Makefile b/src/gallium/auxiliary/draw/Makefile
index 2daa1636f3..21e9f737b7 100644
--- a/src/gallium/auxiliary/draw/Makefile
+++ b/src/gallium/auxiliary/draw/Makefile
@@ -15,6 +15,7 @@ C_SOURCES = \
draw_debug.c \
draw_flatshade.c \
draw_offset.c \
+ draw_passthrough.c \
draw_prim.c \
draw_pstipple.c \
draw_stipple.c \
diff --git a/src/gallium/auxiliary/draw/SConscript b/src/gallium/auxiliary/draw/SConscript
index 5cb7664c85..d7fb86d992 100644
--- a/src/gallium/auxiliary/draw/SConscript
+++ b/src/gallium/auxiliary/draw/SConscript
@@ -14,9 +14,9 @@ draw = env.ConvenienceLibrary(
'draw_debug.c',
'draw_flatshade.c',
'draw_offset.c',
+ 'draw_passthrough.c',
'draw_prim.c',
'draw_pstipple.c',
- 'draw_passthrough.c',
'draw_stipple.c',
'draw_twoside.c',
'draw_unfilled.c',
diff --git a/src/gallium/auxiliary/draw/draw_aaline.c b/src/gallium/auxiliary/draw/draw_aaline.c
index 6b1e640ae9..f2b983374e 100644
--- a/src/gallium/auxiliary/draw/draw_aaline.c
+++ b/src/gallium/auxiliary/draw/draw_aaline.c
@@ -340,12 +340,6 @@ generate_aaline_fs(struct aaline_stage *aaline)
tgsi_dump(aaline_fs.tokens, 0);
#endif
-#if 1 /* XXX remove */
- aaline_fs.input_semantic_name[aaline_fs.num_inputs] = TGSI_SEMANTIC_GENERIC;
- aaline_fs.input_semantic_index[aaline_fs.num_inputs] = transform.maxGeneric + 1;
- aaline_fs.num_inputs++;
-#endif
-
aaline->fs->aaline_fs
= aaline->driver_create_fs_state(aaline->pipe, &aaline_fs);
diff --git a/src/gallium/auxiliary/draw/draw_aapoint.c b/src/gallium/auxiliary/draw/draw_aapoint.c
index 99e9e9fe34..67a7a8ebab 100644
--- a/src/gallium/auxiliary/draw/draw_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_aapoint.c
@@ -514,12 +514,6 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
tgsi_dump(aapoint_fs.tokens, 0);
#endif
-#if 1 /* XXX remove */
- aapoint_fs.input_semantic_name[aapoint_fs.num_inputs] = TGSI_SEMANTIC_GENERIC;
- aapoint_fs.input_semantic_index[aapoint_fs.num_inputs] = transform.maxGeneric + 1;
- aapoint_fs.num_inputs++;
-#endif
-
aapoint->fs->aapoint_fs
= aapoint->driver_create_fs_state(aapoint->pipe, &aapoint_fs);
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index fed2b6e759..4cca965ac1 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -85,6 +85,8 @@ struct draw_context *draw_create( void )
/* these defaults are oriented toward the needs of softpipe */
draw->wide_point_threshold = 1000000.0; /* infinity */
draw->wide_line_threshold = 1.0;
+ draw->line_stipple = TRUE;
+ draw->point_sprite = TRUE;
draw->reduced_prim = ~0; /* != any of PIPE_PRIM_x */
@@ -255,6 +257,28 @@ draw_wide_line_threshold(struct draw_context *draw, float threshold)
/**
+ * Tells the draw module whether or not to implement line stipple.
+ */
+void
+draw_enable_line_stipple(struct draw_context *draw, boolean enable)
+{
+ draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
+ draw->line_stipple = enable;
+}
+
+
+/**
+ * Tells draw module whether to convert points to quads for sprite mode.
+ */
+void
+draw_enable_point_sprites(struct draw_context *draw, boolean enable)
+{
+ draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
+ draw->point_sprite = enable;
+}
+
+
+/**
* Ask the draw module for the location/slot of the given vertex attribute in
* a post-transformed vertex.
*
@@ -299,7 +323,7 @@ uint
draw_num_vs_outputs(struct draw_context *draw)
{
uint count = draw->vertex_shader->info.num_outputs;
- if (draw->extra_vp_outputs.slot >= 0)
+ if (draw->extra_vp_outputs.slot > 0)
count++;
return count;
}
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index df63e91a22..dae687e590 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
@@ -94,6 +94,11 @@ void draw_wide_point_threshold(struct draw_context *draw, float threshold);
void draw_wide_line_threshold(struct draw_context *draw, float threshold);
+void draw_enable_line_stipple(struct draw_context *draw, boolean enable);
+
+void draw_enable_point_sprites(struct draw_context *draw, boolean enable);
+
+
boolean draw_use_sse(struct draw_context *draw);
void
diff --git a/src/gallium/auxiliary/draw/draw_passthrough.c b/src/gallium/auxiliary/draw/draw_passthrough.c
index a51fa0ab23..d16f056191 100644
--- a/src/gallium/auxiliary/draw/draw_passthrough.c
+++ b/src/gallium/auxiliary/draw/draw_passthrough.c
@@ -66,6 +66,95 @@
#include "draw/draw_vertex.h"
+/**
+ * General-purpose fetch from user's vertex arrays, emit to driver's
+ * vertex buffer.
+ *
+ * XXX this is totally temporary.
+ */
+static void
+fetch_store_general( struct draw_context *draw,
+ float *out,
+ unsigned start,
+ unsigned count )
+{
+ const struct vertex_info *vinfo = draw->render->get_vertex_info(draw->render);
+ const unsigned nr_attrs = vinfo->num_attribs;
+ uint i, j;
+
+ const unsigned *pitch = draw->vertex_fetch.pitch;
+ const ubyte **src = draw->vertex_fetch.src_ptr;
+
+ for (i = start; i < count; i++) {
+ for (j = 0; j < nr_attrs; j++) {
+ const uint jj = vinfo->src_index[j];
+ const enum pipe_format srcFormat = draw->vertex_element[jj].src_format;
+ const ubyte *from = src[jj] + i * pitch[jj];
+ float attrib[4];
+
+ switch (srcFormat) {
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ {
+ float *f = (float *) from;
+ attrib[0] = f[0];
+ attrib[1] = f[1];
+ attrib[2] = f[2];
+ attrib[3] = f[3];
+ }
+ break;
+ case PIPE_FORMAT_R32G32B32_FLOAT:
+ {
+ float *f = (float *) from;
+ attrib[0] = f[0];
+ attrib[1] = f[1];
+ attrib[2] = f[2];
+ attrib[3] = 1.0;
+ }
+ break;
+ case PIPE_FORMAT_R32G32_FLOAT:
+ {
+ float *f = (float *) from;
+ attrib[0] = f[0];
+ attrib[1] = f[1];
+ attrib[2] = 0.0;
+ attrib[3] = 1.0;
+ }
+ break;
+ case PIPE_FORMAT_R32_FLOAT:
+ {
+ float *f = (float *) from;
+ attrib[0] = f[0];
+ attrib[1] = 0.0;
+ attrib[2] = 0.0;
+ attrib[3] = 1.0;
+ }
+ break;
+ default:
+ abort();
+ }
+
+ /* XXX this will probably only work for softpipe */
+ switch (vinfo->emit[j]) {
+ case EMIT_HEADER:
+ memset(out, 0, sizeof(struct vertex_header));
+ out += sizeof(struct vertex_header) / 4;
+ break;
+ case EMIT_4F:
+ out[0] = attrib[0];
+ out[1] = attrib[1];
+ out[2] = attrib[2];
+ out[3] = attrib[3];
+ out += 4;
+ break;
+ default:
+ abort();
+ }
+
+ }
+ }
+}
+
+
/* Example of a fetch/emit passthrough shader which could be
* generated when bypass_clipping is enabled on a passthrough vertex
@@ -116,7 +205,6 @@ static void fetch_xyz_rgb_st( struct draw_context *draw,
}
}
-
static boolean update_shader( struct draw_context *draw )
{
const struct vertex_info *vinfo = draw->render->get_vertex_info(draw->render);
@@ -143,11 +231,15 @@ static boolean update_shader( struct draw_context *draw )
/* Just trying to figure out how this would work:
*/
- if (nr_attrs == 3 &&
- 0 /* some other tests */)
+ if (draw->rasterizer->bypass_vs ||
+ (nr_attrs == 3 && 0 /* some other tests */))
{
+#if 0
draw->vertex_fetch.pt_fetch = fetch_xyz_rgb_st;
- assert(vinfo->size == 10);
+#else
+ draw->vertex_fetch.pt_fetch = fetch_store_general;
+#endif
+ /*assert(vinfo->size == 10);*/
return TRUE;
}
@@ -175,7 +267,6 @@ static boolean set_prim( struct draw_context *draw,
}
-
boolean
draw_passthrough_arrays(struct draw_context *draw,
unsigned prim,
@@ -184,10 +275,13 @@ draw_passthrough_arrays(struct draw_context *draw,
{
float *hw_verts;
+ if (draw_need_pipeline(draw))
+ return FALSE;
+
if (!set_prim(draw, prim))
return FALSE;
- if (!update_shader( draw ))
+ if (!update_shader(draw))
return FALSE;
hw_verts = draw->render->allocate_vertices( draw->render,
diff --git a/src/gallium/auxiliary/draw/draw_prim.c b/src/gallium/auxiliary/draw/draw_prim.c
index 7d6cd43410..888fa536ea 100644
--- a/src/gallium/auxiliary/draw/draw_prim.c
+++ b/src/gallium/auxiliary/draw/draw_prim.c
@@ -31,6 +31,7 @@
*/
#include "pipe/p_debug.h"
+#include "pipe/p_util.h"
#include "draw_private.h"
#include "draw_context.h"
@@ -118,7 +119,42 @@ static void draw_prim_queue_flush( struct draw_context *draw )
draw_vertex_cache_unreference( draw );
}
+static INLINE void fetch_and_store(struct draw_context *draw)
+{
+ /* run vertex shader on vertex cache entries, four per invokation */
+#if 0
+ {
+ const struct vertex_info *vinfo = draw->render->get_vertex_info(draw->render);
+ memcpy(draw->vs.queue[0].vertex, draw->vs.queue[i + j].elt,
+ count * vinfo->size);
+ }
+#elif 0
+ unsigned i;
+ draw_update_vertex_fetch(draw);
+ for (i = 0; i < draw->vs.queue_nr; i += 4) {
+ struct vertex_header *dests[4];
+ unsigned elts[4];
+ struct tgsi_exec_machine *machine = &draw->machine;
+ int j, n = MIN2(4, draw->vs.queue_nr - i);
+
+ for (j = 0; j < n; j++) {
+ elts[j] = draw->vs.queue[i + j].elt;
+ dests[j] = draw->vs.queue[i + j].vertex;
+ }
+
+ for ( ; j < 4; j++) {
+ elts[j] = elts[0];
+ dests[j] = draw->vs.queue[i + j].vertex;
+ }
+ //fetch directly into dests
+ draw->vertex_fetch.fetch_func(draw, machine, dests, count);
+ }
+#endif
+
+ draw->vs.post_nr = draw->vs.queue_nr;
+ draw->vs.queue_nr = 0;
+}
void draw_do_flush( struct draw_context *draw, unsigned flags )
{
@@ -134,7 +170,10 @@ void draw_do_flush( struct draw_context *draw, unsigned flags )
if (flags >= DRAW_FLUSH_SHADER_QUEUE) {
if (draw->vs.queue_nr)
- (*draw->shader_queue_flush)(draw);
+ if (draw->rasterizer->bypass_vs)
+ fetch_and_store(draw);
+ else
+ (*draw->shader_queue_flush)(draw);
if (flags >= DRAW_FLUSH_PRIM_QUEUE) {
if (draw->pq.queue_nr)
@@ -485,7 +524,11 @@ draw_arrays(struct draw_context *draw, unsigned prim,
}
/* drawing done here: */
- draw_prim(draw, prim, start, count);
+ if (!draw->rasterizer->bypass_vs ||
+ !draw_passthrough_arrays(draw, prim, start, count)) {
+ /* we have to run the whole pipeline */
+ draw_prim(draw, prim, start, count);
+ }
}
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 4147472d45..1c65c3d1b2 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -238,6 +238,8 @@ struct draw_context
float wide_point_threshold; /**< convert pnts to tris if larger than this */
float wide_line_threshold; /**< convert lines to tris if wider than this */
+ boolean line_stipple; /**< do line stipple? */
+ boolean point_sprite; /**< convert points to quads for sprites? */
boolean use_sse;
/* If a prim stage introduces new vertex attributes, they'll be stored here
@@ -344,10 +346,10 @@ extern void draw_vertex_cache_reset_vertex_ids( struct draw_context *draw );
extern void draw_vertex_shader_queue_flush( struct draw_context *draw );
-struct tgsi_exec_machine;
-
extern void draw_update_vertex_fetch( struct draw_context *draw );
+extern boolean draw_need_pipeline(const struct draw_context *draw);
+
/* Prototype/hack
*/
diff --git a/src/gallium/auxiliary/draw/draw_pstipple.c b/src/gallium/auxiliary/draw/draw_pstipple.c
index 8b3e84a9a0..09d542002f 100644
--- a/src/gallium/auxiliary/draw/draw_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pstipple.c
@@ -324,21 +324,13 @@ generate_pstip_fs(struct pstip_stage *pstip)
(struct tgsi_token *) pstip_fs.tokens,
MAX, &transform.base);
-#if 1 /* DEBUG */
+#if 0 /* DEBUG */
tgsi_dump(orig_fs->tokens, 0);
tgsi_dump(pstip_fs.tokens, 0);
#endif
pstip->sampler_unit = transform.maxSampler + 1;
-#if 1 /* XXX remove */
- if (transform.wincoordInput < 0) {
- pstip_fs.input_semantic_name[pstip_fs.num_inputs] = TGSI_SEMANTIC_POSITION;
- pstip_fs.input_semantic_index[pstip_fs.num_inputs] = (ubyte)transform.maxInput;
- pstip_fs.num_inputs++;
- }
-#endif
-
pstip->fs->pstip_fs = pstip->driver_create_fs_state(pstip->pipe, &pstip_fs);
}
@@ -488,16 +480,16 @@ pstip_first_tri(struct draw_stage *stage, struct prim_header *header)
struct pipe_context *pipe = pstip->pipe;
uint num_samplers;
- /* how many samplers? */
- /* we'll use sampler/texture[pstip->sampler_unit] for the stipple */
- num_samplers = MAX2(pstip->num_textures, pstip->num_samplers);
- num_samplers = MAX2(num_samplers, pstip->sampler_unit + 1);
-
assert(stage->draw->rasterizer->poly_stipple_enable);
/* bind our fragprog */
bind_pstip_fragment_shader(pstip);
+ /* how many samplers? */
+ /* we'll use sampler/texture[pstip->sampler_unit] for the stipple */
+ num_samplers = MAX2(pstip->num_textures, pstip->num_samplers);
+ num_samplers = MAX2(num_samplers, pstip->sampler_unit + 1);
+
/* plug in our sampler, texture */
pstip->state.samplers[pstip->sampler_unit] = pstip->sampler_cso;
pstip->state.textures[pstip->sampler_unit] = pstip->texture;
diff --git a/src/gallium/auxiliary/draw/draw_validate.c b/src/gallium/auxiliary/draw/draw_validate.c
index b43295b586..33e5559508 100644
--- a/src/gallium/auxiliary/draw/draw_validate.c
+++ b/src/gallium/auxiliary/draw/draw_validate.c
@@ -33,6 +33,63 @@
#include "draw_private.h"
+/**
+ * Check if we need any special pipeline stages, or whether prims/verts
+ * can go through untouched.
+ */
+boolean
+draw_need_pipeline(const struct draw_context *draw)
+{
+ /* clipping */
+ if (!draw->rasterizer->bypass_clipping)
+ return TRUE;
+
+ /* vertex shader */
+ if (!draw->rasterizer->bypass_vs)
+ return TRUE;
+
+ /* line stipple */
+ if (draw->rasterizer->line_stipple_enable && draw->line_stipple)
+ return TRUE;
+
+ /* wide lines */
+ if (draw->rasterizer->line_width > draw->wide_line_threshold)
+ return TRUE;
+
+ /* large points */
+ if (draw->rasterizer->point_size > draw->wide_point_threshold)
+ return TRUE;
+
+ /* AA lines */
+ if (draw->rasterizer->line_smooth && draw->pipeline.aaline)
+ return TRUE;
+
+ /* AA points */
+ if (draw->rasterizer->point_smooth && draw->pipeline.aapoint)
+ return TRUE;
+
+ /* polygon stipple */
+ if (draw->rasterizer->poly_stipple_enable && draw->pipeline.pstipple)
+ return TRUE;
+
+ /* polygon offset */
+ if (draw->rasterizer->offset_cw || draw->rasterizer->offset_ccw)
+ return TRUE;
+
+ /* point sprites */
+ if (draw->rasterizer->point_sprite && draw->point_sprite)
+ return TRUE;
+
+ /* two-side lighting */
+ if (draw->rasterizer->light_twoside)
+ return TRUE;
+
+ /* polygon cull */
+ if (draw->rasterizer->cull_mode)
+ return TRUE;
+
+ return FALSE;
+}
@@ -57,7 +114,9 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
&& !draw->rasterizer->line_smooth);
/* drawing large points? */
- if (draw->rasterizer->point_smooth && draw->pipeline.aapoint)
+ if (draw->rasterizer->point_sprite && draw->point_sprite)
+ wide_points = TRUE;
+ else if (draw->rasterizer->point_smooth && draw->pipeline.aapoint)
wide_points = FALSE;
else if (draw->rasterizer->point_size > draw->wide_point_threshold)
wide_points = TRUE;
@@ -92,7 +151,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
next = draw->pipeline.wide_point;
}
- if (draw->rasterizer->line_stipple_enable) {
+ if (draw->rasterizer->line_stipple_enable && draw->line_stipple) {
draw->pipeline.stipple->next = next;
next = draw->pipeline.stipple;
precalc_flat = 1; /* only needed for lines really */
diff --git a/src/gallium/auxiliary/draw/draw_vbuf.c b/src/gallium/auxiliary/draw/draw_vbuf.c
index 71ac73912b..f83b441e93 100644
--- a/src/gallium/auxiliary/draw/draw_vbuf.c
+++ b/src/gallium/auxiliary/draw/draw_vbuf.c
@@ -225,6 +225,11 @@ emit_vertex( struct vbuf_stage *vbuf,
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:
*vbuf->vertex_ptr++ = fui(vertex->data[j][0]);
count++;
diff --git a/src/gallium/auxiliary/draw/draw_vertex.c b/src/gallium/auxiliary/draw/draw_vertex.c
index daf1ef4b80..970adc95e7 100644
--- a/src/gallium/auxiliary/draw/draw_vertex.c
+++ b/src/gallium/auxiliary/draw/draw_vertex.c
@@ -52,6 +52,9 @@ draw_compute_vertex_size(struct vertex_info *vinfo)
switch (vinfo->emit[i]) {
case EMIT_OMIT:
break;
+ case EMIT_HEADER:
+ vinfo->size += sizeof(struct vertex_header) / 4;
+ break;
case EMIT_4UB:
/* fall-through */
case EMIT_1F_PSIZE:
diff --git a/src/gallium/auxiliary/draw/draw_vertex.h b/src/gallium/auxiliary/draw/draw_vertex.h
index 267c74203b..abd2017ed3 100644
--- a/src/gallium/auxiliary/draw/draw_vertex.h
+++ b/src/gallium/auxiliary/draw/draw_vertex.h
@@ -48,6 +48,7 @@
enum attrib_emit {
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_PSIZE, /**< insert constant point size */
EMIT_2F,
diff --git a/src/gallium/auxiliary/draw/draw_vf.c b/src/gallium/auxiliary/draw/draw_vf.c
index 901ff20a7e..f4e29a6293 100644
--- a/src/gallium/auxiliary/draw/draw_vf.c
+++ b/src/gallium/auxiliary/draw/draw_vf.c
@@ -263,6 +263,14 @@ void draw_vf_set_vertex_info( struct draw_vertex_fetch *vf,
}
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:
attrs[nr_attrs].attrib = j;
attrs[nr_attrs].format = DRAW_EMIT_1F;
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c
index 55bec14116..364693e0b4 100644
--- a/src/gallium/auxiliary/draw/draw_vs_exec.c
+++ b/src/gallium/auxiliary/draw/draw_vs_exec.c
@@ -166,6 +166,19 @@ vs_exec_run( struct draw_vertex_shader *shader,
vOut[j]->data[slot][2] = machine->Outputs[slot].xyzw[2].f[j];
vOut[j]->data[slot][3] = machine->Outputs[slot].xyzw[3].f[j];
}
+
+#if 0 /*DEBUG*/
+ printf("Post xform vert:\n");
+ for (slot = 0; slot < draw->num_vs_outputs; slot++) {
+ printf("%d: %f %f %f %f\n", slot,
+ vOut[j]->data[slot][0],
+ vOut[j]->data[slot][1],
+ vOut[j]->data[slot][2],
+ vOut[j]->data[slot][3]);
+ }
+#endif
+
+
} /* loop over vertices */
}
diff --git a/src/gallium/auxiliary/draw/draw_wide_point.c b/src/gallium/auxiliary/draw/draw_wide_point.c
index 65bd50f2b8..c53f7e6cb3 100644
--- a/src/gallium/auxiliary/draw/draw_wide_point.c
+++ b/src/gallium/auxiliary/draw/draw_wide_point.c
@@ -184,7 +184,8 @@ static void widepoint_first_point( struct draw_stage *stage,
wide->half_point_size = 0.5f * draw->rasterizer->point_size;
/* XXX we won't know the real size if it's computed by the vertex shader! */
- if (draw->rasterizer->point_size > draw->wide_point_threshold) {
+ if ((draw->rasterizer->point_size > draw->wide_point_threshold) ||
+ (draw->rasterizer->point_sprite && draw->point_sprite)) {
stage->point = widepoint_point;
}
else {