mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
fix a few vert/frag program items to get i915 driver going again
This commit is contained in:
parent
2727cfddbf
commit
b13618c316
5 changed files with 8 additions and 16 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,10 +308,4 @@
|
|||
#define PIPE_QUERY_TYPES 3
|
||||
|
||||
|
||||
/**
|
||||
* Pipe capabilities/queries
|
||||
*/
|
||||
#define PIPE_PARAM_FS_NEEDS_POS 1
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue