mesa: more transform feedback infrastructure
[mesa.git] / src / mesa / state_tracker / st_cb_blit.c
index 06b0a18fd221786ec202dd3da9f0711ee013c314..1c8dc0c07fb1b19c4cb75edacb0483d83167bdae 100644 (file)
@@ -68,7 +68,7 @@ st_BlitFramebuffer(GLcontext *ctx,
 {
    const GLbitfield depthStencil = (GL_DEPTH_BUFFER_BIT |
                                     GL_STENCIL_BUFFER_BIT);
-   struct st_context *st = ctx->st;
+   struct st_context *st = st_context(ctx);
    struct pipe_context *pipe = st->pipe;
    const uint pFilter = ((filter == GL_NEAREST)
                          ? PIPE_TEX_MIPFILTER_NEAREST
@@ -128,12 +128,12 @@ st_BlitFramebuffer(GLcontext *ctx,
                                            srcAtt->CubeMapFace,
                                            srcAtt->TextureLevel,
                                            srcAtt->Zoffset,
-                                           PIPE_BUFFER_USAGE_GPU_READ);
+                                           PIPE_BIND_BLIT_SOURCE);
          if(!srcSurf)
             return;
 
          util_blit_pixels(st->blit,
-                          srcSurf, st_get_stobj_sampler_view(srcObj),
+                          srcSurf, st_get_texture_sampler_view(srcObj, pipe),
                           srcX0, srcY0, srcX1, srcY1,
                           dstSurf, dstX0, dstY0, dstX1, dstY1,
                           0.0, pFilter);
@@ -146,7 +146,7 @@ st_BlitFramebuffer(GLcontext *ctx,
          struct st_renderbuffer *dstRb =
             st_renderbuffer(drawFB->_ColorDrawBuffers[0]);
          struct pipe_surface *srcSurf = srcRb->surface;
-         struct pipe_sampler_view *srcView = st_renderbuffer_get_sampler_view(srcRb, pipe);
+         struct pipe_sampler_view *srcView = st_get_renderbuffer_sampler_view(srcRb, pipe);
          struct pipe_surface *dstSurf = dstRb->surface;
 
          util_blit_pixels(st->blit,
@@ -182,7 +182,7 @@ st_BlitFramebuffer(GLcontext *ctx,
       if ((mask & depthStencil) == depthStencil &&
           srcDepthSurf == srcStencilSurf &&
           dstDepthSurf == dstStencilSurf) {
-         struct pipe_sampler_view *srcView = st_renderbuffer_get_sampler_view(srcDepthRb, pipe);
+         struct pipe_sampler_view *srcView = st_get_renderbuffer_sampler_view(srcDepthRb, pipe);
 
          /* Blitting depth and stencil values between combined
           * depth/stencil buffers.  This is the ideal case for such buffers.