radeonsi: set CB_COLORn_INFO.ROUND_MODE
authorMarek Olšák <marek.olsak@amd.com>
Tue, 9 Aug 2016 10:58:25 +0000 (12:58 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 10 Aug 2016 13:43:36 +0000 (15:43 +0200)
just do what the register spec says

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/gallium/drivers/radeonsi/si_state.c

index ebd2b7d571149ab74ce6956c41cc9512216a8ddc..94dbe4c15b9f60d817a31243c0e01fceb71ded4b 100644 (file)
@@ -2067,6 +2067,11 @@ static void si_initialize_color_surface(struct si_context *sctx,
                S_028C70_BLEND_CLAMP(blend_clamp) |
                S_028C70_BLEND_BYPASS(blend_bypass) |
                S_028C70_SIMPLE_FLOAT(1) |
+               S_028C70_ROUND_MODE(ntype != V_028C70_NUMBER_UNORM &&
+                                   ntype != V_028C70_NUMBER_SNORM &&
+                                   ntype != V_028C70_NUMBER_SRGB &&
+                                   format != V_028C70_COLOR_8_24 &&
+                                   format != V_028C70_COLOR_24_8) |
                S_028C70_NUMBER_TYPE(ntype) |
                S_028C70_ENDIAN(endian);