summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_state.h
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-02-15 09:31:22 +0000
committerKeith Whitwell <[email protected]>2008-02-15 09:31:22 +0000
commitc04a7f8929d674971a472ffa4d3a31200c22aa5a (patch)
treeea06d63c3ed61311ee5bf2e7e8a49bbf83a55a07 /src/mesa/pipe/softpipe/sp_state.h
parentfa9c160389ffc6d7a20773b77c937193f30339d8 (diff)
gallium: reorganize fragment shader execution, unbreak sse
This is probably going to get further reworked in the near future. Right now there's a new interface wrapped around each shader execution mode - exec, sse2, llvm. The llvm code was disabled already and has just been moved as-is to a new file, whereas the sse2 and exec code is actually enabled. The way the interfaces has turned out suggests to me that the correct approach is to actually have each shader include a pointer to a quad stage which will do a better job of encapsulating the execution environment than what I have here -- that's a second step however.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_state.h')
-rw-r--r--src/mesa/pipe/softpipe/sp_state.h37
1 files changed, 22 insertions, 15 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h
index af955c1e17b..431952f1aac 100644
--- a/src/mesa/pipe/softpipe/sp_state.h
+++ b/src/mesa/pipe/softpipe/sp_state.h
@@ -33,8 +33,6 @@
#include "pipe/p_state.h"
-#include "x86/rtasm/x86sse.h"
-
#define SP_NEW_VIEWPORT 0x1
#define SP_NEW_RASTERIZER 0x2
@@ -53,27 +51,36 @@
#define SP_NEW_QUERY 0x4000
+struct tgsi_sampler;
+struct tgsi_interp_coef;
+struct tgsi_exec_machine;
-#ifdef MESA_LLVM
-struct gallivm_prog;
-#endif
+/** Subclass of pipe_shader_state (though it doesn't really need to be).
+ *
+ * This is starting to look an awful lot like a quad pipeline stage...
+ */
+struct sp_fragment_shader {
+ struct pipe_shader_state shader;
+ void (*prepare)( struct sp_fragment_shader *shader,
+ struct tgsi_exec_machine *machine,
+ struct tgsi_sampler *samplers);
-/** Subclass of pipe_shader_state */
-struct sp_fragment_shader_state {
- struct pipe_shader_state shader;
-#if defined(__i386__) || defined(__386__)
- struct x86_function sse2_program;
-#endif
-#ifdef MESA_LLVM
- struct gallivm_prog *llvm_prog;
-#endif
+ /* Run the shader - this interface will get cleaned up in the
+ * future:
+ */
+ unsigned (*run)( struct sp_fragment_shader *shader,
+ struct tgsi_exec_machine *machine,
+ struct quad_header *quad );
+
+
+ void (*delete)( struct sp_fragment_shader * );
};
/** Subclass of pipe_shader_state */
-struct sp_vertex_shader_state {
+struct sp_vertex_shader {
struct pipe_shader_state shader;
struct draw_vertex_shader *draw_data;
};