anv: stop tracking color blend state in the pipeline
authorIván Briano <ivan.briano@intel.com>
Thu, 23 Feb 2023 22:41:54 +0000 (14:41 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 24 Feb 2023 22:07:52 +0000 (22:07 +0000)
commitb71957635f1ef890cef954cf5b8493b7e62bf728
treeb562d29cb3fb6887d3f33a9c9d197d4d8cd16ac9
parentdd5c6446b4f7a4f8a969ec9d932242f7c6a703eb
anv: stop tracking color blend state in the pipeline

Now that all color blend bits are dynamic, emit_cb_state() is doing
almost nothing and half of that is wrong.

In the case that color write enable is dynamic, at the time the pipeline
state is emitted, it sees all the color attachments as having write
disabled and stores the WriteDisabled bit for each channel.
When all dynamic state is flushed, we have the right values already but
the values recorded into the command buffer get ORed with the ones
stored in the pipeline, and so WriteDisabled tag along when they
shouldn't.

Since all disabled color attachments are handled already when dynamic
state is flushed, there's no point in doing so at pipeline creation
time too. And since the only other thing done by emit_cb_state() is
writing three hardcoded values, they might as well be taken care of in
the same place as everything else.

Fixes CTS from the future:
dEQP-VK.pipeline.*.extended_dynamic_state.*.color_blend_equation_*dynamic*
dEQP-VK.pipeline.*.extended_dynamic_state.*.color_blend_all_*

Fixes: fc3fd7c69e8 (anv: dynamic color write mask)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21509>
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_pipeline.c
src/intel/vulkan/gfx8_cmd_buffer.c