summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_state_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_state_surface.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_state_surface.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state_surface.c b/src/mesa/pipe/softpipe/sp_state_surface.c
index d4e0bd1e15..30bedc74bc 100644
--- a/src/mesa/pipe/softpipe/sp_state_surface.c
+++ b/src/mesa/pipe/softpipe/sp_state_surface.c
@@ -27,6 +27,8 @@
/* Authors: Keith Whitwell <keith@tungstengraphics.com>
*/
+#include "p_inlines.h"
+
#include "sp_context.h"
#include "sp_state.h"
#include "sp_surface.h"
@@ -54,12 +56,12 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
sp_flush_tile_cache(sp, sp->cbuf_cache[i]);
/* unmap old */
ps = sp->framebuffer.cbufs[i];
- if (ps && ps->region)
- pipe->region_unmap(pipe, ps->region);
+ if (ps && ps->map)
+ pipe_surface_unmap(ps);
/* map new */
ps = fb->cbufs[i];
if (ps)
- pipe->region_map(pipe, ps->region);
+ pipe_surface_map(ps);
/* assign new */
sp->framebuffer.cbufs[i] = fb->cbufs[i];
@@ -76,8 +78,8 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
sp_flush_tile_cache(sp, sp->zbuf_cache);
/* unmap old */
ps = sp->framebuffer.zbuf;
- if (ps && ps->region)
- pipe->region_unmap(pipe, ps->region);
+ if (ps && ps->map)
+ pipe_surface_unmap(ps);
if (sp->framebuffer.sbuf == sp->framebuffer.zbuf) {
/* combined z/stencil */
sp->framebuffer.sbuf = NULL;
@@ -85,7 +87,7 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
/* map new */
ps = fb->zbuf;
if (ps)
- pipe->region_map(pipe, ps->region);
+ pipe_surface_map(ps);
/* assign new */
sp->framebuffer.zbuf = fb->zbuf;
@@ -101,12 +103,12 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
sp_flush_tile_cache(sp, sp->sbuf_cache_sep);
/* unmap old */
ps = sp->framebuffer.sbuf;
- if (ps && ps->region)
- pipe->region_unmap(pipe, ps->region);
+ if (ps && ps->map)
+ pipe_surface_unmap(ps);
/* map new */
ps = fb->sbuf;
if (ps && fb->sbuf != fb->zbuf)
- pipe->region_map(pipe, ps->region);
+ pipe_surface_map(ps);
/* assign new */
sp->framebuffer.sbuf = fb->sbuf;