summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-01 13:45:53 -0600
committerBrian <[email protected]>2007-10-01 13:45:53 -0600
commitb13618c3167002a823e9bb1e744a0a316fd0e2bf (patch)
tree9aac1a463a433d9b4273aad9a1aa86feac79b8f7 /src/mesa
parent2727cfddbf64add52181bed999938a90811f01a3 (diff)
fix a few vert/frag program items to get i915 driver going again
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/pipe/i915simple/i915_context.c2
-rw-r--r--src/mesa/pipe/p_defines.h6
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c2
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c5
-rw-r--r--src/mesa/state_tracker/st_program.c9
5 files changed, 8 insertions, 16 deletions
diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c
index 89252e38d58..b27ab48a501 100644
--- a/src/mesa/pipe/i915simple/i915_context.c
+++ b/src/mesa/pipe/i915simple/i915_context.c
@@ -142,8 +142,6 @@ static int
i915_get_param(struct pipe_context *pipe, int param)
{
switch (param) {
- case PIPE_PARAM_FS_NEEDS_POS:
- return 0;
default:
return 0;
}
diff --git a/src/mesa/pipe/p_defines.h b/src/mesa/pipe/p_defines.h
index 2a8109b10c9..d336f839980 100644
--- a/src/mesa/pipe/p_defines.h
+++ b/src/mesa/pipe/p_defines.h
@@ -308,10 +308,4 @@
#define PIPE_QUERY_TYPES 3
-/**
- * Pipe capabilities/queries
- */
-#define PIPE_PARAM_FS_NEEDS_POS 1
-
-
#endif
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 695bf1a9e02..610e7ad6899 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -239,8 +239,6 @@ static const char *softpipe_get_vendor( struct pipe_context *pipe )
static int softpipe_get_param(struct pipe_context *pipe, int param)
{
switch (param) {
- case PIPE_PARAM_FS_NEEDS_POS:
- return 1;
default:
return 0;
}
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 0a905fb563b..8aa977179a2 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -57,6 +57,8 @@
*/
struct translated_vertex_program
{
+ struct st_vertex_program *master;
+
/** The fragment shader "signature" this vertex shader is meant for: */
GLbitfield frag_inputs;
@@ -183,7 +185,7 @@ find_translated_vp(struct st_context *st,
* XXX This could be a hash lookup, using InputsRead as the key.
*/
for (xvp = stfp->vertex_programs; xvp; xvp = xvp->next) {
- if (xvp->frag_inputs == fragInputsRead) {
+ if (xvp->master == stvp && xvp->frag_inputs == fragInputsRead) {
break;
}
}
@@ -192,6 +194,7 @@ find_translated_vp(struct st_context *st,
if (!xvp) {
xvp = CALLOC_STRUCT(translated_vertex_program);
xvp->frag_inputs = fragInputsRead;
+ xvp->master = stvp;
xvp->next = stfp->vertex_programs;
stfp->vertex_programs = xvp;
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index a41b953a21d..a00f296d15f 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -281,12 +281,11 @@ st_translate_fragment_program(struct st_context *st,
GLuint attr;
GLbitfield inputsRead = stfp->Base.Base.InputsRead;
- /* Check if all fragment programs need the fragment position (in order
- * to do perspective-corrected interpolation).
+ /* For software rendering, we always need the fragment input position
+ * in order to calculate interpolated values.
+ * For i915, we always want to emit the semantic info for position.
*/
- /* XXX temporary! */
- if (st->pipe->get_param(st->pipe, PIPE_PARAM_FS_NEEDS_POS))
- inputsRead |= FRAG_BIT_WPOS;
+ inputsRead |= FRAG_BIT_WPOS;
memset(&fs, 0, sizeof(fs));