summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-08-27 19:35:25 -0400
committerMarek Olšák <[email protected]>2019-09-09 23:43:03 -0400
commit5ac69082631d4179c268aa3decf6267f697332a4 (patch)
tree46668b10069483f5473591d4114ec791a859427d /src/gallium/drivers/r300/r300_texture.c
parentd95afd8b9e7f9b3880813203292257bf0ed7babf (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/r300/r300_texture.c')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 689341644fd..737a4f90418 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -36,6 +36,7 @@
#include "util/u_memory.h"
#include "pipe/p_screen.h"
+#include "state_tracker/winsys_handle.h"
/* These formats are supported by swapping their bytes.
* The swizzles must be set exactly like their non-swapped counterparts,
@@ -1179,7 +1180,6 @@ struct pipe_resource *r300_texture_from_handle(struct pipe_screen *screen,
struct r300_screen *rscreen = r300_screen(screen);
struct radeon_winsys *rws = rscreen->rws;
struct pb_buffer *buffer;
- unsigned stride;
struct radeon_bo_metadata tiling = {};
/* Support only 2D textures without mipmaps */
@@ -1190,7 +1190,7 @@ struct pipe_resource *r300_texture_from_handle(struct pipe_screen *screen,
return NULL;
}
- buffer = rws->buffer_from_handle(rws, whandle, 0, &stride, NULL);
+ buffer = rws->buffer_from_handle(rws, whandle, 0);
if (!buffer)
return NULL;
@@ -1212,7 +1212,7 @@ struct pipe_resource *r300_texture_from_handle(struct pipe_screen *screen,
return (struct pipe_resource*)
r300_texture_create_object(rscreen, base, tiling.u.legacy.microtile, tiling.u.legacy.macrotile,
- stride, buffer);
+ whandle->stride, buffer);
}
/* Not required to implement u_resource_vtbl, consider moving to another file: