[PATCH] Do not disable gouraud shading for a render op
Connor Behan
connor.behan at gmail.com
Fri Nov 22 12:25:45 PST 2013
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>
---
src/r128_exa_render.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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 | \
--
1.8.4
More information about the xorg-driver-ati
mailing list