aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-20 16:31:12 -0600
committerBrian <[email protected]>2007-08-20 16:31:12 -0600
commit8175eaa3b49f3b62f7ab251c4e0fbd14dd9f7e2b (patch)
tree9f49d51df082f2e2033bf6c624e3d2c9b35af2f8 /src/mesa/pipe
parent51da8ee85eccf0df3721cbd863cd174382d1ddfd (diff)
Checkpoint: remove more of the old draw_vb() code.
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/draw/draw_arrays.c3
-rw-r--r--src/mesa/pipe/draw/draw_context.c6
-rw-r--r--src/mesa/pipe/draw/draw_private.h7
-rw-r--r--src/mesa/pipe/i915simple/i915_context.c28
-rw-r--r--src/mesa/pipe/p_context.h17
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c42
-rw-r--r--src/mesa/pipe/softpipe/sp_state_vertex.c4
7 files changed, 16 insertions, 91 deletions
diff --git a/src/mesa/pipe/draw/draw_arrays.c b/src/mesa/pipe/draw/draw_arrays.c
index fe9ec444252..8cb34e8f8ed 100644
--- a/src/mesa/pipe/draw/draw_arrays.c
+++ b/src/mesa/pipe/draw/draw_arrays.c
@@ -354,9 +354,6 @@ do { \
} while (0)
-/**
- * XXX very similar to same func in draw_vb.c (which will go away)
- */
void
draw_set_vertex_attributes( struct draw_context *draw,
const unsigned *slot_to_vf_attr,
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c
index cc00576c53b..0a3df37b7fa 100644
--- a/src/mesa/pipe/draw/draw_context.c
+++ b/src/mesa/pipe/draw/draw_context.c
@@ -60,8 +60,10 @@ struct draw_context *draw_create( void )
draw->nr_planes = 6;
#ifdef MESA
+#if 0
draw->vf = vf_create( GL_TRUE );
#endif
+#endif
/* Statically allocate maximum sized vertices for the cache - could be cleverer...
*/
@@ -79,7 +81,7 @@ struct draw_context *draw_create( void )
void draw_destroy( struct draw_context *draw )
{
-#ifdef MESA
+#if 0/*def MESA*/
if (draw->header.storage) {
ALIGN_FREE( draw->header.storage );
}
@@ -194,8 +196,10 @@ void draw_set_viewport_state( struct draw_context *draw,
draw->viewport = *viewport; /* struct copy */
#ifdef MESA
+#if 0
vf_set_vp_scale_translate( draw->vf, viewport->scale, viewport->translate );
#endif
+#endif
/* Using tnl/ and vf/ modules is temporary while getting started.
* Full pipe will have vertex shader, vertex fetch of its own.
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 5c3efb80e99..a9825e646b1 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -222,14 +222,11 @@ struct draw_context
} pq;
- /* Misc for draw_vb.c (XXX temporary)
- */
-#ifdef MESA
- GLvector4f header;
-#endif
+#if 0
ubyte *verts;
boolean in_vb;
struct vertex_fetch *vf;
+#endif
};
diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c
index c7d469583c7..b34899a8671 100644
--- a/src/mesa/pipe/i915simple/i915_context.c
+++ b/src/mesa/pipe/i915simple/i915_context.c
@@ -147,33 +147,16 @@ static void i915_destroy( struct pipe_context *pipe )
free( i915 );
}
-static void i915_draw_vb( struct pipe_context *pipe,
- struct vertex_buffer *VB )
-{
- struct i915_context *i915 = i915_context( pipe );
-
- if (i915->dirty)
- i915_update_derived( i915 );
-
-#if 0
- draw_vb( i915->draw, VB );
-#endif
-}
-
-static void
-i915_draw_vertices(struct pipe_context *pipe,
- unsigned mode,
- unsigned numVertex, const float *verts,
- unsigned numAttribs, const unsigned attribs[])
+static void i915_draw_arrays( struct pipe_context *pipe,
+ unsigned mode, unsigned start, unsigned count)
{
struct i915_context *i915 = i915_context( pipe );
if (i915->dirty)
i915_update_derived( i915 );
-#if 0
- draw_vertices(i915->draw, mode, numVertex, verts, numAttribs, attribs);
-#endif
+
+ draw_arrays(i915->draw, mode, start, count);
}
@@ -217,12 +200,11 @@ struct pipe_context *i915_create( struct pipe_winsys *pipe_winsys,
i915->pipe.destroy = i915_destroy;
i915->pipe.supported_formats = i915_supported_formats;
i915->pipe.max_texture_size = i915_max_texture_size;
- i915->pipe.draw_vb = i915_draw_vb;
- i915->pipe.draw_vertices = i915_draw_vertices;
i915->pipe.clear = i915_clear;
i915->pipe.reset_occlusion_counter = NULL; /* no support */
i915->pipe.get_occlusion_counter = NULL;
+ i915->pipe.draw_arrays = i915_draw_arrays;
/*
* Create drawing context and plug our rendering stage into it.
diff --git a/src/mesa/pipe/p_context.h b/src/mesa/pipe/p_context.h
index a3664a3b80c..c4496cda507 100644
--- a/src/mesa/pipe/p_context.h
+++ b/src/mesa/pipe/p_context.h
@@ -28,16 +28,10 @@
#ifndef PIPE_CONTEXT_H
#define PIPE_CONTEXT_H
-//#include "main/mtypes.h"
#include "p_state.h"
#include "p_compiler.h"
-/* Drawing currently kludged up via the existing tnl/ module.
- */
-struct vertex_buffer;
-
-
/**
* Software pipeline rendering context. Basically a collection of
* state setting functions, plus VBO drawing entrypoint.
@@ -68,17 +62,6 @@ struct pipe_context {
/*
* Drawing
*/
- /* XXX this is temporary */
- void (*draw_vb)( struct pipe_context *pipe,
- struct vertex_buffer *VB );
-
- /* XXX this is temporary */
- void (*draw_vertices)( struct pipe_context *pipe,
- unsigned mode,
- unsigned numVertex, const float *verts,
- unsigned numAttribs, const unsigned attribs[]);
-
- /** this is basically what we want */
void (*draw_arrays)( struct pipe_context *pipe,
unsigned mode, unsigned start, unsigned count);
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 91ede05c05a..ab9becc99e2 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -195,44 +195,6 @@ static void softpipe_destroy( struct pipe_context *pipe )
}
-#if 0
-static void softpipe_draw_vb( struct pipe_context *pipe,
- struct vertex_buffer *VB )
-{
- struct softpipe_context *softpipe = softpipe_context( pipe );
-
- if (softpipe->dirty)
- softpipe_update_derived( softpipe );
-
- /* XXX move mapping/unmapping to higher/coarser level? */
- softpipe_map_surfaces(softpipe);
- draw_vb( softpipe->draw, VB );
- softpipe_unmap_surfaces(softpipe);
-}
-#endif
-
-
-static void
-softpipe_draw_vertices(struct pipe_context *pipe,
- unsigned mode,
- unsigned numVertex, const float *verts,
- unsigned numAttribs, const unsigned attribs[])
-{
- struct softpipe_context *softpipe = softpipe_context( pipe );
-
- if (softpipe->dirty)
- softpipe_update_derived( softpipe );
-
- /* XXX move mapping/unmapping to higher/coarser level? */
- softpipe_map_surfaces(softpipe);
-#if 0
- draw_vertices(softpipe->draw, mode, numVertex, verts, numAttribs, attribs);
-#endif
- softpipe_unmap_surfaces(softpipe);
-}
-
-
-
static void softpipe_reset_occlusion_counter(struct pipe_context *pipe)
{
struct softpipe_context *softpipe = softpipe_context( pipe );
@@ -289,10 +251,6 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
softpipe->pipe.set_vertex_buffer = softpipe_set_vertex_buffer;
softpipe->pipe.set_vertex_element = softpipe_set_vertex_element;
-#if 0
- softpipe->pipe.draw_vb = softpipe_draw_vb;
- softpipe->pipe.draw_vertices = softpipe_draw_vertices;
-#endif
softpipe->pipe.draw_arrays = softpipe_draw_arrays;
softpipe->pipe.draw_elements = softpipe_draw_elements;
diff --git a/src/mesa/pipe/softpipe/sp_state_vertex.c b/src/mesa/pipe/softpipe/sp_state_vertex.c
index 18852552eb3..09ff540ccfd 100644
--- a/src/mesa/pipe/softpipe/sp_state_vertex.c
+++ b/src/mesa/pipe/softpipe/sp_state_vertex.c
@@ -27,10 +27,14 @@
/* Authors: Keith Whitwell <[email protected]>
*/
+
+
#include "sp_context.h"
#include "sp_state.h"
#include "sp_surface.h"
+#include "pipe/draw/draw_context.h"
+
void
softpipe_set_vertex_element(struct pipe_context *pipe,