panfrost: Let compile_blend_shader() allocate the blend shader object
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 8 Oct 2020 08:52:30 +0000 (10:52 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 9 Oct 2020 14:16:41 +0000 (14:16 +0000)
commitc9739941ba44337625591d643cf558b9a2b961fc
treec35ce870ef34bdbbfd0601fa57bab51168f4a289
parentdbc33e8854e1c700a2c352322d8ee1d62c95fbec
panfrost: Let compile_blend_shader() allocate the blend shader object

This way we avoid an extra copy in panfrost_get_blend_shader().
Note that the allocation is attached to the blend state object
which simplifies the delete_blend_state() path.

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/7066>
src/gallium/drivers/panfrost/pan_blend_cso.c
src/gallium/drivers/panfrost/pan_blend_shaders.c
src/gallium/drivers/panfrost/pan_blend_shaders.h