nir: Generate load_ubo_vec4 directly for !PIPE_CAP_NATIVE_INTEGERS
The prog_to_nir->NIR-to-TGSI change ended up causing regressions on r300,
and svga against r300-class hardware, because nir_lower_uniforms_to_ubo()
introduced shifts that nir_lower_ubo_vec4() tried to reverse, but that NIR
couldn't prove are no-ops (since shifting up and back down may drop bits),
and the hardware can't do the integer ops.
Instead, make it so that nir_lower_uniforms_to_ubo can generate
nir_intrinsic_load_ubo_vec4 directly for !INTEGER hardware.
Fixes: cf3fc79cd0 ("st/mesa: Replace mesa_to_tgsi() with prog_to_nir() and nir_to_tgsi().")
Closes: #4602
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10194>
This commit is contained in:
@@ -481,7 +481,8 @@ The integer capabilities:
|
||||
those bits set, pipe_context::set_constant_buffer(.., 0, ..) is ignored
|
||||
by the driver, and the driver can throw assertion failures.
|
||||
* ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed uniforms
|
||||
as opposed to padding to vec4s.
|
||||
as opposed to padding to vec4s. Requires ``PIPE_SHADER_CAP_INTEGERS`` if
|
||||
``lower_uniforms_to_ubo`` is set.
|
||||
* ``PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES``: Whether the
|
||||
``PIPE_CONSERVATIVE_RASTER_POST_SNAP`` mode is supported for triangles.
|
||||
The post-snap mode means the conservative rasterization occurs after
|
||||
|
||||
Reference in New Issue
Block a user