Closed PabloPL closed 6 years ago
This functionality looks working from begining (when those two functions were added), it was missing only special handling for blending disabled case. I've checked look of few images generated by mesa and compared them with result of the same code on intel gpu.
I've also compared values generated by lima_blend_func and lima_blend_factor with value generated by binary shader and they look exactly the same.
@yuq Did You found any cases where it wasn't working (and that's why it was disabled) ? Otherwise, PR for this task is in https://github.com/yuq/mesa-lima/pull/17
TODO: Looking at lima-ng sources alpha_blend could containt (at first byte) color mask. Need to check it (and fix either now or in next patch).
Yes, it doesn't work properly when blend disabled and there's something need to be investigated (comment in the code), so I disable it.
Confirmed - color mask value is also stored in alpha_blend field. Created separated PR for this https://github.com/yuq/mesa-lima/pull/18.
Is there anything else done with this issue or we can close it (i wasn't able to find any information about independ blend support on mali4xx :/).
I think no more for blend now. We can handle only zbuf case after we have depth & stencil support. Thanks for your work.
Findings about blending:
It looks like binary driver is generating the same alpha_blend value (in render_state) when:
Generated value (0xfc3b1ad2) is calculated from
Mesa is behaving little different:
Test showed that blend_color is independ from blend_enable, so we can allways set blend_color_bg/blend_color_ra.