mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
pan/bit: _MSCALE interp
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
This commit is contained in:
parent
1e3960a725
commit
b7dd5b579d
1 changed files with 11 additions and 0 deletions
|
|
@ -548,6 +548,17 @@ bit_step(struct bit_state *s, bi_instruction *ins, bool FMA)
|
|||
unreachable("Unsupported op");
|
||||
}
|
||||
|
||||
/* Apply _MSCALE */
|
||||
if ((ins->type == BI_FMA || ins->type == BI_ADD) && ins->op.mscale) {
|
||||
unsigned idx = (ins->type == BI_FMA) ? 3 : 2;
|
||||
|
||||
assert(ins->src_types[idx] == nir_type_int32);
|
||||
assert(ins->dest_type == nir_type_float32);
|
||||
|
||||
int32_t scale = srcs[idx].i32;
|
||||
dest.f32 *= exp2f(scale);
|
||||
}
|
||||
|
||||
/* Apply outmod */
|
||||
if (bi_has_outmod(ins) && ins->outmod != BIFROST_NONE) {
|
||||
if (ins->dest_type == nir_type_float16) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue