summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_rasterpos.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-12-11 13:00:12 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2007-12-11 13:14:56 +0000
commit48731280d08bef51c406703e82986643e17b4757 (patch)
tree41aff56ce1b14d4b700b0af47cad581bde922619 /src/mesa/state_tracker/st_cb_rasterpos.c
parent89afc929f4e18165f1043c36844150e78f300cd5 (diff)
gallium: Remove feedback interfaces from pipe driver.
Something similar will return when geometry shaders are added, but for now this interface is not required.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_rasterpos.c')
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index 5279cb1cd4..852cff6490 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -173,6 +173,7 @@ static struct rastpos_stage *
new_draw_rastpos_stage(GLcontext *ctx, struct draw_context *draw)
{
struct rastpos_stage *rs = CALLOC_STRUCT(rastpos_stage);
+ GLuint i;
rs->stage.draw = draw;
rs->stage.next = NULL;
@@ -184,6 +185,26 @@ new_draw_rastpos_stage(GLcontext *ctx, struct draw_context *draw)
rs->stage.reset_stipple_counter = rastpos_reset_stipple_counter;
rs->ctx = ctx;
+ for (i = 0; i < VERT_ATTRIB_MAX; i++) {
+ rs->array[i].Size = 4;
+ rs->array[i].Type = GL_FLOAT;
+ rs->array[i].Stride = 0;
+ rs->array[i].StrideB = 0;
+ rs->array[i].Ptr = (GLubyte *) ctx->Current.Attrib[i];
+ rs->array[i].Enabled = GL_TRUE;
+ rs->array[i].Normalized = GL_TRUE;
+ rs->array[i].BufferObj = NULL;
+ rs->arrays[i] = &rs->array[i];
+ }
+
+ rs->prim.mode = GL_POINTS;
+ rs->prim.indexed = 0;
+ rs->prim.begin = 1;
+ rs->prim.end = 1;
+ rs->prim.weak = 0;
+ rs->prim.start = 0;
+ rs->prim.count = 1;
+
return rs;
}
@@ -201,31 +222,8 @@ st_RasterPos(GLcontext *ctx, const GLfloat v[4])
}
else {
/* create rastpos draw stage */
- GLuint i;
-
rs = new_draw_rastpos_stage(ctx, draw);
st->rastpos_stage = &rs->stage;
-
- /* one-time init */
- for (i = 0; i < VERT_ATTRIB_MAX; i++) {
- rs->array[i].Size = 4;
- rs->array[i].Type = GL_FLOAT;
- rs->array[i].Stride = 0;
- rs->array[i].StrideB = 0;
- rs->array[i].Ptr = (GLubyte *) ctx->Current.Attrib[i];
- rs->array[i].Enabled = GL_TRUE;
- rs->array[i].Normalized = GL_TRUE;
- rs->array[i].BufferObj = NULL;
- rs->arrays[i] = &rs->array[i];
- }
-
- rs->prim.mode = GL_POINTS;
- rs->prim.indexed = 0;
- rs->prim.begin = 1;
- rs->prim.end = 1;
- rs->prim.weak = 0;
- rs->prim.start = 0;
- rs->prim.count = 1;
}
/* plug our rastpos stage into the draw module */