Mesa (master): i965: refactor intel_image_target_texture_2d

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 13 23:19:00 UTC 2020


Module: Mesa
Branch: master
Commit: b1c266d5fa55a76dd47efff0621ee794aa13b4e7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b1c266d5fa55a76dd47efff0621ee794aa13b4e7

Author: Gurchetan Singh <gurchetansingh at chromium.org>
Date:   Wed Nov  6 18:02:37 2019 -0800

i965: refactor intel_image_target_texture_2d

intel_image_target_texture_tex_storage can reuse much of this
code.

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

---

 src/mesa/drivers/dri/i965/intel_tex_image.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index bcc0853018b..34491aa36ef 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -602,10 +602,11 @@ intelSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
 }
 
 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(struct gl_context *ctx, GLenum target,
+                           struct gl_texture_object *texObj,
+                           struct gl_texture_image *texImage,
+                           GLeglImageOES image_handle,
+                           bool storage)
 {
    struct brw_context *brw = brw_context(ctx);
    struct intel_mipmap_tree *mt;
@@ -652,6 +653,16 @@ intel_image_target_texture_2d(struct gl_context *ctx, GLenum target,
    intel_miptree_release(&mt);
 }
 
+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 bool
 intel_gettexsubimage_blorp(struct brw_context *brw,
                            struct gl_texture_image *tex_image,



More information about the mesa-commit mailing list