radv: use nir_op_imm helpers

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15854>
This commit is contained in:
Rhys Perry
2022-03-25 19:53:38 +00:00
committed by Marge Bot
parent df994ecc8f
commit b62e90ad43
15 changed files with 505 additions and 662 deletions

View File

@@ -3824,7 +3824,7 @@ radv_adjust_vertex_fetch_alpha(nir_builder *b,
*/
unsigned offset = alpha_adjust == ALPHA_ADJUST_SNORM ? 23u : 0u;
alpha = nir_ibfe(b, alpha, nir_imm_int(b, offset), nir_imm_int(b, 2u));
alpha = nir_ibfe_imm(b, alpha, offset, 2u);
/* Convert back to the right type. */
if (alpha_adjust == ALPHA_ADJUST_SNORM) {