<div dir="ltr"><div><div><div>Quick question: Did you search for ReadBuffer and DrawBuffer as you went to make sure you didn't miss any?<br><br></div>If the answer to the above is yes and the comment below is addressed,<br><br>Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br><br></div>This is going to help the PBO upload path a lot!<br></div>--Jason<br><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 30, 2015 at 4:25 PM, Laura Ekstrand <span dir="ltr"><<a href="mailto:laura@jlekstrand.net" target="_blank">laura@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In preparation for glBlitNamedFramebuffer, the DD table function<br>
BlitFramebuffer needs to accept two arbitrary framebuffer objects rather<br>
than assuming ctx->ReadBuffer and ctx->DrawBuffer.<br>
---<br>
src/mesa/drivers/common/meta.c | 3 +-<br>
src/mesa/drivers/common/meta.h | 4 +++<br>
src/mesa/drivers/common/meta_blit.c | 32 +++++++++++------<br>
src/mesa/drivers/common/meta_copy_image.c | 3 +-<br>
src/mesa/drivers/common/meta_tex_subimage.c | 12 ++++---<br>
src/mesa/drivers/dri/i915/intel_fbo.c | 14 ++++----<br>
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 15 ++++----<br>
src/mesa/drivers/dri/i965/brw_context.h | 4 +++<br>
src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c | 10 +++---<br>
src/mesa/drivers/dri/i965/brw_meta_util.c | 5 ++-<br>
src/mesa/drivers/dri/i965/brw_meta_util.h | 2 ++<br>
src/mesa/drivers/dri/i965/intel_fbo.c | 16 +++++----<br>
src/mesa/main/blit.c | 2 +-<br>
src/mesa/main/dd.h | 2 ++<br>
src/mesa/main/image.c | 14 ++++----<br>
src/mesa/main/image.h | 3 ++<br>
src/mesa/state_tracker/st_cb_blit.c | 6 ++--<br>
src/mesa/swrast/s_blit.c | 43 ++++++++++++-----------<br>
src/mesa/swrast/s_copypix.c | 25 ++++++-------<br>
src/mesa/swrast/swrast.h | 18 ++++++----<br>
20 files changed, 140 insertions(+), 93 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c<br>
index 8b73cb9..bb00730 100644<br>
--- a/src/mesa/drivers/common/meta.c<br>
+++ b/src/mesa/drivers/common/meta.c<br>
@@ -2793,7 +2793,8 @@ copytexsubimage_using_blit_framebuffer(struct gl_context *ctx, GLuint dims,<br>
* are too strict for CopyTexImage. We know meta will be fine with format<br>
* changes.<br>
*/<br>
- mask = _mesa_meta_BlitFramebuffer(ctx, x, y,<br>
+ mask = _mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
+ x, y,<br>
x + width, y + height,<br>
xoffset, yoffset,<br>
xoffset + width, yoffset + height,<br>
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h<br>
index 3b9e05e..e7d894d 100644<br>
--- a/src/mesa/drivers/common/meta.h<br>
+++ b/src/mesa/drivers/common/meta.h<br>
@@ -475,12 +475,16 @@ _mesa_meta_setup_sampler(struct gl_context *ctx,<br>
<br>
extern GLbitfield<br>
_mesa_meta_BlitFramebuffer(struct gl_context *ctx,<br>
+ const struct gl_framebuffer *readFb,<br>
+ const struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter);<br>
<br>
extern void<br>
_mesa_meta_and_swrast_BlitFramebuffer(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0,<br>
GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0,<br>
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c<br>
index 4212d94..3406be1 100644<br>
--- a/src/mesa/drivers/common/meta_blit.c<br>
+++ b/src/mesa/drivers/common/meta_blit.c<br>
@@ -232,6 +232,7 @@ setup_glsl_msaa_blit_scaled_shader(struct gl_context *ctx,<br>
static void<br>
setup_glsl_msaa_blit_shader(struct gl_context *ctx,<br>
struct blit_state *blit,<br>
+ const struct gl_framebuffer *drawFb,<br>
struct gl_renderbuffer *src_rb,<br>
GLenum target)<br>
{<br>
@@ -267,7 +268,7 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,<br>
/* Update the assert if we plan to support more than 16X MSAA. */<br>
assert(shader_offset >= 0 && shader_offset <= 4);<br>
<br>
- if (ctx->DrawBuffer->Visual.samples > 1) {<br>
+ if (drawFb->Visual.samples > 1) {<br>
/* If you're calling meta_BlitFramebuffer with the destination<br>
* multisampled, this is the only path that will work -- swrast and<br>
* CopyTexImage won't work on it either.<br>
@@ -508,6 +509,7 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,<br>
static void<br>
setup_glsl_blit_framebuffer(struct gl_context *ctx,<br>
struct blit_state *blit,<br>
+ const struct gl_framebuffer *drawFb,<br>
struct gl_renderbuffer *src_rb,<br>
GLenum target, GLenum filter,<br>
bool is_scaled_blit,<br>
@@ -530,7 +532,7 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx,<br>
if (is_target_multisample && is_filter_scaled_resolve && is_scaled_blit) {<br>
setup_glsl_msaa_blit_scaled_shader(ctx, blit, src_rb, target, filter);<br>
} else if (is_target_multisample) {<br>
- setup_glsl_msaa_blit_shader(ctx, blit, src_rb, target);<br>
+ setup_glsl_msaa_blit_shader(ctx, blit, drawFb, src_rb, target);<br>
} else {<br>
_mesa_meta_setup_blit_shader(ctx, target, do_depth,<br>
do_depth ? &blit->shaders_with_depth<br>
@@ -546,12 +548,13 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx,<br>
*/<br>
static bool<br>
blitframebuffer_texture(struct gl_context *ctx,<br>
+ const struct gl_framebuffer *readFb,<br>
+ const struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLenum filter, GLint flipX, GLint flipY,<br>
GLboolean glsl_version, GLboolean do_depth)<br>
{<br>
- const struct gl_framebuffer *readFb = ctx->ReadBuffer;<br>
int att_index = do_depth ? BUFFER_DEPTH : readFb->_ColorReadBufferIndex;<br>
const struct gl_renderbuffer_attachment *readAtt =<br>
&readFb->Attachment[att_index];<br>
@@ -645,7 +648,7 @@ blitframebuffer_texture(struct gl_context *ctx,<br>
scaled_blit = dstW != srcW || dstH != srcH;<br>
<br>
if (glsl_version) {<br>
- setup_glsl_blit_framebuffer(ctx, blit, rb, target, filter, scaled_blit,<br>
+ setup_glsl_blit_framebuffer(ctx, blit, drawFb, rb, target, filter, scaled_blit,<br>
do_depth);<br>
}<br>
else {<br>
@@ -681,7 +684,7 @@ blitframebuffer_texture(struct gl_context *ctx,<br>
*/<br>
if (ctx->Extensions.EXT_texture_sRGB_decode) {<br>
if (_mesa_get_format_color_encoding(rb->Format) == GL_SRGB &&<br>
- ctx->DrawBuffer->Visual.sRGBCapable) {<br>
+ drawFb->Visual.sRGBCapable) {<br>
_mesa_SamplerParameteri(fb_tex_blit.sampler,<br>
GL_TEXTURE_SRGB_DECODE_EXT, GL_DECODE_EXT);<br>
_mesa_set_framebuffer_srgb(ctx, GL_TRUE);<br>
@@ -873,6 +876,8 @@ _mesa_meta_setup_sampler(struct gl_context *ctx,<br>
*/<br>
GLbitfield<br>
_mesa_meta_BlitFramebuffer(struct gl_context *ctx,<br>
+ const struct gl_framebuffer *readFb,<br>
+ const struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter)<br>
@@ -894,7 +899,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,<br>
ctx->Extensions.ARB_fragment_shader;<br>
<br>
/* Multisample texture blit support requires texture multisample. */<br>
- if (ctx->ReadBuffer->Visual.samples > 0 &&<br>
+ if (readFb->Visual.samples > 0 &&<br>
!ctx->Extensions.ARB_texture_multisample) {<br>
return mask;<br>
}<br>
@@ -902,7 +907,8 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,<br>
/* Clip a copy of the blit coordinates. If these differ from the input<br>
* coordinates, then we'll set the scissor.<br>
*/<br>
- if (!_mesa_clip_blit(ctx, &clip.srcX0, &clip.srcY0, &clip.srcX1, &clip.srcY1,<br>
+ if (!_mesa_clip_blit(ctx, readFb, drawFb,<br>
+ &clip.srcX0, &clip.srcY0, &clip.srcX1, &clip.srcY1,<br>
&clip.dstX0, &clip.dstY0, &clip.dstX1, &clip.dstY1)) {<br>
/* clipped/scissored everything away */<br>
return 0;<br>
@@ -930,7 +936,8 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,<br>
<br>
/* Try faster, direct texture approach first */<br>
if (mask & GL_COLOR_BUFFER_BIT) {<br>
- if (blitframebuffer_texture(ctx, srcX0, srcY0, srcX1, srcY1,<br>
+ if (blitframebuffer_texture(ctx, readFb, drawFb,<br>
+ srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
filter, dstFlipX, dstFlipY,<br>
use_glsl_version, false)) {<br>
@@ -939,7 +946,8 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,<br>
}<br>
<br>
if (mask & GL_DEPTH_BUFFER_BIT && use_glsl_version) {<br>
- if (blitframebuffer_texture(ctx, srcX0, srcY0, srcX1, srcY1,<br>
+ if (blitframebuffer_texture(ctx, readFb, drawFb,<br>
+ srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
filter, dstFlipX, dstFlipY,<br>
use_glsl_version, true)) {<br>
@@ -975,20 +983,22 @@ _mesa_meta_glsl_blit_cleanup(struct blit_state *blit)<br>
<br>
void<br>
_mesa_meta_and_swrast_BlitFramebuffer(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0,<br>
GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0,<br>
GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter)<br>
{<br>
- mask = _mesa_meta_BlitFramebuffer(ctx,<br>
+ mask = _mesa_meta_BlitFramebuffer(ctx, readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
mask, filter);<br>
if (mask == 0x0)<br>
return;<br>
<br>
- _swrast_BlitFramebuffer(ctx,<br>
+ _swrast_BlitFramebuffer(ctx, readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
mask, filter);<br>
diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c<br>
index fc0cbaf..1729766 100644<br>
--- a/src/mesa/drivers/common/meta_copy_image.c<br>
+++ b/src/mesa/drivers/common/meta_copy_image.c<br>
@@ -189,7 +189,8 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx,<br>
* We have already created views to ensure that the texture formats<br>
* match.<br>
*/<br>
- ctx->Driver.BlitFramebuffer(ctx, src_x, src_y,<br>
+ ctx->Driver.BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
+ src_x, src_y,<br>
src_x + src_width, src_y + src_height,<br>
dst_x, dst_y,<br>
dst_x + src_width, dst_y + src_height,<br>
diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c<br>
index 977ee5a..68c8273 100644<br>
--- a/src/mesa/drivers/common/meta_tex_subimage.c<br>
+++ b/src/mesa/drivers/common/meta_tex_subimage.c<br>
@@ -206,7 +206,8 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,<br>
<br>
_mesa_update_state(ctx);<br>
<br>
- if (_mesa_meta_BlitFramebuffer(ctx, 0, 0, width, height,<br>
+ if (_mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
+ 0, 0, width, height,<br>
xoffset, yoffset,<br>
xoffset + width, yoffset + height,<br>
GL_COLOR_BUFFER_BIT, GL_NEAREST))<br>
@@ -220,7 +221,8 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,<br>
<br>
_mesa_update_state(ctx);<br>
<br>
- _mesa_meta_BlitFramebuffer(ctx, 0, 0, width, height,<br>
+ _mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
+ 0, 0, width, height,<br>
xoffset, yoffset,<br>
xoffset + width, yoffset + height,<br>
GL_COLOR_BUFFER_BIT, GL_NEAREST);<br>
@@ -324,7 +326,8 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,<br>
<br>
_mesa_update_state(ctx);<br>
<br>
- if (_mesa_meta_BlitFramebuffer(ctx, xoffset, yoffset,<br>
+ if (_mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
+ xoffset, yoffset,<br>
xoffset + width, yoffset + height,<br>
0, 0, width, height,<br>
GL_COLOR_BUFFER_BIT, GL_NEAREST))<br>
@@ -338,7 +341,8 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,<br>
<br>
_mesa_update_state(ctx);<br>
<br>
- _mesa_meta_BlitFramebuffer(ctx, xoffset, yoffset,<br>
+ _mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
+ xoffset, yoffset,<br>
xoffset + width, yoffset + height,<br>
0, 0, width, height,<br>
GL_COLOR_BUFFER_BIT, GL_NEAREST);<br>
diff --git a/src/mesa/drivers/dri/i915/intel_fbo.c b/src/mesa/drivers/dri/i915/intel_fbo.c<br>
index eb88a60..d4abd27 100644<br>
--- a/src/mesa/drivers/dri/i915/intel_fbo.c<br>
+++ b/src/mesa/drivers/dri/i915/intel_fbo.c<br>
@@ -649,6 +649,8 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)<br>
*/<br>
static GLbitfield<br>
intel_blit_framebuffer_with_blitter(struct gl_context *ctx,<br>
+ const struct gl_framebuffer *readFb,<br>
+ const struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0,<br>
GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0,<br>
@@ -659,8 +661,6 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx,<br>
<br>
if (mask & GL_COLOR_BUFFER_BIT) {<br>
GLint i;<br>
- const struct gl_framebuffer *drawFb = ctx->DrawBuffer;<br>
- const struct gl_framebuffer *readFb = ctx->ReadBuffer;<br>
struct gl_renderbuffer *src_rb = readFb->_ColorReadBuffer;<br>
struct intel_renderbuffer *src_irb = intel_renderbuffer(src_rb);<br>
<br>
@@ -696,8 +696,8 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx,<br>
* results are undefined if any destination pixels have a dependency on<br>
* source pixels.<br>
*/<br>
- for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {<br>
- struct gl_renderbuffer *dst_rb = ctx->DrawBuffer->_ColorDrawBuffers[i];<br>
+ for (i = 0; i < drawFb->_NumColorDrawBuffers; i++) {<br>
+ struct gl_renderbuffer *dst_rb = drawFb->_ColorDrawBuffers[i];<br>
struct intel_renderbuffer *dst_irb = intel_renderbuffer(dst_rb);<br>
<br>
if (!dst_irb) {<br>
@@ -738,12 +738,14 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx,<br>
<br>
static void<br>
intel_blit_framebuffer(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter)<br>
{<br>
/* Try using the BLT engine. */<br>
- mask = intel_blit_framebuffer_with_blitter(ctx,<br>
+ mask = intel_blit_framebuffer_with_blitter(ctx, readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
mask, filter);<br>
@@ -751,7 +753,7 @@ intel_blit_framebuffer(struct gl_context *ctx,<br>
return;<br>
<br>
<br>
- _mesa_meta_and_swrast_BlitFramebuffer(ctx,<br>
+ _mesa_meta_and_swrast_BlitFramebuffer(ctx, readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
mask, filter);<br>
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
index 936feaf..10a53dc 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
@@ -125,6 +125,8 @@ do_blorp_blit(struct brw_context *brw, GLbitfield buffer_bit,<br>
<br>
static bool<br>
try_blorp_blit(struct brw_context *brw,<br>
+ const struct gl_framebuffer *read_fb,<br>
+ const struct gl_framebuffer *draw_fb,<br>
GLfloat srcX0, GLfloat srcY0, GLfloat srcX1, GLfloat srcY1,<br>
GLfloat dstX0, GLfloat dstY0, GLfloat dstX1, GLfloat dstY1,<br>
GLenum filter, GLbitfield buffer_bit)<br>
@@ -136,11 +138,8 @@ try_blorp_blit(struct brw_context *brw,<br>
*/<br>
intel_prepare_render(brw);<br>
<br>
- const struct gl_framebuffer *read_fb = ctx->ReadBuffer;<br>
- const struct gl_framebuffer *draw_fb = ctx->DrawBuffer;<br>
-<br>
bool mirror_x, mirror_y;<br>
- if (brw_meta_mirror_clip_and_scissor(ctx,<br>
+ if (brw_meta_mirror_clip_and_scissor(ctx, read_fb, draw_fb,<br>
&srcX0, &srcY0, &srcX1, &srcY1,<br>
&dstX0, &dstY0, &dstX1, &dstY1,<br>
&mirror_x, &mirror_y))<br>
@@ -154,8 +153,8 @@ try_blorp_blit(struct brw_context *brw,<br>
switch (buffer_bit) {<br>
case GL_COLOR_BUFFER_BIT:<br>
src_irb = intel_renderbuffer(read_fb->_ColorReadBuffer);<br>
- for (unsigned i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; ++i) {<br>
- dst_irb = intel_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[i]);<br>
+ for (unsigned i = 0; i < draw_fb->_NumColorDrawBuffers; ++i) {<br>
+ dst_irb = intel_renderbuffer(draw_fb->_ColorDrawBuffers[i]);<br>
if (dst_irb)<br>
do_blorp_blit(brw, buffer_bit,<br>
src_irb, src_irb->Base.Base.Format,<br>
@@ -317,6 +316,8 @@ brw_blorp_copytexsubimage(struct brw_context *brw,<br>
<br>
GLbitfield<br>
brw_blorp_framebuffer(struct brw_context *brw,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter)<br>
@@ -333,7 +334,7 @@ brw_blorp_framebuffer(struct brw_context *brw,<br>
<br>
for (unsigned int i = 0; i < ARRAY_SIZE(buffer_bits); ++i) {<br>
if ((mask & buffer_bits[i]) &&<br>
- try_blorp_blit(brw,<br>
+ try_blorp_blit(brw, readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
filter, buffer_bits[i])) {<br>
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h<br>
index a4b29fa..c34a49d 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_context.h<br>
+++ b/src/mesa/drivers/dri/i965/brw_context.h<br>
@@ -1490,6 +1490,8 @@ void brw_meta_updownsample(struct brw_context *brw,<br>
struct intel_mipmap_tree *dst);<br>
<br>
void brw_meta_fbo_stencil_blit(struct brw_context *brw,<br>
+ struct gl_framebuffer *read_fb,<br>
+ struct gl_framebuffer *draw_fb,<br>
GLfloat srcX0, GLfloat srcY0,<br>
GLfloat srcX1, GLfloat srcY1,<br>
GLfloat dstX0, GLfloat dstY0,<br>
@@ -1714,6 +1716,8 @@ gen7_resume_transform_feedback(struct gl_context *ctx,<br>
/* brw_blorp_blit.cpp */<br>
GLbitfield<br>
brw_blorp_framebuffer(struct brw_context *brw,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter);<br>
diff --git a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c<br>
index b9b481b..fc7018d 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c<br>
@@ -460,15 +460,17 @@ error:<br>
<br>
void<br>
brw_meta_fbo_stencil_blit(struct brw_context *brw,<br>
+ struct gl_framebuffer *read_fb,<br>
+ struct gl_framebuffer *draw_fb,<br>
GLfloat src_x0, GLfloat src_y0,<br>
GLfloat src_x1, GLfloat src_y1,<br>
GLfloat dst_x0, GLfloat dst_y0,<br>
GLfloat dst_x1, GLfloat dst_y1)<br>
{<br>
struct gl_context *ctx = &brw->ctx;<br>
- struct gl_renderbuffer *draw_fb =<br>
- ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Renderbuffer;<br>
- const struct intel_renderbuffer *dst_irb = intel_renderbuffer(draw_fb);<br>
+ struct gl_renderbuffer *draw_rb =<br>
+ draw_fb->Attachment[BUFFER_STENCIL].Renderbuffer;<br>
+ const struct intel_renderbuffer *dst_irb = intel_renderbuffer(draw_rb);<br>
struct intel_mipmap_tree *dst_mt = dst_irb->mt;<br>
<br>
if (!dst_mt)<br>
@@ -478,7 +480,7 @@ brw_meta_fbo_stencil_blit(struct brw_context *brw,<br>
dst_mt = dst_mt->stencil_mt;<br>
<br>
bool mirror_x, mirror_y;<br>
- if (brw_meta_mirror_clip_and_scissor(ctx,<br>
+ if (brw_meta_mirror_clip_and_scissor(ctx, read_fb, draw_fb,<br>
&src_x0, &src_y0, &src_x1, &src_y1,<br>
&dst_x0, &dst_y0, &dst_x1, &dst_y1,<br>
&mirror_x, &mirror_y))<br>
diff --git a/src/mesa/drivers/dri/i965/brw_meta_util.c b/src/mesa/drivers/dri/i965/brw_meta_util.c<br>
index 72ed96c..a3b0604 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_meta_util.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_meta_util.c<br>
@@ -104,15 +104,14 @@ clip_or_scissor(bool mirror,<br>
<br>
bool<br>
brw_meta_mirror_clip_and_scissor(const struct gl_context *ctx,<br>
+ const struct gl_framebuffer *read_fb,<br>
+ const struct gl_framebuffer *draw_fb,<br>
GLfloat *srcX0, GLfloat *srcY0,<br>
GLfloat *srcX1, GLfloat *srcY1,<br>
GLfloat *dstX0, GLfloat *dstY0,<br>
GLfloat *dstX1, GLfloat *dstY1,<br>
bool *mirror_x, bool *mirror_y)<br>
{<br>
- const struct gl_framebuffer *read_fb = ctx->ReadBuffer;<br>
- const struct gl_framebuffer *draw_fb = ctx->DrawBuffer;<br>
-<br>
*mirror_x = false;<br>
*mirror_y = false;<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_meta_util.h b/src/mesa/drivers/dri/i965/brw_meta_util.h<br>
index ccd8642..dc9dff2 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_meta_util.h<br>
+++ b/src/mesa/drivers/dri/i965/brw_meta_util.h<br>
@@ -33,6 +33,8 @@ extern "C" {<br>
<br>
bool<br>
brw_meta_mirror_clip_and_scissor(const struct gl_context *ctx,<br>
+ const struct gl_framebuffer *read_fb,<br>
+ const struct gl_framebuffer *draw_fb,<br>
GLfloat *srcX0, GLfloat *srcY0,<br>
GLfloat *srcX1, GLfloat *srcY1,<br>
GLfloat *dstX0, GLfloat *dstY0,<br>
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c<br>
index 7bdf995..da31c6f 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_fbo.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c<br>
@@ -779,6 +779,8 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)<br>
*/<br>
static GLbitfield<br>
intel_blit_framebuffer_with_blitter(struct gl_context *ctx,<br>
+ const struct gl_framebuffer *readFb,<br>
+ const struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0,<br>
GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0,<br>
@@ -794,8 +796,6 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx,<br>
<br>
if (mask & GL_COLOR_BUFFER_BIT) {<br>
GLint i;<br>
- const struct gl_framebuffer *drawFb = ctx->DrawBuffer;<br>
- const struct gl_framebuffer *readFb = ctx->ReadBuffer;<br>
struct gl_renderbuffer *src_rb = readFb->_ColorReadBuffer;<br>
struct intel_renderbuffer *src_irb = intel_renderbuffer(src_rb);<br>
<br>
@@ -863,6 +863,8 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx,<br>
<br>
static void<br>
intel_blit_framebuffer(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter)<br>
@@ -876,7 +878,7 @@ intel_blit_framebuffer(struct gl_context *ctx,<br>
if (!_mesa_check_conditional_render(ctx))<br>
return;<br>
<br>
- mask = brw_blorp_framebuffer(brw,<br>
+ mask = brw_blorp_framebuffer(brw, readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
mask, filter);<br>
@@ -884,7 +886,7 @@ intel_blit_framebuffer(struct gl_context *ctx,<br>
return;<br>
<br>
if (brw->gen >= 8 && (mask & GL_STENCIL_BUFFER_BIT)) {<br>
- brw_meta_fbo_stencil_blit(brw_context(ctx),<br>
+ brw_meta_fbo_stencil_blit(brw_context(ctx), readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1);<br>
mask &= ~GL_STENCIL_BUFFER_BIT;<br>
@@ -893,21 +895,21 @@ intel_blit_framebuffer(struct gl_context *ctx,<br>
}<br>
<br>
/* Try using the BLT engine. */<br>
- mask = intel_blit_framebuffer_with_blitter(ctx,<br>
+ mask = intel_blit_framebuffer_with_blitter(ctx, readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
mask, filter);<br>
if (mask == 0x0)<br>
return;<br>
<br>
- mask = _mesa_meta_BlitFramebuffer(ctx,<br>
+ mask = _mesa_meta_BlitFramebuffer(ctx, readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
mask, filter);<br>
if (mask == 0x0)<br>
return;<br>
<br>
- _swrast_BlitFramebuffer(ctx,<br>
+ _swrast_BlitFramebuffer(ctx, readFb, drawFb,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
mask, filter);<br>
diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c<br>
index 0b70a3d..b97b564 100644<br>
--- a/src/mesa/main/blit.c<br>
+++ b/src/mesa/main/blit.c<br>
@@ -506,7 +506,7 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
}<br>
<br>
ASSERT(ctx->Driver.BlitFramebuffer);<br>
- ctx->Driver.BlitFramebuffer(ctx,<br>
+ ctx->Driver.BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
mask, filter);<br>
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h<br>
index 6883e18..40f68b4 100644<br>
--- a/src/mesa/main/dd.h<br>
+++ b/src/mesa/main/dd.h<br>
@@ -713,6 +713,8 @@ struct dd_function_table {<br>
struct gl_framebuffer *fb);<br>
/*@}*/<br>
void (*BlitFramebuffer)(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter);<br>
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c<br>
index 9ad97c5..c37900c 100644<br>
--- a/src/mesa/main/image.c<br>
+++ b/src/mesa/main/image.c<br>
@@ -861,19 +861,21 @@ clip_left_or_bottom(GLint *srcX0, GLint *srcX1,<br>
*/<br>
GLboolean<br>
_mesa_clip_blit(struct gl_context *ctx,<br>
+ const struct gl_framebuffer *readFb,<br>
+ const struct gl_framebuffer *drawFb,<br>
GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1,<br>
GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1)<br>
{<br>
const GLint srcXmin = 0;<br>
- const GLint srcXmax = ctx->ReadBuffer->Width;<br>
+ const GLint srcXmax = readFb->Width;<br>
const GLint srcYmin = 0;<br>
- const GLint srcYmax = ctx->ReadBuffer->Height;<br>
+ const GLint srcYmax = readFb->Height;<br>
<br>
/* these include scissor bounds */<br>
- const GLint dstXmin = ctx->DrawBuffer->_Xmin;<br>
- const GLint dstXmax = ctx->DrawBuffer->_Xmax;<br>
- const GLint dstYmin = ctx->DrawBuffer->_Ymin;<br>
- const GLint dstYmax = ctx->DrawBuffer->_Ymax;<br>
+ const GLint dstXmin = drawFb->_Xmin;<br>
+ const GLint dstXmax = drawFb->_Xmax;<br>
+ const GLint dstYmin = drawFb->_Ymin;<br>
+ const GLint dstYmax = drawFb->_Ymax;<br>
<br>
/*<br>
printf("PreClipX: src: %d .. %d dst: %d .. %d\n",<br>
diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h<br>
index 44863cc..501586b 100644<br>
--- a/src/mesa/main/image.h<br>
+++ b/src/mesa/main/image.h<br>
@@ -32,6 +32,7 @@<br>
<br>
struct gl_context;<br>
struct gl_pixelstore_attrib;<br>
+struct gl_framebuffer;<br>
<br>
extern void<br>
_mesa_swap2_copy(GLushort *dst, GLushort *src, GLuint n);<br>
@@ -140,6 +141,8 @@ _mesa_clip_to_region(GLint xmin, GLint ymin,<br>
<br>
extern GLboolean<br>
_mesa_clip_blit(struct gl_context *ctx,<br>
+ const struct gl_framebuffer *readFb,<br>
+ const struct gl_framebuffer *drawFb,<br>
GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1,<br>
GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1);<br>
<br>
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c<br>
index 9c33f4e..bbaedd1 100644<br>
--- a/src/mesa/state_tracker/st_cb_blit.c<br>
+++ b/src/mesa/state_tracker/st_cb_blit.c<br>
@@ -73,6 +73,8 @@ st_adjust_blit_for_msaa_resolve(struct pipe_blit_info *blit)<br>
<br>
static void<br>
st_BlitFramebuffer(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFB,<br>
+ struct gl_framebuffer *drawFB,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter)<br>
@@ -83,8 +85,6 @@ st_BlitFramebuffer(struct gl_context *ctx,<br>
const uint pFilter = ((filter == GL_NEAREST)<br>
? PIPE_TEX_FILTER_NEAREST<br>
: PIPE_TEX_FILTER_LINEAR);<br>
- struct gl_framebuffer *readFB = ctx->ReadBuffer;<br>
- struct gl_framebuffer *drawFB = ctx->DrawBuffer;<br>
struct {<br>
GLint srcX0, srcY0, srcX1, srcY1;<br>
GLint dstX0, dstY0, dstX1, dstY1;<br>
@@ -108,7 +108,7 @@ st_BlitFramebuffer(struct gl_context *ctx,<br>
*<br>
* XXX: This should depend on mask !<br>
*/<br>
- if (!_mesa_clip_blit(ctx,<br>
+ if (!_mesa_clip_blit(ctx, readFB, drawFB,<br>
&clip.srcX0, &clip.srcY0, &clip.srcX1, &clip.srcY1,<br>
&clip.dstX0, &clip.dstY0, &clip.dstX1, &clip.dstY1)) {<br>
return; /* nothing to draw/blit */<br>
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c<br>
index e3b45f1..16e5b8c 100644<br>
--- a/src/mesa/swrast/s_blit.c<br>
+++ b/src/mesa/swrast/s_blit.c<br>
@@ -107,14 +107,14 @@ RESAMPLE(resample_row_16, GLuint, 4)<br>
*/<br>
static void<br>
blit_nearest(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield buffer)<br>
{<br>
struct gl_renderbuffer *readRb, *drawRb = NULL;<br>
struct gl_renderbuffer_attachment *readAtt = NULL, *drawAtt = NULL;<br>
- struct gl_framebuffer *readFb = ctx->ReadBuffer;<br>
- struct gl_framebuffer *drawFb = ctx->DrawBuffer;<br>
GLuint numDrawBuffers = 0;<br>
GLuint i;<br>
<br>
@@ -508,11 +508,11 @@ resample_linear_row_float(GLint srcWidth, GLint dstWidth,<br>
*/<br>
static void<br>
blit_linear(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1)<br>
{<br>
- struct gl_framebuffer *drawFb = ctx->DrawBuffer;<br>
- struct gl_framebuffer *readFb = ctx->ReadBuffer;<br>
struct gl_renderbuffer *readRb = readFb->_ColorReadBuffer;<br>
struct gl_renderbuffer_attachment *readAtt =<br>
&readFb->Attachment[readFb->_ColorReadBufferIndex];<br>
@@ -733,6 +733,8 @@ fail_no_memory:<br>
*/<br>
void<br>
_swrast_BlitFramebuffer(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter)<br>
@@ -756,7 +758,7 @@ _swrast_BlitFramebuffer(struct gl_context *ctx,<br>
if (!_mesa_check_conditional_render(ctx))<br>
return; /* Do not blit */<br>
<br>
- if (!_mesa_clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,<br>
+ if (!_mesa_clip_blit(ctx, readFb, drawFb, &srcX0, &srcY0, &srcX1, &srcY1,<br>
&dstX0, &dstY0, &dstX1, &dstY1)) {<br>
return;<br>
}<br>
@@ -775,33 +777,34 @@ _swrast_BlitFramebuffer(struct gl_context *ctx,<br>
dstY0 < dstY1) {<br>
for (i = 0; i < 3; i++) {<br>
if (mask & buffers[i]) {<br>
- if (swrast_fast_copy_pixels(ctx,<br>
- srcX0, srcY0,<br>
- srcX1 - srcX0, srcY1 - srcY0,<br>
- dstX0, dstY0,<br>
- buffer_enums[i])) {<br>
- mask &= ~buffers[i];<br>
- }<br>
- }<br>
+ if (swrast_fast_copy_pixels(ctx,<br>
+ readFb, drawFb,<br>
+ srcX0, srcY0,<br>
+ srcX1 - srcX0, srcY1 - srcY0,<br>
+ dstX0, dstY0,<br>
+ buffer_enums[i])) {<br>
+ mask &= ~buffers[i];<br>
+ }<br>
+ }<br>
}<br>
<br>
if (!mask)<br>
- return;<br>
+ return;<br>
}<br>
<br>
if (filter == GL_NEAREST) {<br>
for (i = 0; i < 3; i++) {<br>
- if (mask & buffers[i]) {<br>
- blit_nearest(ctx, srcX0, srcY0, srcX1, srcY1,<br>
- dstX0, dstY0, dstX1, dstY1, buffers[i]);<br>
- }<br>
+ if (mask & buffers[i]) {<br>
+ blit_nearest(ctx, readFb, drawFb, srcX0, srcY0, srcX1, srcY1,<br>
+ dstX0, dstY0, dstX1, dstY1, buffers[i]);<br>
+ }<br>
}<br>
}<br>
else {<br>
ASSERT(filter == GL_LINEAR);<br>
if (mask & GL_COLOR_BUFFER_BIT) { /* depth/stencil not allowed */<br>
- blit_linear(ctx, srcX0, srcY0, srcX1, srcY1,<br>
- dstX0, dstY0, dstX1, dstY1);<br>
+ blit_linear(ctx, readFb, drawFb, srcX0, srcY0, srcX1, srcY1,<br>
+ dstX0, dstY0, dstX1, dstY1);<br>
}<br>
}<br>
<br>
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c<br>
index d001734..e21c69d 100644<br>
--- a/src/mesa/swrast/s_copypix.c<br>
+++ b/src/mesa/swrast/s_copypix.c<br>
@@ -442,11 +442,11 @@ end:<br>
*/<br>
GLboolean<br>
swrast_fast_copy_pixels(struct gl_context *ctx,<br>
- GLint srcX, GLint srcY, GLsizei width, GLsizei height,<br>
- GLint dstX, GLint dstY, GLenum type)<br>
+ struct gl_framebuffer *srcFb,<br>
+ struct gl_framebuffer *dstFb,<br>
+ GLint srcX, GLint srcY, GLsizei width, GLsizei height,<br>
+ GLint dstX, GLint dstY, GLenum type)<br>
{<br>
- struct gl_framebuffer *srcFb = ctx->ReadBuffer;<br>
- struct gl_framebuffer *dstFb = ctx->DrawBuffer;<br>
struct gl_renderbuffer *srcRb, *dstRb;<br>
GLint row;<br>
GLuint pixelBytes, widthInBytes;<br>
@@ -620,9 +620,9 @@ map_readbuffer(struct gl_context *ctx, GLenum type)<br>
* By time we get here, all parameters will have been error-checked.<br>
*/<br>
void<br>
-_swrast_CopyPixels( struct gl_context *ctx,<br>
- GLint srcx, GLint srcy, GLsizei width, GLsizei height,<br>
- GLint destx, GLint desty, GLenum type )<br>
+_swrast_CopyPixels(struct gl_context *ctx,<br>
+ GLint srcx, GLint srcy, GLsizei width, GLsizei height,<br>
+ GLint destx, GLint desty, GLenum type)<br>
{<br>
SWcontext *swrast = SWRAST_CONTEXT(ctx);<br>
struct gl_renderbuffer *rb;<br>
@@ -634,11 +634,12 @@ _swrast_CopyPixels( struct gl_context *ctx,<br>
_swrast_validate_derived( ctx );<br>
<br>
if (!(SWRAST_CONTEXT(ctx)->_RasterMask != 0x0 ||<br>
- ctx->Pixel.ZoomX != 1.0F ||<br>
- ctx->Pixel.ZoomY != 1.0F ||<br>
- ctx->_ImageTransferState) &&<br>
- swrast_fast_copy_pixels(ctx, srcx, srcy, width, height, destx, desty,<br>
- type)) {<br>
+ ctx->Pixel.ZoomX != 1.0F ||<br>
+ ctx->Pixel.ZoomY != 1.0F ||<br>
+ ctx->_ImageTransferState) &&<br>
+ swrast_fast_copy_pixels(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
+ srcx, srcy, width, height, destx, desty,<br>
+ type)) {<br>
/* all done */<br>
return;<br>
}<br>
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h<br>
index ac3dbe3..a89dc6c 100644<br>
--- a/src/mesa/swrast/swrast.h<br>
+++ b/src/mesa/swrast/swrast.h<br>
@@ -132,16 +132,18 @@ _swrast_Bitmap( struct gl_context *ctx,<br>
const GLubyte *bitmap );<br>
<br>
extern void<br>
-_swrast_CopyPixels( struct gl_context *ctx,<br>
- GLint srcx, GLint srcy,<br>
- GLint destx, GLint desty,<br>
- GLsizei width, GLsizei height,<br>
- GLenum type );<br>
+_swrast_CopyPixels(struct gl_context *ctx,<br>
+ GLint srcx, GLint srcy,<br>
+ GLint destx, GLint desty,<br>
+ GLsizei width, GLsizei height,<br>
+ GLenum type);<br></blockquote><div><br></div><div>Most of the changes to CopyPixels seem to be whitespace only. While I'd like to see that cleaned up, it sould probably be seperate. I thought for a second there that CopyPixels had actually changed.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
extern GLboolean<br>
swrast_fast_copy_pixels(struct gl_context *ctx,<br>
- GLint srcX, GLint srcY, GLsizei width, GLsizei height,<br>
- GLint dstX, GLint dstY, GLenum type);<br>
+ struct gl_framebuffer *srcFb,<br>
+ struct gl_framebuffer *dstFb,<br>
+ GLint srcX, GLint srcY, GLsizei width, GLsizei height,<br>
+ GLint dstX, GLint dstY, GLenum type);<br>
<br>
extern void<br>
_swrast_DrawPixels( struct gl_context *ctx,<br>
@@ -153,6 +155,8 @@ _swrast_DrawPixels( struct gl_context *ctx,<br>
<br>
extern void<br>
_swrast_BlitFramebuffer(struct gl_context *ctx,<br>
+ struct gl_framebuffer *readFb,<br>
+ struct gl_framebuffer *drawFb,<br>
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,<br>
GLbitfield mask, GLenum filter);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div></div></div></div></div>