diff options
author | Eric Anholt <[email protected]> | 2012-12-20 13:52:30 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-12-28 11:05:20 -0800 |
commit | 73c376bbde0cbea1d1e5a6d71df965d2e903e003 (patch) | |
tree | e634ef916c31315c5e18d68abdeec9b8810c3c88 /src/mesa/drivers | |
parent | 12751ef2a70f2e8ce06b116d69e475dfa5dc6f38 (diff) |
intel: Turn a test in miptree_match_image into an assert.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index 9ae7bcccb19..181130bd2ac 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -601,8 +601,11 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt, GLuint level = intelImage->base.Base.Level; int width, height, depth; - if (target_to_target(image->TexObject->Target) != mt->target) - return false; + /* glTexImage* choose the texture object based on the target passed in, and + * objects can't change targets over their lifetimes, so this should be + * true. + */ + assert(target_to_target(image->TexObject->Target) == mt->target); gl_format mt_format = mt->format; if (mt->format == MESA_FORMAT_X8_Z24 && mt->stencil_mt) |