width, height, depth,
false, /* expect_accelerated */
num_samples,
- INTEL_MIPTREE_TILING_ANY);
+ INTEL_MIPTREE_TILING_ANY,
+ false);
+ if (intel_texobj->mt == NULL) {
+ return false;
+ }
}
for (face = 0; face < numFaces; face++) {
intel_texobj->needs_validate = false;
intel_texobj->validated_first_level = 0;
intel_texobj->validated_last_level = levels - 1;
+ intel_texobj->_Format = intel_texobj->mt->format;
return true;
}
if (tex_image->TexObject->Target == GL_TEXTURE_CUBE_MAP)
slice = tex_image->Face;
- intel_miptree_map(brw, mt, tex_image->Level, slice, x, y, w, h, mode,
- (void **)map, stride);
+ intel_miptree_map(brw, mt,
+ tex_image->Level + tex_image->TexObject->MinLevel,
+ slice + tex_image->TexObject->MinLayer,
+ x, y, w, h, mode,
+ (void **)map, stride);
}
static void
if (tex_image->TexObject->Target == GL_TEXTURE_CUBE_MAP)
slice = tex_image->Face;
- intel_miptree_unmap(brw, mt, tex_image->Level, slice);
+ intel_miptree_unmap(brw, mt,
+ tex_image->Level + tex_image->TexObject->MinLevel,
+ slice + tex_image->TexObject->MinLayer);
}
static GLboolean
struct gl_texture_object *texObj,
struct gl_texture_object *origTexObj)
{
+ struct brw_context *brw = brw_context(ctx);
struct intel_texture_object *intel_tex = intel_texture_object(texObj);
struct intel_texture_object *intel_orig_tex = intel_texture_object(origTexObj);
intel_tex->validated_first_level = 0;
intel_tex->validated_last_level = numLevels - 1;
+ /* Set the validated texture format, with the same adjustments that
+ * would have been applied to determine the underlying texture's
+ * mt->format.
+ */
+ intel_tex->_Format = intel_depth_format_for_depthstencil_format(
+ intel_lower_compressed_format(brw, texObj->Image[0][0]->TexFormat));
+
return GL_TRUE;
}