diff options
author | Luca Barbieri <[email protected]> | 2010-08-19 01:44:02 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-08-20 12:04:08 +0200 |
commit | 96a82cc314667542b7e046311595f58b01704205 (patch) | |
tree | 013bac8771af57cea91832887ee26bb1c47a0aff /src/gallium/winsys/sw/wrapper | |
parent | d34f6e9db15a1fa3a7e3b68e47ac4eef2706b8cd (diff) |
winsys/sw: use PIPE_TEXTURE_RECT if appropriate
Diffstat (limited to 'src/gallium/winsys/sw/wrapper')
-rw-r--r-- | src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c index b997abda9b0..3a76098b655 100644 --- a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c +++ b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c @@ -52,6 +52,7 @@ struct wrapper_sw_winsys struct sw_winsys base; struct pipe_screen *screen; struct pipe_context *pipe; + enum pipe_texture_target target; }; struct wrapper_sw_displaytarget @@ -145,7 +146,7 @@ wsw_dt_create(struct sw_winsys *ws, * 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; @@ -291,6 +292,11 @@ wrapper_sw_winsys_warp_pipe_screen(struct pipe_screen *screen) 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: |