summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-03-16 12:55:02 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-03-16 12:55:13 +1100
commit7d2c63e90983088f1e2f49543caf0468aa91111f (patch)
treeb66f4da87a56b35c55998395cf0647eab4086e8b /src
parentc4354f84603cabb0e33ea3f586cc89bfdc27f79b (diff)
nv10: fix build after merge
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nv10/nv10_state.c8
-rw-r--r--src/gallium/drivers/nv10/nv10_state.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv10/nv10_state.c b/src/gallium/drivers/nv10/nv10_state.c
index 313230fe88..d7c445f1b3 100644
--- a/src/gallium/drivers/nv10/nv10_state.c
+++ b/src/gallium/drivers/nv10/nv10_state.c
@@ -10,15 +10,15 @@
static void nv10_vertex_layout(struct pipe_context* pipe)
{
struct nv10_context *nv10 = nv10_context(pipe);
- const struct pipe_shader_state *fs = nv10->fragprog.current->pipe;
+ struct nv10_fragment_program *fp = nv10->fragprog.current;
uint32_t src = 0;
int i;
struct vertex_info vinfo;
memset(&vinfo, 0, sizeof(vinfo));
- for (i = 0; i < fs->num_inputs; i++) {
- switch (fs->input_semantic_name[i]) {
+ for (i = 0; i < fp->info.num_inputs; i++) {
+ switch (fp->info.input_semantic_name[i]) {
case TGSI_SEMANTIC_POSITION:
draw_emit_vertex_attr(&vinfo, EMIT_4F, INTERP_LINEAR, src++);
break;
@@ -476,6 +476,8 @@ nv10_fp_state_create(struct pipe_context *pipe,
fp = CALLOC(1, sizeof(struct nv10_fragment_program));
fp->pipe = cso;
+
+ tgsi_scan_shader(cso->tokens, &fp->info);
return (void *)fp;
}
diff --git a/src/gallium/drivers/nv10/nv10_state.h b/src/gallium/drivers/nv10/nv10_state.h
index d4b703c7ad..9bda8a7d6a 100644
--- a/src/gallium/drivers/nv10/nv10_state.h
+++ b/src/gallium/drivers/nv10/nv10_state.h
@@ -2,6 +2,7 @@
#define __NV10_STATE_H__
#include "pipe/p_state.h"
+#include "tgsi/util/tgsi_scan.h"
struct nv10_blend_state {
uint32_t b_enable;
@@ -77,6 +78,7 @@ struct nv10_fragment_program_data {
struct nv10_fragment_program {
const struct pipe_shader_state *pipe;
+ struct tgsi_shader_info info;
boolean translated;
boolean on_hw;