summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_vs.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-04-17 14:20:00 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-04-17 14:23:13 +0100
commit280bcff1fa200b790d8712946a4ffbaa47a67433 (patch)
treee9d8ebf9e24e8bee0687a3ca283dcff10787008f /src/gallium/auxiliary/draw/draw_vs.h
parent938ec19210c5b4e19dcb2b606c9ade415f2c1f84 (diff)
draw: add vertex shader run_linear function
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_vs.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs.h b/src/gallium/auxiliary/draw/draw_vs.h
index 33ce1e335e..e88d00e247 100644
--- a/src/gallium/auxiliary/draw/draw_vs.h
+++ b/src/gallium/auxiliary/draw/draw_vs.h
@@ -35,10 +35,46 @@
#include "draw_private.h"
-struct draw_vertex_shader;
struct draw_context;
struct pipe_shader_state;
+/**
+ * Private version of the compiled vertex_shader
+ */
+struct draw_vertex_shader {
+
+ /* This member will disappear shortly:
+ */
+ struct pipe_shader_state state;
+
+ struct tgsi_shader_info info;
+
+ void (*prepare)( struct draw_vertex_shader *shader,
+ struct draw_context *draw );
+
+ /* Run the shader - this interface will get cleaned up in the
+ * future:
+ */
+ boolean (*run)( struct draw_vertex_shader *shader,
+ struct draw_context *draw,
+ const unsigned *elts,
+ unsigned count,
+ void *out,
+ unsigned vertex_size);
+
+ void (*run_linear)( struct draw_vertex_shader *shader,
+ const float (*input)[4],
+ float (*output)[4],
+ const float (*constants)[4],
+ unsigned count,
+ unsigned input_stride,
+ unsigned output_stride );
+
+
+ void (*delete)( struct draw_vertex_shader * );
+};
+
+
struct draw_vertex_shader *
draw_create_vs_exec(struct draw_context *draw,
const struct pipe_shader_state *templ);
@@ -79,5 +115,7 @@ compute_clipmask(const float *clip, /*const*/ float plane[][4], unsigned nr)
return mask;
}
+#define MAX_TGSI_VERTICES 4
+
#endif