[Mesa-dev] [PATCH 2/3] i965: Allow GL_UNPACK_SKIP_ROWS/PIXELS in intel_try_pbo_upload
Neil Roberts
neil at linux.intel.com
Mon Dec 22 15:08:49 PST 2014
This should just be a simple case of adding the skip values to the src offset
so we can trivially implement it.
---
src/mesa/drivers/dri/i965/intel_tex_image.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 52ee97e..b1b49b9 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -105,7 +105,7 @@ intel_try_pbo_upload(struct gl_context *ctx,
DBG("trying pbo upload\n");
- if (ctx->_ImageTransferState || unpack->SkipPixels || unpack->SkipRows) {
+ if (ctx->_ImageTransferState) {
DBG("%s: image transfer\n", __FUNCTION__);
return false;
}
@@ -137,6 +137,11 @@ intel_try_pbo_upload(struct gl_context *ctx,
/* note: potential 64-bit ptr to 32-bit int cast */
src_offset = (GLuint) (unsigned long) pixels;
+ src_offset += _mesa_image_offset(2,
+ unpack,
+ width, height,
+ format, type,
+ 0, 0, 0 /* img/row/column */);
src_buffer = intel_bufferobj_buffer(brw, pbo,
src_offset, src_stride * height);
--
1.9.3
More information about the mesa-dev
mailing list