iris: Delete remnants of the unimplemented ASTC 5x5 workaround
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 23 Nov 2019 05:52:12 +0000 (21:52 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 4 Jan 2020 02:06:38 +0000 (18:06 -0800)
I copy and pasted some of the boilerplate but never the implementation.
For now, ASTC 5x5 is disabled and faked via uncompressed RGBA; let's
delete these remnants until such a time when we implement it properly.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/gallium/drivers/iris/iris_blit.c
src/gallium/drivers/iris/iris_resolve.c
src/gallium/drivers/iris/iris_resource.h
src/gallium/drivers/iris/iris_state.c

index 2d42089..e803950 100644 (file)
@@ -273,8 +273,6 @@ iris_blorp_surf_for_resource(struct iris_vtable *vtbl,
          .mocs = vtbl->mocs(res->aux.clear_color_bo, isl_dev),
       };
    }
-
-   // XXX: ASTC
 }
 
 static bool
@@ -354,7 +352,7 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
       iris_format_for_usage(devinfo, info->src.format,
                             ISL_SURF_USAGE_TEXTURE_BIT);
    enum isl_aux_usage src_aux_usage =
-      iris_resource_texture_aux_usage(ice, src_res, src_fmt.fmt, 0);
+      iris_resource_texture_aux_usage(ice, src_res, src_fmt.fmt);
 
    if (iris_resource_level_has_hiz(src_res, info->src.level))
       src_aux_usage = ISL_AUX_USAGE_NONE;
@@ -496,7 +494,7 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
          iris_format_for_usage(devinfo, src_res->base.format,
                                ISL_SURF_USAGE_TEXTURE_BIT);
       stc_src_aux_usage =
-         iris_resource_texture_aux_usage(ice, src_res, src_fmt.fmt, 0);
+         iris_resource_texture_aux_usage(ice, src_res, src_fmt.fmt);
 
       struct iris_format_info dst_fmt =
          iris_format_for_usage(devinfo, stc_dst->base.format,
index 752eeef..ddd86ea 100644 (file)
@@ -90,8 +90,6 @@ resolve_sampler_views(struct iris_context *ice,
 {
    uint32_t views = info ? (shs->bound_sampler_views & info->textures_used) : 0;
 
-   unsigned astc5x5_wa_bits = 0; // XXX: actual tracking
-
    while (views) {
       const int i = u_bit_scan(&views);
       struct iris_sampler_view *isv = shs->textures[i];
@@ -107,8 +105,7 @@ resolve_sampler_views(struct iris_context *ice,
          iris_resource_prepare_texture(ice, batch, res, isv->view.format,
                                        isv->view.base_level, isv->view.levels,
                                        isv->view.base_array_layer,
-                                       isv->view.array_len,
-                                       astc5x5_wa_bits);
+                                       isv->view.array_len);
       }
 
       iris_cache_flush_for_read(batch, res->bo);
@@ -177,8 +174,6 @@ iris_predraw_resolve_inputs(struct iris_context *ice,
       resolve_image_views(ice, batch, shs, draw_aux_buffer_disabled,
                           consider_framebuffer);
    }
-
-   // XXX: ASTC hacks
 }
 
 void
@@ -225,8 +220,7 @@ iris_predraw_resolve_framebuffer(struct iris_context *ice,
             iris_resource_prepare_texture(ice, batch, res, surf->view.format,
                                           surf->view.base_level, 1,
                                           surf->view.base_array_layer,
-                                          surf->view.array_len,
-                                          0);
+                                          surf->view.array_len);
          }
       }
    }
@@ -1338,22 +1332,11 @@ can_texture_with_ccs(const struct gen_device_info *devinfo,
 enum isl_aux_usage
 iris_resource_texture_aux_usage(struct iris_context *ice,
                                 const struct iris_resource *res,
-                                enum isl_format view_format,
-                                enum gen9_astc5x5_wa_tex_type astc5x5_wa_bits)
+                                enum isl_format view_format)
 {
    struct iris_screen *screen = (void *) ice->ctx.screen;
    struct gen_device_info *devinfo = &screen->devinfo;
 
-   assert(devinfo->gen == 9 || astc5x5_wa_bits == 0);
-
-   /* On gen9, ASTC 5x5 textures cannot live in the sampler cache along side
-    * CCS or HiZ compressed textures.  See gen9_apply_astc5x5_wa_flush() for
-    * details.
-    */
-   if ((astc5x5_wa_bits & GEN9_ASTC5X5_WA_TEX_TYPE_ASTC5x5) &&
-       res->aux.usage != ISL_AUX_USAGE_MCS)
-      return ISL_AUX_USAGE_NONE;
-
    switch (res->aux.usage) {
    case ISL_AUX_USAGE_HIZ:
       if (sample_with_depth_aux(devinfo, res))
@@ -1413,11 +1396,10 @@ iris_resource_prepare_texture(struct iris_context *ice,
                               struct iris_resource *res,
                               enum isl_format view_format,
                               uint32_t start_level, uint32_t num_levels,
-                              uint32_t start_layer, uint32_t num_layers,
-                              enum gen9_astc5x5_wa_tex_type astc5x5_wa_bits)
+                              uint32_t start_layer, uint32_t num_layers)
 {
    enum isl_aux_usage aux_usage =
-      iris_resource_texture_aux_usage(ice, res, view_format, astc5x5_wa_bits);
+      iris_resource_texture_aux_usage(ice, res, view_format);
 
    bool clear_supported = aux_usage != ISL_AUX_USAGE_NONE;
 
index 65809d8..ab09279 100644 (file)
@@ -42,11 +42,6 @@ struct iris_format_info {
 #define IRIS_RESOURCE_FLAG_SURFACE_MEMZONE (PIPE_RESOURCE_FLAG_DRV_PRIV << 1)
 #define IRIS_RESOURCE_FLAG_DYNAMIC_MEMZONE (PIPE_RESOURCE_FLAG_DRV_PRIV << 2)
 
-enum gen9_astc5x5_wa_tex_type {
-   GEN9_ASTC5X5_WA_TEX_TYPE_ASTC5x5 = 1 << 0,
-   GEN9_ASTC5X5_WA_TEX_TYPE_AUX     = 1 << 1,
-};
-
 /**
  * Resources represent a GPU buffer object or image (mipmap tree).
  *
@@ -453,15 +448,13 @@ uint32_t iris_resource_get_tile_offsets(const struct iris_resource *res,
                                         uint32_t *tile_x, uint32_t *tile_y);
 enum isl_aux_usage iris_resource_texture_aux_usage(struct iris_context *ice,
                                                    const struct iris_resource *res,
-                                                   enum isl_format view_fmt,
-                                                   enum gen9_astc5x5_wa_tex_type);
+                                                   enum isl_format view_fmt);
 void iris_resource_prepare_texture(struct iris_context *ice,
                                    struct iris_batch *batch,
                                    struct iris_resource *res,
                                    enum isl_format view_format,
                                    uint32_t start_level, uint32_t num_levels,
-                                   uint32_t start_layer, uint32_t num_layers,
-                                   enum gen9_astc5x5_wa_tex_type);
+                                   uint32_t start_layer, uint32_t num_layers);
 
 static inline bool
 iris_resource_unfinished_aux_import(struct iris_resource *res)
index 4fb36e7..a091776 100644 (file)
@@ -4596,9 +4596,8 @@ use_sampler_view(struct iris_context *ice,
                  struct iris_batch *batch,
                  struct iris_sampler_view *isv)
 {
-   // XXX: ASTC hacks
    enum isl_aux_usage aux_usage =
-      iris_resource_texture_aux_usage(ice, isv->res, isv->view.format, 0);
+      iris_resource_texture_aux_usage(ice, isv->res, isv->view.format);
 
    iris_use_pinned_bo(batch, isv->res->bo, false);
    iris_use_pinned_bo(batch, iris_resource_bo(isv->surface_state.ref.res), false);