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;
/* 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;
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);