[Mesa-dev] [PATCH] radv: do not always disable dual quad mode when chip has RbPlus
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Wed Apr 4 09:08:48 UTC 2018
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Thu, Mar 29, 2018 at 2:51 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> For GFX9+ only, RadeonSI does this too.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_pipeline.c | 20 +++++++++++++++++---
> 1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
> index af1ea395d3..6797f768fe 100644
> --- a/src/amd/vulkan/radv_pipeline.c
> +++ b/src/amd/vulkan/radv_pipeline.c
> @@ -669,9 +669,23 @@ radv_pipeline_init_blend_state(struct radv_pipeline *pipeline,
> blend.sx_mrt_blend_opt[i] = S_028760_COLOR_COMB_FCN(V_028760_OPT_COMB_BLEND_DISABLED) | S_028760_ALPHA_COMB_FCN(V_028760_OPT_COMB_BLEND_DISABLED);
> }
>
> - /* disable RB+ for now */
> - if (pipeline->device->physical_device->has_rbplus)
> - blend.cb_color_control |= S_028808_DISABLE_DUAL_QUAD(1);
> + if (pipeline->device->physical_device->has_rbplus) {
> + /* Disable RB+ blend optimizations for dual source blending. */
> + if (blend_mrt0_is_dual_src) {
> + for (i = 0; i < 8; i++) {
> + blend.sx_mrt_blend_opt[i] =
> + S_028760_COLOR_COMB_FCN(V_028760_OPT_COMB_NONE) |
> + S_028760_ALPHA_COMB_FCN(V_028760_OPT_COMB_NONE);
> + }
> + }
> +
> + /* RB+ doesn't work with dual source blending, logic op and
> + * RESOLVE.
> + */
> + if (blend_mrt0_is_dual_src || vkblend->logicOpEnable ||
> + mode == V_028808_CB_RESOLVE)
> + blend.cb_color_control |= S_028808_DISABLE_DUAL_QUAD(1);
> + }
>
> if (blend.cb_target_mask)
> blend.cb_color_control |= S_028808_MODE(mode);
> --
> 2.16.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list