fix a few vert/frag program items to get i915 driver going again

This commit is contained in:
Brian 2007-10-01 13:45:53 -06:00
parent 2727cfddbf
commit b13618c316
5 changed files with 8 additions and 16 deletions

View file

@ -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;
}

View file

@ -308,10 +308,4 @@
#define PIPE_QUERY_TYPES 3
/**
* Pipe capabilities/queries
*/
#define PIPE_PARAM_FS_NEEDS_POS 1
#endif

View file

@ -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;
}

View file

@ -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;

View file

@ -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));