r600g: fixup tex wrapping.
authorDave Airlie <airlied@redhat.com>
Fri, 24 Sep 2010 03:44:48 +0000 (13:44 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 24 Sep 2010 03:51:54 +0000 (13:51 +1000)
the clamp edge/clamp cases were reversed.

src/gallium/drivers/r600/eg_state_inlines.h
src/gallium/drivers/r600/r600_state_inlines.h

index 4723aee5a5e171cb63a6ebac00014efc72b7f474..251e64a67a0e32cb7bf2a5e8348fcda066801f43 100644 (file)
@@ -136,17 +136,17 @@ static inline unsigned r600_tex_wrap(unsigned wrap)
        case PIPE_TEX_WRAP_REPEAT:
                return V_03C000_SQ_TEX_WRAP;
        case PIPE_TEX_WRAP_CLAMP:
-               return V_03C000_SQ_TEX_CLAMP_LAST_TEXEL;
-       case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
                return V_03C000_SQ_TEX_CLAMP_HALF_BORDER;
+       case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+               return V_03C000_SQ_TEX_CLAMP_LAST_TEXEL;
        case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
                return V_03C000_SQ_TEX_CLAMP_BORDER;
        case PIPE_TEX_WRAP_MIRROR_REPEAT:
                return V_03C000_SQ_TEX_MIRROR;
        case PIPE_TEX_WRAP_MIRROR_CLAMP:
-               return V_03C000_SQ_TEX_MIRROR_ONCE_LAST_TEXEL;
-       case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
                return V_03C000_SQ_TEX_MIRROR_ONCE_HALF_BORDER;
+       case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
+               return V_03C000_SQ_TEX_MIRROR_ONCE_LAST_TEXEL;
        case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
                return V_03C000_SQ_TEX_MIRROR_ONCE_BORDER;
        }
index 663529faafbc6093cbc4b20876abbf72f6db475a..3be5248cd300112591c81a268b43b26e02257a56 100644 (file)
@@ -136,17 +136,17 @@ static inline unsigned r600_tex_wrap(unsigned wrap)
        case PIPE_TEX_WRAP_REPEAT:
                return V_03C000_SQ_TEX_WRAP;
        case PIPE_TEX_WRAP_CLAMP:
-               return V_03C000_SQ_TEX_CLAMP_LAST_TEXEL;
-       case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
                return V_03C000_SQ_TEX_CLAMP_HALF_BORDER;
+       case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+               return V_03C000_SQ_TEX_CLAMP_LAST_TEXEL;
        case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
                return V_03C000_SQ_TEX_CLAMP_BORDER;
        case PIPE_TEX_WRAP_MIRROR_REPEAT:
                return V_03C000_SQ_TEX_MIRROR;
        case PIPE_TEX_WRAP_MIRROR_CLAMP:
-               return V_03C000_SQ_TEX_MIRROR_ONCE_LAST_TEXEL;
-       case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
                return V_03C000_SQ_TEX_MIRROR_ONCE_HALF_BORDER;
+       case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
+               return V_03C000_SQ_TEX_MIRROR_ONCE_LAST_TEXEL;
        case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
                return V_03C000_SQ_TEX_MIRROR_ONCE_BORDER;
        }