diff options
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_tex.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_tex.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_tex.c b/src/mesa/drivers/dri/i915/i915_tex.c index 4f77833e19..d9609d3193 100644 --- a/src/mesa/drivers/dri/i915/i915_tex.c +++ b/src/mesa/drivers/dri/i915/i915_tex.c @@ -158,7 +158,12 @@ static void i915TexEnv( GLcontext *ctx, GLenum target, static void i915BindTexture( GLcontext *ctx, GLenum target, struct gl_texture_object *texObj ) { - i915TextureObjectPtr tex = (i915TextureObjectPtr)texObj->DriverData; + i915TextureObjectPtr tex; + + if (!texObj->DriverData) + i915AllocTexObj( texObj ); + + tex = (i915TextureObjectPtr)texObj->DriverData; if (tex->lastTarget != texObj->Target) { tex->intel.dirty = I915_UPLOAD_TEX_ALL; |