aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-06-22 14:40:51 +0200
committerEric Anholt <[email protected]>2009-06-22 08:45:45 -0700
commit2c36ed90672720966c26a8c27e222ec14b23aae6 (patch)
tree6a2a95d235406bd43fe41ba3631f6f72b8cf127a
parentdf70d3049a396af3601d2a1747770635a74120bb (diff)
intel: Fix glReadPixels regression since changing context init order.
Fixes regression in dd26899ca39111e0866afed9df94bfb1618dd363 that also affected some PBO operations.
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_read.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c
index 538da28c50e..a7b79592758 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c
@@ -179,7 +179,7 @@ do_blit_readpixels(GLcontext * ctx,
if (!src)
return GL_FALSE;
- if (dst) {
+ if (pack->BufferObj->Name) {
/* XXX This validation should be done by core mesa:
*/
if (!_mesa_validate_pbo_access(2, pack, width, height, 1,
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index e9a3823078a..03311e58aab 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -205,7 +205,7 @@ try_pbo_upload(struct intel_context *intel,
GLuint src_offset, src_stride;
GLuint dst_offset, dst_stride;
- if (!pbo ||
+ if (unpack->BufferObj->Name == 0 ||
intel->ctx._ImageTransferState ||
unpack->SkipPixels || unpack->SkipRows) {
DBG("%s: failure 1\n", __FUNCTION__);
@@ -260,7 +260,7 @@ try_pbo_zcopy(struct intel_context *intel,
GLuint src_offset, src_stride;
GLuint dst_offset, dst_stride;
- if (!pbo ||
+ if (unpack->BufferObj->Name == 0 ||
intel->ctx._ImageTransferState ||
unpack->SkipPixels || unpack->SkipRows) {
DBG("%s: failure 1\n", __FUNCTION__);
@@ -421,7 +421,7 @@ intelTexImage(GLcontext * ctx,
*/
if (dims <= 2 &&
intelImage->mt &&
- intel_buffer_object(unpack->BufferObj) &&
+ unpack->BufferObj->Name != 0 &&
check_pbo_format(internalFormat, format,
type, intelImage->base.TexFormat)) {