i965: Pass tObj into intel_update_max_level instead of intel_obj.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 19 Jun 2016 06:44:44 +0000 (23:44 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 31 Jan 2018 19:33:52 +0000 (11:33 -0800)
We want both anyway, but this will simplify things a tiny bit in an
upcoming patch.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_tex_validate.c

index 2b7798c940ad56c65475b303291145d3448dfb0b..efcf8604b89093e6efed7dcb9f99efea2ecb4d16 100644 (file)
  * allow sampling beyond level 0.
  */
 static void
-intel_update_max_level(struct intel_texture_object *intelObj,
+intel_update_max_level(struct gl_texture_object *tObj,
                       struct gl_sampler_object *sampler)
 {
-   struct gl_texture_object *tObj = &intelObj->base;
+   struct intel_texture_object *intelObj = intel_texture_object(tObj);
 
    if (!tObj->_MipmapComplete ||
        (tObj->_RenderToTexture &&
@@ -85,7 +85,7 @@ intel_finalize_mipmap_tree(struct brw_context *brw, GLuint unit)
     */
    assert(intelObj->base._BaseComplete);
 
-   intel_update_max_level(intelObj, sampler);
+   intel_update_max_level(tObj, sampler);
 
    /* What levels does this validated texture image require? */
    int validate_first_level = tObj->BaseLevel;