diff options
author | Brian Paul <brianp@vmware.com> | 2009-11-18 22:16:26 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-11-18 22:16:26 -0700 |
commit | 81bbac6333182233677f34f949e26d74b6eb0bac (patch) | |
tree | bda69c35876b65cba2cfe4e1c24ff1190741a4de | |
parent | 53ca30040ca91a8e888d3e8bd2706f8ec6de75d7 (diff) |
intel: indentation, whitespace fixes
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 41ba414410..77a8f59692 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -96,7 +96,6 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel, else firstLevel = intelObj->base.BaseLevel; - /* Figure out image dimensions at start level. */ for (i = intelImage->level; i > firstLevel; i--) { @@ -391,7 +390,6 @@ intelTexImage(GLcontext * ctx, if (try_pbo_zcopy(intel, intelImage, unpack, internalFormat, width, height, format, type, pixels)) { - DBG("pbo zcopy upload succeeded\n"); return; } @@ -450,32 +448,32 @@ intelTexImage(GLcontext * ctx, * conversion and copy: */ if (pixels) { - if (compressed) { - if (intelImage->mt) { - struct intel_region *dst = intelImage->mt->region; - _mesa_copy_rect(texImage->Map.Data, dst->cpp, dst->pitch, - 0, 0, - intelImage->mt->level[level].width, - (intelImage->mt->level[level].height+3)/4, - pixels, - srcRowStride, - 0, 0); - } - else { - memcpy(texImage->Map.Data, pixels, imageSize); - } - } - else if (!_mesa_texstore(ctx, dims, - texImage->_BaseFormat, - texImage->TexFormat, - texImage->Map.Data, /* dest addr */ - 0, 0, 0, /* dstX/Y/Zoffset */ - texImage->Map.RowStride * intelImage->mt->cpp, - texImage->Map.ImageOffsets, - width, height, depth, - format, type, pixels, unpack)) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); - } + if (compressed) { + if (intelImage->mt) { + struct intel_region *dst = intelImage->mt->region; + _mesa_copy_rect(texImage->Map.Data, dst->cpp, dst->pitch, + 0, 0, + intelImage->mt->level[level].width, + (intelImage->mt->level[level].height+3)/4, + pixels, + srcRowStride, + 0, 0); + } + else { + memcpy(texImage->Map.Data, pixels, imageSize); + } + } + else if (!_mesa_texstore(ctx, dims, + texImage->_BaseFormat, + texImage->TexFormat, + texImage->Map.Data, /* dest addr */ + 0, 0, 0, /* dstX/Y/Zoffset */ + texImage->Map.RowStride * intelImage->mt->cpp, + texImage->Map.ImageOffsets, + width, height, depth, + format, type, pixels, unpack)) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); + } } _mesa_unmap_pbo_source(ctx, unpack); @@ -697,12 +695,13 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, intel_miptree_reference(&intelImage->mt, intelObj->mt); if (!intel_miptree_match_image(intelObj->mt, &intelImage->base)) { - fprintf(stderr, "miptree doesn't match image\n"); + fprintf(stderr, "miptree doesn't match image\n"); } _mesa_unlock_texture(&intel->ctx, texObj); } + void intelSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv) { |