panfrost: Dissociate shader meta patching from the desc emission
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 5 Mar 2020 10:02:56 +0000 (11:02 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 10 Mar 2020 11:47:33 +0000 (12:47 +0100)
commit5d33d42b4d42abc9fb8b212222ca5f6d17d94e7d
treea8300be535941067d16e282bb7080520dbc1d8bf
parent36725be4d952117f75c112db7eecbd3bc1f3139e
panfrost: Dissociate shader meta patching from the desc emission

Right now we emit two shader descriptors for the fragment shader, one
when panfrost_patch_shader_state() is called, and the final one
including both the shader_meta and the blend RT descriptors.
The first generated fragment shader descriptor is never used, since the
second one overrides the postfix.shader pointer.

Let's dissociate the state patching logic from the descriptor emission
so we don't upload descriptors that are never used.

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/4083>
src/gallium/drivers/panfrost/pan_cmdstream.c
src/gallium/drivers/panfrost/pan_cmdstream.h
src/gallium/drivers/panfrost/pan_context.c