diff --git a/docs/features.txt b/docs/features.txt index 6bd3dd8f980..17871d388d8 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -150,19 +150,19 @@ GL 4.1, GLSL 4.10 --- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, GL_ARB_viewport_array DONE (freedreno/a6xx, nv50, softpipe, crocus/gen6+) -GL 4.2, GLSL 4.20 -- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, virgl, zink, d3d12, iris, crocus/gen7+ +GL 4.2, GLSL 4.20 -- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, virgl, zink, d3d12, iris, crocus/gen7+, asahi GL_ARB_texture_compression_bptc DONE (all drivers that supports EXT_texture_sRGB and OES_texture_half_float) GL_ARB_compressed_texture_pixel_storage DONE (all drivers) - GL_ARB_shader_atomic_counters DONE (freedreno/a5xx+, softpipe, v3d, panfrost, asahi) + GL_ARB_shader_atomic_counters DONE (freedreno/a5xx+, softpipe, v3d, panfrost) GL_ARB_texture_storage DONE (all drivers) - GL_ARB_transform_feedback_instanced DONE (freedreno, nv50, softpipe, v3d, asahi, crocus/gen6+) + GL_ARB_transform_feedback_instanced DONE (freedreno, nv50, softpipe, v3d, crocus/gen6+) GL_ARB_base_instance DONE (freedreno, nv50, softpipe, v3d, crocus) - GL_ARB_shader_image_load_store DONE (freedreno/a5xx+, softpipe, panfrost, asahi) + GL_ARB_shader_image_load_store DONE (freedreno/a5xx+, softpipe, panfrost) GL_ARB_conservative_depth DONE (all drivers that support GLSL 1.30) GL_ARB_shading_language_420pack DONE (all drivers that support GLSL 1.30) GL_ARB_shading_language_packing DONE (all drivers) - GL_ARB_internalformat_query DONE (freedreno, nv50, softpipe, v3d, vc4, panfrost, lima, asahi, crocus) + GL_ARB_internalformat_query DONE (freedreno, nv50, softpipe, v3d, vc4, panfrost, lima, crocus) GL_ARB_map_buffer_alignment DONE (all drivers) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 59cadb88042..34143c3b1c3 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -8,3 +8,4 @@ GL_ARB_texture_cube_map_array on Asahi GL_ARB_clip_control on Asahi GL_ARB_timer_query on Asahi GL_EXT_disjoint_timer_query on Asahi +GL_ARB_base_instance on Asahi diff --git a/src/asahi/lib/agx_nir_lower_vbo.c b/src/asahi/lib/agx_nir_lower_vbo.c index 83c7f3bd7c2..c67437ca313 100644 --- a/src/asahi/lib/agx_nir_lower_vbo.c +++ b/src/asahi/lib/agx_nir_lower_vbo.c @@ -158,9 +158,13 @@ pass(struct nir_builder *b, nir_instr *instr, void *data) /* Calculate the element to fetch the vertex for. Divide the instance ID by * the divisor for per-instance data. Divisor=0 specifies per-vertex data. */ - nir_def *el = (attrib.divisor == 0) - ? nir_load_vertex_id(b) - : nir_udiv_imm(b, nir_load_instance_id(b), attrib.divisor); + nir_def *el; + if (attrib.divisor) { + el = nir_udiv_imm(b, nir_load_instance_id(b), attrib.divisor); + el = nir_iadd(b, el, nir_load_base_instance(b)); + } else { + el = nir_load_vertex_id(b); + } nir_def *base = nir_load_vbo_base_agx(b, nir_imm_int(b, attrib.buf)); diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index f88b9ad2955..814c00060e8 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -1625,6 +1625,7 @@ agx_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_COMPUTE: case PIPE_CAP_INT64: case PIPE_CAP_SAMPLE_SHADING: + case PIPE_CAP_START_INSTANCE: return 1; case PIPE_CAP_SURFACE_SAMPLE_COUNT: /* TODO: MSRTT */