diff options
author | Eric Anholt <eric@anholt.net> | 2007-05-24 13:59:50 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-05-24 16:46:54 -0700 |
commit | fd9d27e0686f5a15803d13d207e58be1972fdf31 (patch) | |
tree | 79f8847e0fd723567032fa201d7b3ff2fdf5621d /src/mesa/drivers/dri/i915tex/intel_tex_image.c | |
parent | b1fcabefa2f3fa81a20c1556383458315bb49bbf (diff) | |
parent | f116aed1ede0d802e9f3c5989290002975c00330 (diff) |
Merge branch 'master' into i915-unification
Conflicts:
src/mesa/drivers/dri/i915tex/i830_texstate.c
src/mesa/drivers/dri/i915tex/i915_texstate.c
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_tex_image.c')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_tex_image.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_image.c b/src/mesa/drivers/dri/i915tex/intel_tex_image.c index f9c8bc5801..b15569681a 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_image.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_image.c @@ -377,6 +377,9 @@ intelTexImage(GLcontext * ctx, assert(!intelObj->mt); } + if (!pixels) + return; + if (!intelObj->mt) { guess_and_alloc_mipmap_tree(intel, intelObj, intelImage); if (!intelObj->mt) { @@ -384,7 +387,6 @@ intelTexImage(GLcontext * ctx, } } - assert(!intelImage->mt); if (intelObj->mt && @@ -666,3 +668,23 @@ intelGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level, texObj, texImage, 1); } + +void +intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname, + unsigned long long offset, GLint depth, GLuint pitch) +{ + struct intel_context *intel = (struct intel_context*) + ((__DRIcontextPrivate*)pDRICtx->private)->driverPrivate; + struct gl_texture_object *tObj = _mesa_lookup_texture(&intel->ctx, texname); + struct intel_texture_object *intelObj = intel_texture_object(tObj); + + if (!intelObj) + return; + + intelObj->imageOverride = GL_TRUE; + intelObj->depthOverride = depth; + intelObj->pitchOverride = pitch; + + if (offset) + intelObj->textureOffset = offset; +} |