case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
- case PIPE_CAP_TGSI_TEXCOORD:
return 0;
+ case PIPE_CAP_TGSI_TEXCOORD:
case PIPE_CAP_DRAW_INDIRECT:
return 1;
case LP_INTERP_LINEAR:
/* Sprite tex coords may use linear interpolation someday */
/* fall-through */
- case LP_INTERP_PERSPECTIVE:
+ case LP_INTERP_PERSPECTIVE: {
/* check if the sprite coord flag is set for this attribute.
* If so, set it up so it up so x and y vary from 0 to 1.
*/
- if (shader->info.base.input_semantic_name[slot] == TGSI_SEMANTIC_GENERIC) {
+ bool do_texcoord_coef = false;
+ if (shader->info.base.input_semantic_name[slot] == TGSI_SEMANTIC_PCOORD) {
+ do_texcoord_coef = true;
+ }
+ else if (shader->info.base.input_semantic_name[slot] == TGSI_SEMANTIC_TEXCOORD) {
unsigned semantic_index = shader->info.base.input_semantic_index[slot];
/* Note that sprite_coord enable is a bitfield of
* PIPE_MAX_SHADER_OUTPUTS bits.
*/
if (semantic_index < PIPE_MAX_SHADER_OUTPUTS &&
(setup->sprite_coord_enable & (1u << semantic_index))) {
- for (i = 0; i < NUM_CHANNELS; i++) {
- if (usage_mask & (1 << i)) {
- texcoord_coef(setup, info, slot + 1, i,
- setup->sprite_coord_origin,
- perspective);
- }
+ do_texcoord_coef = true;
+ }
+ }
+ if (do_texcoord_coef) {
+ for (i = 0; i < NUM_CHANNELS; i++) {
+ if (usage_mask & (1 << i)) {
+ texcoord_coef(setup, info, slot + 1, i,
+ setup->sprite_coord_origin,
+ perspective);
}
- break;
}
+ break;
}
+ }
/* fall-through */
case LP_INTERP_CONSTANT:
for (i = 0; i < NUM_CHANNELS; i++) {