summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/st_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/python/st_device.h')
-rw-r--r--src/gallium/state_trackers/python/st_device.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/python/st_device.h b/src/gallium/state_trackers/python/st_device.h
index 2dca7a1974..53e2556cb0 100644
--- a/src/gallium/state_trackers/python/st_device.h
+++ b/src/gallium/state_trackers/python/st_device.h
@@ -41,9 +41,8 @@ struct st_winsys;
struct st_surface
{
struct pipe_resource *texture;
- unsigned face;
unsigned level;
- unsigned zslice;
+ unsigned layer;
};
@@ -83,11 +82,17 @@ struct st_device
static INLINE struct pipe_surface *
-st_pipe_surface(struct st_surface *surface, unsigned usage)
+st_pipe_surface(struct pipe_context *pipe, struct st_surface *surface, unsigned usage)
{
struct pipe_resource *texture = surface->texture;
- struct pipe_screen *screen = texture->screen;
- return screen->get_tex_surface(screen, texture, surface->face, surface->level, surface->zslice, usage);
+ struct pipe_surface surf_tmpl;
+ memset(&surf_tmpl, 0, sizeof(surf_tmpl));
+ surf_tmpl.format = texture->format;
+ surf_tmpl.usage = usage;
+ surf_tmpl.u.tex.level = surface->level;
+ surf_tmpl.u.tex.first_layer = surface->layer;
+ surf_tmpl.u.tex.last_layer = surface->layer;
+ return pipe->create_surface(pipe, texture, &surf_tmpl);
}
struct st_context *