struct sw_winsys base;
struct pipe_screen *screen;
struct pipe_context *pipe;
+ enum pipe_texture_target target;
};
struct wrapper_sw_displaytarget
* XXX Why don't we just get the template.
*/
memset(&templ, 0, sizeof(templ));
- templ.target = PIPE_TEXTURE_2D;
+ templ.target = wsw->target;
templ.width0 = width;
templ.height0 = height;
templ.format = format;
if (!wsw->pipe)
goto err_free;
+ if(screen->get_param(screen, PIPE_CAP_NPOT_TEXTURES))
+ wsw->target = PIPE_TEXTURE_2D;
+ else
+ wsw->target = PIPE_TEXTURE_RECT;
+
return &wsw->base;
err_free: