mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 20:24:30 +08:00
asahi: Implement ARB_base_instance
Now that load_base_instance is wired up (as part of the indirect GS implementation), this is really easy. Validated with Piglit. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056>
This commit is contained in:
parent
643428bd7f
commit
ea6502d7cc
@ -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)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user