diff options
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/i965/xlib/xlib_i965.c | 26 | ||||
-rw-r--r-- | src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c | 14 |
2 files changed, 23 insertions, 17 deletions
diff --git a/src/gallium/winsys/i965/xlib/xlib_i965.c b/src/gallium/winsys/i965/xlib/xlib_i965.c index baadd6e89ca..c22df6643aa 100644 --- a/src/gallium/winsys/i965/xlib/xlib_i965.c +++ b/src/gallium/winsys/i965/xlib/xlib_i965.c @@ -42,6 +42,7 @@ #include "i965/brw_winsys.h" #include "i965/brw_screen.h" +#include "i965/brw_resource.h" #include "i965/brw_reg.h" #include "i965/brw_structs_dump.h" @@ -421,25 +422,28 @@ xlib_create_brw_winsys_screen( void ) static void xlib_i965_display_surface(struct xmesa_buffer *xm_buffer, - struct pipe_surface *surf) + struct pipe_resource *resource, + unsigned level, unsigned layer) { - struct brw_surface *surface = brw_surface(surf); - struct xlib_brw_buffer *bo = xlib_brw_buffer(surface->bo); - + struct brw_texture *tex = brw_texture(resource); + struct xlib_brw_buffer *bo = xlib_brw_buffer(tex->bo); + /* not sure if the resource is really useful here but + since it was never implemented anyway... */ if (BRW_DEBUG & DEBUG_WINSYS) - debug_printf("%s offset %x+%x sz %dx%d\n", __FUNCTION__, + debug_printf("%s level %u layer %u offset %x base sz %dx%d\n", __FUNCTION__, + level, layer, bo->offset, - surface->draw_offset, - surf->width, - surf->height); + resource->width0, + resource->height0); } static void xlib_i965_flush_frontbuffer(struct pipe_screen *screen, - struct pipe_surface *surf, - void *context_private) + struct pipe_resource *resource, + unsigned level, unsigned layer, + void *context_private) { - xlib_i965_display_surface(NULL, surf); + xlib_i965_display_surface(NULL, resource, level, layer); } diff --git a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c index bc2623e7b77..8f9a90858de 100644 --- a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c +++ b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c @@ -93,9 +93,9 @@ wsw_dt_get_stride(struct wrapper_sw_displaytarget *wdt, unsigned *stride) struct pipe_resource *tex = wdt->tex; struct pipe_transfer *tr; - tr = pipe_get_transfer(pipe, tex, 0, 0, 0, - PIPE_TRANSFER_READ_WRITE, - 0, 0, wdt->width, wdt->height); + tr = pipe_get_transfer(pipe, tex, 0, 0, + PIPE_TRANSFER_READ_WRITE, + 0, 0, wdt->width, wdt->height); if (!tr) return FALSE; @@ -149,6 +149,8 @@ wsw_dt_create(struct sw_winsys *ws, templ.target = wsw->target; templ.width0 = width; templ.height0 = height; + templ.depth0 = 1; + templ.array_size = 1; templ.format = format; templ.bind = bind; @@ -204,9 +206,9 @@ wsw_dt_map(struct sw_winsys *ws, assert(!wdt->transfer); - tr = pipe_get_transfer(pipe, tex, 0, 0, 0, - PIPE_TRANSFER_READ_WRITE, - 0, 0, wdt->width, wdt->height); + tr = pipe_get_transfer(pipe, tex, 0, 0, + PIPE_TRANSFER_READ_WRITE, + 0, 0, wdt->width, wdt->height); if (!tr) return NULL; |