mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-22 09:40:40 +02:00
pan/bi: Add support for writing gl_PrimitiveID from IDVS
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Olivia Lee <olivia.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38504>
This commit is contained in:
parent
5700c87db6
commit
652a5f41bf
2 changed files with 7 additions and 1 deletions
|
|
@ -1205,6 +1205,7 @@ va_shader_output_from_semantics(const nir_io_semantics *sem)
|
|||
return VA_SHADER_OUTPUT_POSITION;
|
||||
case VARYING_SLOT_PSIZ:
|
||||
case VARYING_SLOT_LAYER:
|
||||
case VARYING_SLOT_PRIMITIVE_ID:
|
||||
return VA_SHADER_OUTPUT_ATTRIB;
|
||||
default:
|
||||
return VA_SHADER_OUTPUT_VARY;
|
||||
|
|
@ -1399,6 +1400,11 @@ bi_emit_store_vary(bi_builder *b, nir_intrinsic_instr *instr)
|
|||
if (sem.location == VARYING_SLOT_PSIZ)
|
||||
assert(T_size == 16 && "should've been lowered");
|
||||
|
||||
if (sem.location == VARYING_SLOT_PRIMITIVE_ID) {
|
||||
assert(nr == 1 && src_bit_sz == 32);
|
||||
pos_attr_offset = 12;
|
||||
}
|
||||
|
||||
bool varying = (output_type == VA_SHADER_OUTPUT_VARY);
|
||||
|
||||
if (instr->intrinsic == nir_intrinsic_store_per_view_output) {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ void bifrost_compile_shader_nir(nir_shader *nir,
|
|||
struct pan_shader_info *info);
|
||||
|
||||
#define VALHAL_EX_FIFO_VARYING_BITS \
|
||||
(VARYING_BIT_PSIZ | VARYING_BIT_LAYER)
|
||||
(VARYING_BIT_PSIZ | VARYING_BIT_LAYER | VARYING_BIT_PRIMITIVE_ID)
|
||||
|
||||
static inline bool
|
||||
valhal_writes_extended_fifo(uint64_t outputs_written,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue