mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-04 06:00:31 +01:00
panfrost: Fix fixed-function blend on bifrost
The conversion from a 32b float to a 16b fixed-point number was wrong.
Fixes: 8389976b7c ("panfrost: XML-ify the blend descriptors")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
This commit is contained in:
parent
442f48f27b
commit
d8326ceafb
1 changed files with 1 additions and 1 deletions
|
|
@ -311,7 +311,7 @@ panfrost_emit_bifrost_blend(struct panfrost_batch *batch,
|
|||
cfg.bifrost.equation = blend[i].equation.equation;
|
||||
|
||||
/* Fixed point constant */
|
||||
u16 constant = blend[i].equation.constant / ((1 << chan_size) - 1);
|
||||
u16 constant = blend[i].equation.constant * ((1 << chan_size) - 1);
|
||||
constant <<= 16 - chan_size;
|
||||
cfg.bifrost.constant = constant;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue