From f317f72f7310cbe741d82970fd335cb8c83300eb Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 4 Nov 2017 13:49:45 -0400 Subject: [PATCH] r600g: use SIMPLE_FLOAT for blending to enable some optimizations MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Radeonsi also sets this flag. Seems to avoid pulling up the desintation RT value when the dst blend factor is zero if it's not otherwise being loaded. Among other things, it allows blending to overwrite infinity/NaN values in the destination RT. Signed-off-by: Ilia Mirkin Reviewed-by: Roland Scheidegger Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/r600/evergreen_state.c | 1 + src/gallium/drivers/r600/r600_state.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 96eb35a9818..131778dea9f 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1211,6 +1211,7 @@ static void evergreen_set_color_surface_common(struct r600_context *rctx, S_028C70_COMP_SWAP(swap) | S_028C70_BLEND_CLAMP(blend_clamp) | S_028C70_BLEND_BYPASS(blend_bypass) | + S_028C70_SIMPLE_FLOAT(1) | S_028C70_NUMBER_TYPE(ntype) | S_028C70_ENDIAN(endian); diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index c21e8dabb1f..0c331537460 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -898,6 +898,7 @@ static void r600_init_color_surface(struct r600_context *rctx, S_0280A0_COMP_SWAP(swap) | S_0280A0_BLEND_BYPASS(blend_bypass) | S_0280A0_BLEND_CLAMP(blend_clamp) | + S_0280A0_SIMPLE_FLOAT(1) | S_0280A0_NUMBER_TYPE(ntype) | S_0280A0_ENDIAN(endian); -- 2.30.2