mesa/st: use PIPE_TEXTURE_RECT for GL_TEXTURE_RECTANGLE
authorLuca Barbieri <luca@luca-barbieri.com>
Thu, 15 Apr 2010 07:04:20 +0000 (09:04 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Fri, 20 Aug 2010 10:04:09 +0000 (12:04 +0200)
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_texture.c

index 4c3e3688dd89720e80373c0db6212c03f5dfc137..a41c780d6e698fd13ee4f9fba08f5d98e834d57a 100644 (file)
@@ -74,9 +74,11 @@ gl_target_to_pipe(GLenum target)
       return PIPE_TEXTURE_1D;
 
    case GL_TEXTURE_2D:
-   case GL_TEXTURE_RECTANGLE_NV:
       return PIPE_TEXTURE_2D;
 
+   case GL_TEXTURE_RECTANGLE_NV:
+      return PIPE_TEXTURE_RECT;
+
    case GL_TEXTURE_3D:
       return PIPE_TEXTURE_3D;
 
@@ -449,7 +451,7 @@ compress_with_blit(GLcontext * ctx,
    /* Create the temporary source texture
     */
    memset(&templ, 0, sizeof(templ));
-   templ.target = PIPE_TEXTURE_2D;
+   templ.target = st->internal_target;
    templ.format = st_mesa_format_to_pipe_format(mesa_format);
    templ.width0 = width;
    templ.height0 = height;
index add6e949dfb68facd7e3c90f8fd1c8ffd9c5d1eb..c6cf2ba061b4cceb11d159b1834e033e3e7fa457 100644 (file)
@@ -64,7 +64,7 @@ st_texture_create(struct st_context *st,
    struct pipe_resource pt, *newtex;
    struct pipe_screen *screen = st->pipe->screen;
 
-   assert(target <= PIPE_TEXTURE_CUBE);
+   assert(target < PIPE_MAX_TEXTURE_TYPES);
    assert(width0 > 0);
    assert(height0 > 0);
    assert(depth0 > 0);