summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_surface.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-01-23 15:27:00 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-01-23 15:27:00 +1100
commit9043323f1437f9c6791845b3ddbb9af912b45110 (patch)
treed9620f127c0789c8f7b2cbf91e6a035884f6612a /src/mesa/pipe/softpipe/sp_surface.c
parent4481c6c0b3e90450b20f1e7b4a0edc3ce346a4bb (diff)
parent286380020b146d600ac86d519ddfbf765a5965b2 (diff)
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_surface.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_surface.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/mesa/pipe/softpipe/sp_surface.c b/src/mesa/pipe/softpipe/sp_surface.c
index d5119654ed..e115705507 100644
--- a/src/mesa/pipe/softpipe/sp_surface.c
+++ b/src/mesa/pipe/softpipe/sp_surface.c
@@ -32,44 +32,6 @@
#include "pipe/util/p_tile.h"
#include "sp_context.h"
#include "sp_surface.h"
-#include "sp_texture.h"
-
-
-/**
- * Called via pipe->get_tex_surface()
- * XXX is this in the right place?
- */
-struct pipe_surface *
-softpipe_get_tex_surface(struct pipe_context *pipe,
- struct pipe_texture *pt,
- unsigned face, unsigned level, unsigned zslice)
-{
- struct softpipe_texture *spt = softpipe_texture(pt);
- struct pipe_surface *ps;
-
- ps = pipe->winsys->surface_alloc(pipe->winsys);
- if (ps) {
- assert(ps->refcount);
- assert(ps->winsys);
- pipe->winsys->buffer_reference(pipe->winsys, &ps->buffer, spt->buffer);
- ps->format = pt->format;
- ps->cpp = pt->cpp;
- ps->width = pt->width[level];
- ps->height = pt->height[level];
- ps->pitch = ps->width;
- ps->offset = spt->level_offset[level];
-
- if (pt->target == PIPE_TEXTURE_CUBE || pt->target == PIPE_TEXTURE_3D) {
- ps->offset += ((pt->target == PIPE_TEXTURE_CUBE) ? face : zslice) *
- (pt->compressed ? ps->height/4 : ps->height) *
- ps->width * ps->cpp;
- } else {
- assert(face == 0);
- assert(zslice == 0);
- }
- }
- return ps;
-}
/* Upload data to a rectangular sub-region. Lots of choices how to do this: