projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '7.8'
[mesa.git]
/
src
/
mesa
/
state_tracker
/
st_cb_blit.c
diff --git
a/src/mesa/state_tracker/st_cb_blit.c
b/src/mesa/state_tracker/st_cb_blit.c
index 5626e25323e89d0ace01e80eda92e328687374ae..06b0a18fd221786ec202dd3da9f0711ee013c314 100644
(file)
--- a/
src/mesa/state_tracker/st_cb_blit.c
+++ b/
src/mesa/state_tracker/st_cb_blit.c
@@
-33,20
+33,15
@@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
-#include "main/texformat.h"
#include "shader/program.h"
#include "shader/program.h"
-#include "shader/prog_parameter.h"
-#include "shader/prog_print.h"
#include "st_context.h"
#include "st_texture.h"
#include "st_context.h"
#include "st_texture.h"
-#include "st_program.h"
#include "st_cb_blit.h"
#include "st_cb_fbo.h"
#include "util/u_blit.h"
#include "st_cb_blit.h"
#include "st_cb_fbo.h"
#include "util/u_blit.h"
-
-#include "cso_cache/cso_context.h"
+#include "util/u_inlines.h"
void
void
@@
-64,6
+59,7
@@
st_destroy_blit(struct st_context *st)
}
}
+#if FEATURE_EXT_framebuffer_blit
static void
st_BlitFramebuffer(GLcontext *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
static void
st_BlitFramebuffer(GLcontext *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
@@
-73,6
+69,7
@@
st_BlitFramebuffer(GLcontext *ctx,
const GLbitfield depthStencil = (GL_DEPTH_BUFFER_BIT |
GL_STENCIL_BUFFER_BIT);
struct st_context *st = ctx->st;
const GLbitfield depthStencil = (GL_DEPTH_BUFFER_BIT |
GL_STENCIL_BUFFER_BIT);
struct st_context *st = ctx->st;
+ struct pipe_context *pipe = st->pipe;
const uint pFilter = ((filter == GL_NEAREST)
? PIPE_TEX_MIPFILTER_NEAREST
: PIPE_TEX_MIPFILTER_LINEAR);
const uint pFilter = ((filter == GL_NEAREST)
? PIPE_TEX_MIPFILTER_NEAREST
: PIPE_TEX_MIPFILTER_LINEAR);
@@
-115,8
+112,8
@@
st_BlitFramebuffer(GLcontext *ctx,
&readFB->Attachment[readFB->_ColorReadBufferIndex];
if(srcAtt->Type == GL_TEXTURE) {
&readFB->Attachment[readFB->_ColorReadBufferIndex];
if(srcAtt->Type == GL_TEXTURE) {
- struct pipe_screen *screen =
ctx->st->
pipe->screen;
-
const
struct st_texture_object *srcObj =
+ struct pipe_screen *screen = pipe->screen;
+ struct st_texture_object *srcObj =
st_texture_object(srcAtt->Texture);
struct st_renderbuffer *dstRb =
st_renderbuffer(drawFB->_ColorDrawBuffers[0]);
st_texture_object(srcAtt->Texture);
struct st_renderbuffer *dstRb =
st_renderbuffer(drawFB->_ColorDrawBuffers[0]);
@@
-136,7
+133,8
@@
st_BlitFramebuffer(GLcontext *ctx,
return;
util_blit_pixels(st->blit,
return;
util_blit_pixels(st->blit,
- srcSurf, srcX0, srcY0, srcX1, srcY1,
+ srcSurf, st_get_stobj_sampler_view(srcObj),
+ srcX0, srcY0, srcX1, srcY1,
dstSurf, dstX0, dstY0, dstX1, dstY1,
0.0, pFilter);
dstSurf, dstX0, dstY0, dstX1, dstY1,
0.0, pFilter);
@@
-148,10
+146,11
@@
st_BlitFramebuffer(GLcontext *ctx,
struct st_renderbuffer *dstRb =
st_renderbuffer(drawFB->_ColorDrawBuffers[0]);
struct pipe_surface *srcSurf = srcRb->surface;
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_surface *dstSurf = dstRb->surface;
util_blit_pixels(st->blit,
struct pipe_surface *dstSurf = dstRb->surface;
util_blit_pixels(st->blit,
- srcSurf, srcX0, srcY0, srcX1, srcY1,
+ srcSurf, src
View, src
X0, srcY0, srcX1, srcY1,
dstSurf, dstX0, dstY0, dstX1, dstY1,
0.0, pFilter);
}
dstSurf, dstX0, dstY0, dstX1, dstY1,
0.0, pFilter);
}
@@
-183,11
+182,13
@@
st_BlitFramebuffer(GLcontext *ctx,
if ((mask & depthStencil) == depthStencil &&
srcDepthSurf == srcStencilSurf &&
dstDepthSurf == dstStencilSurf) {
if ((mask & depthStencil) == depthStencil &&
srcDepthSurf == srcStencilSurf &&
dstDepthSurf == dstStencilSurf) {
+ struct pipe_sampler_view *srcView = st_renderbuffer_get_sampler_view(srcDepthRb, pipe);
+
/* Blitting depth and stencil values between combined
* depth/stencil buffers. This is the ideal case for such buffers.
*/
util_blit_pixels(st->blit,
/* Blitting depth and stencil values between combined
* depth/stencil buffers. This is the ideal case for such buffers.
*/
util_blit_pixels(st->blit,
- srcDepthSurf, srcX0, srcY0, srcX1, srcY1,
+ srcDepthSurf, src
View, src
X0, srcY0, srcX1, srcY1,
dstDepthSurf, dstX0, dstY0, dstX1, dstY1,
0.0, pFilter);
}
dstDepthSurf, dstX0, dstY0, dstX1, dstY1,
0.0, pFilter);
}
@@
-206,6
+207,7
@@
st_BlitFramebuffer(GLcontext *ctx,
}
}
}
}
}
}
+#endif /* FEATURE_EXT_framebuffer_blit */