st/mesa: fix GS varyings for PIPE_CAP_TGSI_TEXCOORD
This commit is contained in:

committed by
Maarten Lankhorst

parent
dc8da4c29b
commit
f3bd2bc7b2
@@ -944,17 +944,16 @@ st_translate_geometry_program(struct st_context *st,
|
|||||||
case VARYING_SLOT_TEX5:
|
case VARYING_SLOT_TEX5:
|
||||||
case VARYING_SLOT_TEX6:
|
case VARYING_SLOT_TEX6:
|
||||||
case VARYING_SLOT_TEX7:
|
case VARYING_SLOT_TEX7:
|
||||||
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
|
stgp->input_semantic_name[slot] = st->needs_texcoord_semantic ?
|
||||||
|
TGSI_SEMANTIC_TEXCOORD : TGSI_SEMANTIC_GENERIC;
|
||||||
stgp->input_semantic_index[slot] = (attr - VARYING_SLOT_TEX0);
|
stgp->input_semantic_index[slot] = (attr - VARYING_SLOT_TEX0);
|
||||||
break;
|
break;
|
||||||
case VARYING_SLOT_VAR0:
|
case VARYING_SLOT_VAR0:
|
||||||
default:
|
default:
|
||||||
assert(attr >= VARYING_SLOT_VAR0 && attr < VARYING_SLOT_MAX);
|
assert(attr >= VARYING_SLOT_VAR0 && attr < VARYING_SLOT_MAX);
|
||||||
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
|
stgp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
|
||||||
stgp->input_semantic_index[slot] = (VARYING_SLOT_VAR0 -
|
stgp->input_semantic_index[slot] = st->needs_texcoord_semantic ?
|
||||||
VARYING_SLOT_TEX0 +
|
(attr - VARYING_SLOT_VAR0) : (attr - VARYING_SLOT_TEX0);
|
||||||
attr -
|
|
||||||
VARYING_SLOT_VAR0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1036,7 +1035,8 @@ st_translate_geometry_program(struct st_context *st,
|
|||||||
case VARYING_SLOT_TEX5:
|
case VARYING_SLOT_TEX5:
|
||||||
case VARYING_SLOT_TEX6:
|
case VARYING_SLOT_TEX6:
|
||||||
case VARYING_SLOT_TEX7:
|
case VARYING_SLOT_TEX7:
|
||||||
gs_output_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
|
gs_output_semantic_name[slot] = st->needs_texcoord_semantic ?
|
||||||
|
TGSI_SEMANTIC_TEXCOORD : TGSI_SEMANTIC_GENERIC;
|
||||||
gs_output_semantic_index[slot] = (attr - VARYING_SLOT_TEX0);
|
gs_output_semantic_index[slot] = (attr - VARYING_SLOT_TEX0);
|
||||||
break;
|
break;
|
||||||
case VARYING_SLOT_VAR0:
|
case VARYING_SLOT_VAR0:
|
||||||
@@ -1044,10 +1044,9 @@ st_translate_geometry_program(struct st_context *st,
|
|||||||
assert(slot < Elements(gs_output_semantic_name));
|
assert(slot < Elements(gs_output_semantic_name));
|
||||||
assert(attr >= VARYING_SLOT_VAR0);
|
assert(attr >= VARYING_SLOT_VAR0);
|
||||||
gs_output_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
|
gs_output_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
|
||||||
gs_output_semantic_index[slot] = (VARYING_SLOT_VAR0 -
|
gs_output_semantic_index[slot] = st->needs_texcoord_semantic ?
|
||||||
VARYING_SLOT_TEX0 +
|
(attr - VARYING_SLOT_VAR0) : (attr - VARYING_SLOT_TEX0);
|
||||||
attr -
|
break;
|
||||||
VARYING_SLOT_VAR0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user