aco: fix adjust_vertex_fetch_alpha

These offsets were wrong and didn't match the old behaviour.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: e8220e106b ("aco: optimize AC_FETCH_FORMAT_SNORM alpha adjust")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8935>
This commit is contained in:
Rhys Perry 2021-02-09 21:33:43 +00:00
parent 19711b0f44
commit f7575fa71f

View file

@ -4854,7 +4854,7 @@ Temp adjust_vertex_fetch_alpha(isel_context *ctx, unsigned adjustment, Temp alph
* and happen to contain 0, 1, 2, 3 as the two LSBs of the
* exponent.
*/
unsigned offset = adjustment == AC_FETCH_FORMAT_SNORM ? 7u : 30u;
unsigned offset = adjustment == AC_FETCH_FORMAT_SNORM ? 23u : 0u;
alpha = bld.vop3(aco_opcode::v_bfe_i32, bld.def(v1), alpha, Operand(offset), Operand(2u));
/* Convert back to the right type. */