mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
intel/compiler/elk: Replace the usage of ELK_VARYING_SLOT_PNTC with VARYING_SLOT_PNTC
When ELK_VARYING_SLOT_PNTC is introduce with name BRW_VERT_RESULT_PNTC at commit
43af02ac73
there is no VARYING_SLOT_PNTC, now we have VARYING_SLOT_PNTC, so take use of it.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
This commit is contained in:
parent
dd171d21dd
commit
b65f13a0f4
3 changed files with 4 additions and 12 deletions
|
|
@ -408,7 +408,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);
|
||||
|
|
@ -417,7 +417,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;
|
||||
|
|
@ -825,8 +825,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;
|
||||
|
|
|
|||
|
|
@ -1161,13 +1161,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;
|
||||
|
||||
|
|
|
|||
|
|
@ -291,7 +291,6 @@ varying_name(elk_varying_slot slot, gl_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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue