i915_get_param(struct pipe_context *pipe, int param)
{
switch (param) {
- case PIPE_PARAM_FS_NEEDS_POS:
- return 0;
default:
return 0;
}
#define PIPE_QUERY_TYPES 3
-/**
- * Pipe capabilities/queries
- */
-#define PIPE_PARAM_FS_NEEDS_POS 1
-
-
#endif
static int softpipe_get_param(struct pipe_context *pipe, int param)
{
switch (param) {
- case PIPE_PARAM_FS_NEEDS_POS:
- return 1;
default:
return 0;
}
*/
struct translated_vertex_program
{
+ struct st_vertex_program *master;
+
/** The fragment shader "signature" this vertex shader is meant for: */
GLbitfield frag_inputs;
* 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;
}
}
if (!xvp) {
xvp = CALLOC_STRUCT(translated_vertex_program);
xvp->frag_inputs = fragInputsRead;
+ xvp->master = stvp;
xvp->next = stfp->vertex_programs;
stfp->vertex_programs = xvp;
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));