+static void
+intel_image_target_texture_2d(struct gl_context *ctx, GLenum target,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLeglImageOES image_handle)
+{
+ intel_image_target_texture(ctx, target, texObj, texImage, image_handle,
+ false);
+}
+
+static void
+intel_image_target_tex_storage(struct gl_context *ctx, GLenum target,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLeglImageOES image_handle)
+{
+ struct intel_texture_object *intel_texobj = intel_texture_object(texObj);
+ intel_image_target_texture(ctx, target, texObj, texImage, image_handle,
+ true);
+
+ /* The miptree is in a validated state, so no need to check later. */
+ intel_texobj->needs_validate = false;
+ intel_texobj->validated_first_level = 0;
+ intel_texobj->validated_last_level = 0;
+ intel_texobj->_Format = texImage->TexFormat;
+}
+
+static bool
+intel_gettexsubimage_blorp(struct brw_context *brw,
+ struct gl_texture_image *tex_image,
+ unsigned x, unsigned y, unsigned z,
+ unsigned width, unsigned height, unsigned depth,
+ GLenum format, GLenum type, const void *pixels,
+ const struct gl_pixelstore_attrib *packing)
+{
+ struct intel_texture_image *intel_image = intel_texture_image(tex_image);
+ const unsigned mt_level = tex_image->Level + tex_image->TexObject->MinLevel;
+ const unsigned mt_z = tex_image->TexObject->MinLayer + tex_image->Face + z;
+
+ /* The blorp path can't understand crazy format hackery */
+ if (_mesa_base_tex_format(&brw->ctx, tex_image->InternalFormat) !=
+ _mesa_get_format_base_format(tex_image->TexFormat))
+ return false;
+
+ return brw_blorp_download_miptree(brw, intel_image->mt,
+ tex_image->TexFormat, SWIZZLE_XYZW,
+ mt_level, x, y, mt_z,
+ width, height, depth,
+ tex_image->TexObject->Target,
+ format, type, false, pixels, packing);
+}
+