r600g: use SIMPLE_FLOAT for blending to enable some optimizations
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 4 Nov 2017 17:49:45 +0000 (13:49 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 9 Nov 2017 03:35:27 +0000 (22:35 -0500)
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 <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c

index 96eb35a9818955f3369ea81c7549d123dc58f9b2..131778dea9f99170eb4ff5b6524ea1c3a708f70b 100644 (file)
@@ -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);
 
index c21e8dabb1fd3f123059a08454ad5f202de4bba6..0c3315374607e8fb066e1606ee47a94070c0afea 100644 (file)
@@ -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);