mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
pan/mdg: Lower away gl_VertexID offset
Technically we can stick the offset in the vertex ID attribute record, but this is a faster way to get the test passing and Midgard perf? what's that? Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
This commit is contained in:
parent
26baad41f1
commit
68846ba4a8
3 changed files with 4 additions and 3 deletions
|
|
@ -193,7 +193,7 @@ pan_shader_compile(const struct panfrost_device *dev,
|
|||
info->attribute_count = util_bitcount64(s->info.inputs_read);
|
||||
|
||||
bool vertex_id = BITSET_TEST(s->info.system_values_read,
|
||||
SYSTEM_VALUE_VERTEX_ID);
|
||||
SYSTEM_VALUE_VERTEX_ID_ZERO_BASE);
|
||||
if (vertex_id && !pan_is_bifrost(dev))
|
||||
info->attribute_count = MAX2(info->attribute_count, PAN_VERTEX_ID + 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -1602,7 +1602,7 @@ static unsigned
|
|||
vertex_builtin_arg(nir_intrinsic_op op)
|
||||
{
|
||||
switch (op) {
|
||||
case nir_intrinsic_load_vertex_id:
|
||||
case nir_intrinsic_load_vertex_id_zero_base:
|
||||
return PAN_VERTEX_ID;
|
||||
case nir_intrinsic_load_instance_id:
|
||||
return PAN_INSTANCE_ID;
|
||||
|
|
@ -2049,7 +2049,7 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
|
|||
emit_compute_builtin(ctx, instr);
|
||||
break;
|
||||
|
||||
case nir_intrinsic_load_vertex_id:
|
||||
case nir_intrinsic_load_vertex_id_zero_base:
|
||||
case nir_intrinsic_load_instance_id:
|
||||
emit_vertex_builtin(ctx, instr);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ static const nir_shader_compiler_options midgard_nir_options = {
|
|||
.vectorize_io = true,
|
||||
.use_interpolated_input_intrinsics = true,
|
||||
|
||||
.vertex_id_zero_based = true,
|
||||
.has_cs_global_id = true,
|
||||
.lower_cs_local_index_from_id = true,
|
||||
.max_unroll_iterations = 32,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue