summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-07-19 20:24:55 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-07-19 20:24:55 +0100
commit4824c342c864e870251a7d343c95e51274e50d23 (patch)
tree483fa4e4aaf87d37fd5005032f27584110de595d /src/mesa/pipe
parent6101fe641cd506422d0b2735dfcaa61174684ec4 (diff)
Trigger tgsi compilation for fragment programs.
Not sure the generated program looks correct though...
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/p_state.h5
-rw-r--r--src/mesa/pipe/softpipe/sp_state_derived.c4
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_dump.c4
-rw-r--r--src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h2
4 files changed, 11 insertions, 4 deletions
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index fd5e7ad3af..e3f62a80ad 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -121,8 +121,11 @@ struct pipe_clip_state {
GLuint nr;
};
+
struct pipe_fs_state {
- struct gl_fragment_program *fp;
+ GLuint inputs_read; /* FRAG_ATTRIB_* */
+ const struct tgsi_token *tokens;
+
};
struct pipe_constant_buffer {
diff --git a/src/mesa/pipe/softpipe/sp_state_derived.c b/src/mesa/pipe/softpipe/sp_state_derived.c
index 18dfb50e38..fcdedb54a9 100644
--- a/src/mesa/pipe/softpipe/sp_state_derived.c
+++ b/src/mesa/pipe/softpipe/sp_state_derived.c
@@ -28,7 +28,6 @@
#include "main/glheader.h"
#include "main/macros.h"
#include "main/enums.h"
-#include "shader/program.h"
#include "vf/vf.h"
#include "pipe/draw/draw_context.h"
@@ -68,8 +67,7 @@ static const GLuint frag_to_vf[FRAG_ATTRIB_MAX] =
*/
static void calculate_vertex_layout( struct softpipe_context *softpipe )
{
- struct gl_fragment_program *fp = softpipe->fs.fp;
- const GLuint inputsRead = fp->Base.InputsRead;
+ const GLuint inputsRead = softpipe->fs.inputs_read;
GLuint slot_to_vf_attr[VF_ATTRIB_MAX];
GLbitfield attr_mask = 0x0;
GLuint i;
diff --git a/src/mesa/pipe/tgsi/core/tgsi_dump.c b/src/mesa/pipe/tgsi/core/tgsi_dump.c
index fecb246ab1..0345fd93f7 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_dump.c
+++ b/src/mesa/pipe/tgsi/core/tgsi_dump.c
@@ -400,12 +400,16 @@ tgsi_dump(
GLuint deflt = !(flags & TGSI_DUMP_NO_DEFAULT);
{
+#if 0
static GLuint counter = 0;
char buffer[64];
sprintf( buffer, "sbir-dump-%.4u.txt", counter++ );
dump.file = fopen( buffer, "wt" );
+#else
+ dump.file = stderr;
dump.tabs = 0;
+#endif
}
tgsi_parse_init( &parse, tokens );
diff --git a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h
index 4c1141e579..9256318997 100644
--- a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h
+++ b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h
@@ -5,6 +5,8 @@
extern "C" {
#endif // defined __cplusplus
+struct tgsi_token;
+
GLboolean
tgsi_mesa_compile_fp_program(
const struct gl_fragment_program *program,