diff options
author | Marek Olšák <[email protected]> | 2019-08-27 19:35:25 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-09-09 23:43:03 -0400 |
commit | 5ac69082631d4179c268aa3decf6267f697332a4 (patch) | |
tree | 46668b10069483f5473591d4114ec791a859427d /src/gallium/drivers/r600/r600_texture.c | |
parent | d95afd8b9e7f9b3880813203292257bf0ed7babf (diff) |
r300,r600,radeonsi: read winsys_handle::stride,offset in drivers, not winsyses
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index ddee3d9b833..03f217b988a 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -33,6 +33,7 @@ #include "util/u_pack_color.h" #include "util/u_surface.h" #include "util/os_time.h" +#include "state_tracker/winsys_handle.h" #include <errno.h> #include <inttypes.h> @@ -1115,7 +1116,6 @@ static struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen { struct r600_common_screen *rscreen = (struct r600_common_screen*)screen; struct pb_buffer *buf = NULL; - unsigned stride = 0, offset = 0; enum radeon_surf_mode array_mode; struct radeon_surf surface = {}; int r; @@ -1129,8 +1129,7 @@ static struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen return NULL; buf = rscreen->ws->buffer_from_handle(rscreen->ws, whandle, - rscreen->info.max_alignment, - &stride, &offset); + rscreen->info.max_alignment); if (!buf) return NULL; @@ -1138,8 +1137,9 @@ static struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen r600_surface_import_metadata(rscreen, &surface, &metadata, &array_mode, &is_scanout); - r = r600_init_surface(rscreen, &surface, templ, array_mode, stride, - offset, true, is_scanout, false); + r = r600_init_surface(rscreen, &surface, templ, array_mode, + whandle->stride, whandle->offset, + true, is_scanout, false); if (r) { return NULL; } @@ -1865,14 +1865,12 @@ r600_memobj_from_handle(struct pipe_screen *screen, struct r600_common_screen *rscreen = (struct r600_common_screen*)screen; struct r600_memory_object *memobj = CALLOC_STRUCT(r600_memory_object); struct pb_buffer *buf = NULL; - uint32_t stride, offset; if (!memobj) return NULL; buf = rscreen->ws->buffer_from_handle(rscreen->ws, whandle, - rscreen->info.max_alignment, - &stride, &offset); + rscreen->info.max_alignment); if (!buf) { free(memobj); return NULL; @@ -1880,8 +1878,8 @@ r600_memobj_from_handle(struct pipe_screen *screen, memobj->b.dedicated = dedicated; memobj->buf = buf; - memobj->stride = stride; - memobj->offset = offset; + memobj->stride = whandle->stride; + memobj->offset = whandle->offset; return (struct pipe_memory_object *)memobj; |