[PATCH] Do not disable gouraud shading for a render op

Alex Deucher alexdeucher at gmail.com
Tue Nov 26 05:59:57 PST 2013


On Fri, Nov 22, 2013 at 3:25 PM, Connor Behan <connor.behan at gmail.com> wrote:
> 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.

You could always just reset the value after each draw command as part
of the command stream.  That said, if the options don't affect the
drawing for EXA, it should be fine.

Alex

>
> 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
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list