Merge branch 'intel_VARYING_SLOT_PNTC' into 'main'

intel/compiler/elk: Replace the usage of ELK_VARYING_SLOT_PNTC with VARYING_SLOT_PNTC

See merge request mesa/mesa!29046
This commit is contained in:
Yonggang Luo 2026-05-08 08:11:06 +08:00
commit 80560b1946
3 changed files with 4 additions and 12 deletions

View file

@ -390,7 +390,7 @@ calculate_point_sprite_mask(struct elk_sf_compile *c, GLuint reg)
if (c->key.point_sprite_coord_replace & (1 << (varying1 - VARYING_SLOT_TEX0)))
pc |= 0x0f;
}
if (varying1 == ELK_VARYING_SLOT_PNTC)
if (varying1 == VARYING_SLOT_PNTC)
pc |= 0x0f;
varying2 = vert_reg_to_varying(c, reg, 1);
@ -399,7 +399,7 @@ calculate_point_sprite_mask(struct elk_sf_compile *c, GLuint reg)
VARYING_SLOT_TEX0)))
pc |= 0xf0;
}
if (varying2 == ELK_VARYING_SLOT_PNTC)
if (varying2 == VARYING_SLOT_PNTC)
pc |= 0xf0;
return pc;
@ -807,8 +807,8 @@ elk_compile_sf(const struct elk_compiler *compiler,
* it manually to let SF shader generate the needed interpolation
* coefficient for FS shader.
*/
c.vue_map.varying_to_slot[ELK_VARYING_SLOT_PNTC] = c.vue_map.num_slots;
c.vue_map.slot_to_varying[c.vue_map.num_slots++] = ELK_VARYING_SLOT_PNTC;
c.vue_map.varying_to_slot[VARYING_SLOT_PNTC] = c.vue_map.num_slots;
c.vue_map.slot_to_varying[c.vue_map.num_slots++] = VARYING_SLOT_PNTC;
}
c.urb_entry_read_offset = ELK_SF_URB_ENTRY_READ_OFFSET;
c.nr_attr_regs = (c.vue_map.num_slots + 1)/2 - c.urb_entry_read_offset;

View file

@ -1089,13 +1089,6 @@ typedef enum
{
ELK_VARYING_SLOT_NDC = VARYING_SLOT_MAX,
ELK_VARYING_SLOT_PAD,
/**
* Technically this is not a varying but just a placeholder that
* compile_sf_prog() inserts into its VUE map to cause the gl_PointCoord
* builtin variable to be compiled correctly. see compile_sf_prog() for
* more info.
*/
ELK_VARYING_SLOT_PNTC,
ELK_VARYING_SLOT_COUNT
} elk_varying_slot;

View file

@ -276,7 +276,6 @@ varying_name(elk_varying_slot slot, mesa_shader_stage stage)
static const char *elk_names[] = {
[ELK_VARYING_SLOT_NDC - VARYING_SLOT_MAX] = "ELK_VARYING_SLOT_NDC",
[ELK_VARYING_SLOT_PAD - VARYING_SLOT_MAX] = "ELK_VARYING_SLOT_PAD",
[ELK_VARYING_SLOT_PNTC - VARYING_SLOT_MAX] = "ELK_VARYING_SLOT_PNTC",
};
return elk_names[slot - VARYING_SLOT_MAX];