[Mesa-dev] [PATCH 10/10] i965: Remove update_texture_surface()

Topi Pohjolainen topi.pohjolainen at intel.com
Wed Jul 1 04:46:40 PDT 2015


This is not needed anymore.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/i965/brw_context.h           |  7 ------
 src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 29 -----------------------
 src/mesa/drivers/dri/i965/gen8_surface_state.c    | 26 --------------------
 3 files changed, 62 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 4156cfb..8578e2f 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -980,13 +980,6 @@ struct brw_context
 
    struct
    {
-      void (*update_texture_surface)(struct gl_context *ctx,
-                                     const struct intel_mipmap_tree *mt,
-                                     struct gl_texture_object *tex_obj,
-                                     uint32_t tex_format, int swizzle,
-                                     uint32_t depth,
-                                     uint32_t *surf_offset,
-                                     bool for_gather);
       uint32_t (*update_renderbuffer_surface)(struct brw_context *brw,
                                               struct gl_renderbuffer *rb,
                                               bool layered, unsigned unit,
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
index bbc726e..02fda4b 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
@@ -347,34 +347,6 @@ gen7_emit_texture_surface_state(struct brw_context *brw,
    gen7_check_surface_setup(surf, false /* is_render_target */);
 }
 
-static void
-gen7_update_texture_surface(struct gl_context *ctx,
-                            const struct intel_mipmap_tree *mt,
-                            struct gl_texture_object *obj,
-                            uint32_t format, int swizzle, uint32_t depth,
-                            uint32_t *surf_offset,
-                            bool for_gather)
-{
-   struct brw_context *brw = brw_context(ctx);
-
-   if (obj->Target == GL_TEXTURE_BUFFER) {
-      brw_update_buffer_texture_surface(brw, obj, surf_offset);
-
-   } else {
-      struct intel_texture_object *intel_obj = intel_texture_object(obj);
-
-      if (for_gather && format == BRW_SURFACEFORMAT_R32G32_FLOAT)
-         format = BRW_SURFACEFORMAT_R32G32_FLOAT_LD;
-
-      gen7_emit_texture_surface_state(brw, mt, obj->Target,
-                                      obj->MinLayer, obj->MinLayer + depth,
-                                      obj->MinLevel + obj->BaseLevel,
-                                      obj->MinLevel + intel_obj->_MaxLevel + 1,
-                                      format, swizzle,
-                                      surf_offset, false, for_gather);
-   }
-}
-
 /**
  * Creates a null surface.
  *
@@ -545,7 +517,6 @@ gen7_update_renderbuffer_surface(struct brw_context *brw,
 void
 gen7_init_vtable_surface_functions(struct brw_context *brw)
 {
-   brw->vtbl.update_texture_surface = gen7_update_texture_surface;
    brw->vtbl.update_renderbuffer_surface = gen7_update_renderbuffer_surface;
    brw->vtbl.emit_null_surface_state = gen7_emit_null_surface_state;
    brw->vtbl.emit_texture_surface_state = gen7_emit_texture_surface_state;
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index 1e4ac22..aa66ffe 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -298,31 +298,6 @@ gen8_emit_texture_surface_state(struct brw_context *brw,
                            (rw ? I915_GEM_DOMAIN_SAMPLER : 0));
 }
 
-static void
-gen8_update_texture_surface(struct gl_context *ctx,
-                            const struct intel_mipmap_tree *mt,
-                            struct gl_texture_object *obj,
-                            uint32_t format, int swizzle, uint32_t depth,
-                            uint32_t *surf_offset,
-                            bool for_gather)
-{
-   struct brw_context *brw = brw_context(ctx);
-
-   if (obj->Target == GL_TEXTURE_BUFFER) {
-      brw_update_buffer_texture_surface(brw, obj, surf_offset);
-
-   } else {
-      struct intel_texture_object *intel_obj = intel_texture_object(obj);
-
-      gen8_emit_texture_surface_state(brw, mt, obj->Target,
-                                      obj->MinLayer, obj->MinLayer + depth,
-                                      obj->MinLevel + obj->BaseLevel,
-                                      obj->MinLevel + intel_obj->_MaxLevel + 1,
-                                      format, swizzle, surf_offset,
-                                      false, for_gather);
-   }
-}
-
 /**
  * Creates a null surface.
  *
@@ -505,7 +480,6 @@ gen8_update_renderbuffer_surface(struct brw_context *brw,
 void
 gen8_init_vtable_surface_functions(struct brw_context *brw)
 {
-   brw->vtbl.update_texture_surface = gen8_update_texture_surface;
    brw->vtbl.update_renderbuffer_surface = gen8_update_renderbuffer_surface;
    brw->vtbl.emit_null_surface_state = gen8_emit_null_surface_state;
    brw->vtbl.emit_texture_surface_state = gen8_emit_texture_surface_state;
-- 
1.9.3



More information about the mesa-dev mailing list