Mesa (main): radeonsi: remove commutative_blend_add option
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 29 08:20:49 UTC 2022
Module: Mesa
Branch: main
Commit: c9a73f53e823793869bfaefa8f2688aa92cbfcb2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c9a73f53e823793869bfaefa8f2688aa92cbfcb2
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Wed Mar 16 10:36:38 2022 +0100
radeonsi: remove commutative_blend_add option
This is unused.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16139>
---
src/gallium/drivers/radeonsi/driinfo_radeonsi.h | 1 -
src/gallium/drivers/radeonsi/si_pipe.c | 3 ---
src/gallium/drivers/radeonsi/si_pipe.h | 1 -
src/gallium/drivers/radeonsi/si_state.c | 17 +++--------------
src/util/driconf.h | 4 ----
5 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/driinfo_radeonsi.h b/src/gallium/drivers/radeonsi/driinfo_radeonsi.h
index 3957f9288a2..20837675477 100644
--- a/src/gallium/drivers/radeonsi/driinfo_radeonsi.h
+++ b/src/gallium/drivers/radeonsi/driinfo_radeonsi.h
@@ -2,7 +2,6 @@
DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_ADAPTIVE_SYNC(true)
DRI_CONF_RADEONSI_ASSUME_NO_Z_FIGHTS(false)
-DRI_CONF_RADEONSI_COMMUTATIVE_BLEND_ADD(false)
DRI_CONF_RADEONSI_ZERO_ALL_VRAM_ALLOCS(false)
DRI_CONF_SECTION_END
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index a55fe2de5d1..0f8d5b74a84 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -1269,9 +1269,6 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws,
sscreen->info.has_out_of_order_rast && !(sscreen->debug_flags & DBG(NO_OUT_OF_ORDER));
sscreen->assume_no_z_fights = driQueryOptionb(config->options, "radeonsi_assume_no_z_fights") ||
driQueryOptionb(config->options, "allow_draw_out_of_order");
- sscreen->commutative_blend_add =
- driQueryOptionb(config->options, "radeonsi_commutative_blend_add") ||
- driQueryOptionb(config->options, "allow_draw_out_of_order");
sscreen->allow_draw_out_of_order = driQueryOptionb(config->options, "allow_draw_out_of_order");
sscreen->use_ngg = !(sscreen->debug_flags & DBG(NO_NGG)) &&
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 66779e1cba3..70599622533 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -567,7 +567,6 @@ struct si_screen {
bool has_draw_indirect_multi;
bool has_out_of_order_rast;
bool assume_no_z_fights;
- bool commutative_blend_add;
bool allow_draw_out_of_order;
bool dpbb_allowed;
bool use_ngg;
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 19fe6a8187d..dc2c82aaf8b 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -395,20 +395,9 @@ static void si_blend_check_commutativity(struct si_screen *sscreen, struct si_st
(1u << PIPE_BLENDFACTOR_INV_CONST_ALPHA) | (1u << PIPE_BLENDFACTOR_INV_SRC1_COLOR) |
(1u << PIPE_BLENDFACTOR_INV_SRC1_ALPHA);
- if (dst == PIPE_BLENDFACTOR_ONE && (src_allowed & (1u << src))) {
- /* Addition is commutative, but floating point addition isn't
- * associative: subtle changes can be introduced via different
- * rounding.
- *
- * Out-of-order is also non-deterministic, which means that
- * this breaks OpenGL invariance requirements. So only enable
- * out-of-order additive blending if explicitly allowed by a
- * setting.
- */
- if (func == PIPE_BLEND_MAX || func == PIPE_BLEND_MIN ||
- (func == PIPE_BLEND_ADD && sscreen->commutative_blend_add))
- blend->commutative_4bit |= chanmask;
- }
+ if (dst == PIPE_BLENDFACTOR_ONE && (src_allowed & (1u << src)) &&
+ (func == PIPE_BLEND_MAX || func == PIPE_BLEND_MIN))
+ blend->commutative_4bit |= chanmask;
}
/**
diff --git a/src/util/driconf.h b/src/util/driconf.h
index 8bfabce676a..c4eb8b33bd1 100644
--- a/src/util/driconf.h
+++ b/src/util/driconf.h
@@ -476,10 +476,6 @@
DRI_CONF_OPT_B(radeonsi_assume_no_z_fights, def, \
"Assume no Z fights (enables aggressive out-of-order rasterization to improve performance; may cause rendering errors)")
-#define DRI_CONF_RADEONSI_COMMUTATIVE_BLEND_ADD(def) \
- DRI_CONF_OPT_B(radeonsi_commutative_blend_add, def, \
- "Commutative additive blending optimizations (may cause rendering errors)")
-
#define DRI_CONF_RADEONSI_ZERO_ALL_VRAM_ALLOCS(def) \
DRI_CONF_OPT_B(radeonsi_zerovram, def, \
"Zero all vram allocations")
More information about the mesa-commit
mailing list