xf86-video-r128: Branch 'master'

Connor Behan cbehan at kemper.freedesktop.org
Wed Nov 27 17:12:16 PST 2013


 src/r128_exa_render.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 35dc7faf9f87332f51ff0a6aa866a56eb017a950
Author: Connor Behan <connor.behan at gmail.com>
Date:   Thu Nov 21 22:09:57 2013 -0800

    Do not disable gouraud shading for a render op
    
    The EXA Composite hooks should not overwrite any register values
    expected by DRI. Initial testing of the EXA support revealed that
    R128_WINDOW_XY_OFFSET is one register where we have to be careful.
    However, it was mostly tested using glxgears which does not stress the
    driver very much. Going through the various 3D screensavers one by one
    reveals a bug where certain models turn green if compositing is enabled.
    
    It seems that if we slightly alter the values passed to R128_SETUP_CNTL
    and R128_PM4_VC_FPU_SETUP, the 3D driver will be happy and compositing
    will still work. The proper way would be to constantly save and restore
    register values but this showed poor performance when dragging 3D
    windows across the screen.
    
    Signed-off-by: Connor Behan <connor.behan at gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/r128_exa_render.c b/src/r128_exa_render.c
index f00536e..cb9f929 100644
--- a/src/r128_exa_render.c
+++ b/src/r128_exa_render.c
@@ -350,7 +350,7 @@ do {							\
 		    R128_TEX_MAP_ALPHA_IN_TEXTURE |	\
 		    R128_TEX_CACHE_LINE_SIZE_4QW);	\
     OUT_RING_REG(R128_SETUP_CNTL,			\
-		    R128_COLOR_SOLID_COLOR |		\
+		    R128_COLOR_GOURAUD |		\
 		    R128_PRIM_TYPE_TRI |		\
 		    R128_TEXTURE_ST_MULT_W |		\
 		    R128_STARTING_VERTEX_1 |		\
@@ -358,9 +358,9 @@ do {							\
 		    R128_SUB_PIX_4BITS);		\
     OUT_RING_REG(R128_PM4_VC_FPU_SETUP,			\
 		    R128_FRONT_DIR_CCW |		\
-		    R128_BACKFACE_CULL |		\
+		    R128_BACKFACE_SOLID |		\
 		    R128_FRONTFACE_SOLID |		\
-		    R128_FPU_COLOR_SOLID |		\
+		    R128_FPU_COLOR_GOURAUD |		\
 		    R128_FPU_SUB_PIX_4BITS |		\
 		    R128_FPU_MODE_3D |			\
 		    R128_TRAP_BITS_DISABLE |		\


More information about the xorg-commit mailing list