Commit Graph

2 Commits

Author SHA1 Message Date
Mike Blumenkrantz 9ca0c0b4b4 mesa/st: increment num_uniforms for hw accel select shaders
this otherwise breaks nir_lower_uniforms_to_ubo() and probably lots
of drivers

Fixes: 9b22ab4167 ("mesa/st: implement hardware accelerated GL_SELECT")

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17092>
2022-06-18 20:18:18 +00:00
Qiang Yu 9b22ab4167 mesa/st: implement hardware accelerated GL_SELECT
Use an internal geometry shader to handle input primitives. Do full
accurate culling and clipping in the shader and output hit result and
min/max depth to a SSBO for final being written to select buffer.

With multiple result slots in SSBO we can left multiple draws on the
fly and wait them done when buffer is full or exit GL_SELECT mode.

This provides quicker selection response compared to software based
solution. Tested on Discovery Studio 2020: some complex model needs
1~2s selection response time originally, now it's almost selected
immidiately.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15765>
2022-06-06 18:23:49 +00:00