Skip to content

nir: Generate load_ubo_vec4 directly for !PIPE_CAP_NATIVE_INTEGERS

Emma Anholt requested to merge anholt/mesa:nir-vec4-ubo-shifts into master

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: cf3fc79c ("st/mesa: Replace mesa_to_tgsi() with prog_to_nir() and nir_to_tgsi().") Closes: #4602 (closed)

Merge request reports

Loading