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>
.mocs = vtbl->mocs(res->aux.clear_color_bo, isl_dev),
};
}
-
- // XXX: ASTC
}
static bool
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;
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,
{
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];
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);
resolve_image_views(ice, batch, shs, draw_aux_buffer_disabled,
consider_framebuffer);
}
-
- // XXX: ASTC hacks
}
void
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);
}
}
}
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))
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;
#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).
*
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)
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);