• Home
  • Raw
  • Download

Lines Matching refs:zstex

647 static bool si_can_fast_clear_depth(struct si_texture *zstex, unsigned level, float depth,  in si_can_fast_clear_depth()  argument
652 si_htile_enabled(zstex, level, PIPE_MASK_Z) && in si_can_fast_clear_depth()
653 (!zstex->tc_compatible_htile || depth == 0 || depth == 1); in si_can_fast_clear_depth()
656 static bool si_can_fast_clear_stencil(struct si_texture *zstex, unsigned level, uint8_t stencil, in si_can_fast_clear_stencil() argument
661 si_htile_enabled(zstex, level, PIPE_MASK_S) && in si_can_fast_clear_stencil()
662 (!zstex->tc_compatible_htile || stencil == 0); in si_can_fast_clear_stencil()
903 struct si_texture *zstex = zsbuf ? (struct si_texture *)zsbuf->texture : NULL; in si_fast_clear() local
904 unsigned zs_num_layers = zstex ? util_num_layers(&zstex->buffer.b.b, zsbuf->u.tex.level) : 0; in si_fast_clear()
906 if (zstex && zsbuf->u.tex.first_layer == 0 && in si_fast_clear()
908 si_htile_enabled(zstex, zsbuf->u.tex.level, PIPE_MASK_ZS)) { in si_fast_clear()
915 if (zstex->enable_tc_compatible_htile_next_clear) { in si_fast_clear()
918 (*buffers & PIPE_CLEAR_DEPTH && (!zstex->surface.has_stencil || in si_fast_clear()
919 zstex->htile_stencil_disabled))) { in si_fast_clear()
921 assert(zstex->buffer.b.b.last_level == 0); in si_fast_clear()
922 assert(!zstex->tc_compatible_htile); in si_fast_clear()
925 zstex->enable_tc_compatible_htile_next_clear = false; in si_fast_clear()
926 zstex->tc_compatible_htile = true; in si_fast_clear()
939 if (zstex->htile_stencil_disabled || !zstex->surface.has_stencil) { in si_fast_clear()
940 if (si_can_fast_clear_depth(zstex, level, depth, *buffers)) { in si_fast_clear()
942 clear_value = si_get_htile_clear_value(zstex, depth); in si_fast_clear()
944 zstex->depth_cleared_level_mask_once |= BITFIELD_BIT(level); in si_fast_clear()
945 zstex->depth_cleared_level_mask |= BITFIELD_BIT(level); in si_fast_clear()
949 if (si_can_fast_clear_depth(zstex, level, depth, *buffers) && in si_fast_clear()
950 si_can_fast_clear_stencil(zstex, level, stencil, *buffers)) { in si_fast_clear()
952 clear_value = si_get_htile_clear_value(zstex, depth); in si_fast_clear()
954 zstex->depth_cleared_level_mask_once |= BITFIELD_BIT(level); in si_fast_clear()
955 zstex->depth_cleared_level_mask |= BITFIELD_BIT(level); in si_fast_clear()
956 zstex->stencil_cleared_level_mask_once |= BITFIELD_BIT(level); in si_fast_clear()
969 clear_value = !zstex->htile_stencil_disabled ? 0xfffff30f : 0xfffc000f; in si_fast_clear()
972 zstex->need_flush_after_depth_decompression = sctx->gfx_level == GFX10_3; in si_fast_clear()
975 si_init_buffer_clear(&info[num_clears++], &zstex->buffer.b.b, in si_fast_clear()
976 zstex->surface.meta_offset, zstex->surface.meta_size, clear_value); in si_fast_clear()
987 uint64_t htile_offset = zstex->surface.meta_offset; in si_fast_clear()
997 htile_offset += zstex->surface.u.gfx9.meta_levels[level].offset; in si_fast_clear()
998 htile_size = zstex->surface.u.gfx9.meta_levels[level].size; in si_fast_clear()
999 } else if (zstex->buffer.b.b.last_level == 0) { in si_fast_clear()
1001 htile_size = zstex->surface.meta_size; in si_fast_clear()
1007 if (zstex->buffer.b.b.last_level == 0) in si_fast_clear()
1008 htile_size = zstex->surface.meta_size; in si_fast_clear()
1012 if (zstex->htile_stencil_disabled || !zstex->surface.has_stencil) { in si_fast_clear()
1014 si_can_fast_clear_depth(zstex, level, depth, *buffers)) { in si_fast_clear()
1017 si_init_buffer_clear(&info[num_clears++], &zstex->buffer.b.b, htile_offset, in si_fast_clear()
1018 htile_size, si_get_htile_clear_value(zstex, depth)); in si_fast_clear()
1021 zstex->depth_cleared_level_mask_once |= BITFIELD_BIT(level); in si_fast_clear()
1022 zstex->depth_cleared_level_mask |= BITFIELD_BIT(level); in si_fast_clear()
1027 si_can_fast_clear_depth(zstex, level, depth, *buffers) && in si_fast_clear()
1028 si_can_fast_clear_stencil(zstex, level, stencil, *buffers)) { in si_fast_clear()
1031 si_init_buffer_clear(&info[num_clears++], &zstex->buffer.b.b, htile_offset, in si_fast_clear()
1032 htile_size, si_get_htile_clear_value(zstex, depth)); in si_fast_clear()
1035 zstex->depth_cleared_level_mask_once |= BITFIELD_BIT(level); in si_fast_clear()
1036 zstex->depth_cleared_level_mask |= BITFIELD_BIT(level); in si_fast_clear()
1037 zstex->stencil_cleared_level_mask_once |= BITFIELD_BIT(level); in si_fast_clear()
1053 si_can_fast_clear_depth(zstex, level, depth, *buffers)) { in si_fast_clear()
1056 si_init_buffer_clear_rmw(&info[num_clears++], &zstex->buffer.b.b, htile_offset, in si_fast_clear()
1057 htile_size, si_get_htile_clear_value(zstex, depth), in si_fast_clear()
1061 zstex->depth_cleared_level_mask_once |= BITFIELD_BIT(level); in si_fast_clear()
1062 zstex->depth_cleared_level_mask |= BITFIELD_BIT(level); in si_fast_clear()
1066 si_can_fast_clear_stencil(zstex, level, stencil, *buffers)) { in si_fast_clear()
1069 si_init_buffer_clear_rmw(&info[num_clears++], &zstex->buffer.b.b, htile_offset, in si_fast_clear()
1070 htile_size, si_get_htile_clear_value(zstex, depth), in si_fast_clear()
1074 zstex->stencil_cleared_level_mask_once |= BITFIELD_BIT(level); in si_fast_clear()
1079zstex->need_flush_after_depth_decompression = update_db_depth_clear && sctx->gfx_level == GFX10_3; in si_fast_clear()
1083 zstex->depth_clear_value[level] != (float)depth) { in si_fast_clear()
1084 zstex->depth_clear_value[level] = depth; in si_fast_clear()
1091 zstex->stencil_clear_value[level] != stencil) { in si_fast_clear()
1092 zstex->stencil_clear_value[level] = stencil; in si_fast_clear()
1109 struct si_texture *zstex = zsbuf ? (struct si_texture *)zsbuf->texture : NULL; in si_clear() local
1137 if (zstex && zsbuf->u.tex.first_layer == 0 && in si_clear()
1138 zsbuf->u.tex.last_layer == util_max_layer(&zstex->buffer.b.b, 0)) { in si_clear()
1141 if (si_can_fast_clear_depth(zstex, level, depth, buffers)) { in si_clear()
1144 if (!(zstex->depth_cleared_level_mask_once & BITFIELD_BIT(level)) || in si_clear()
1145 zstex->depth_clear_value[level] != depth) { in si_clear()
1149 if (zstex->depth_clear_value[level] != (float)depth) { in si_clear()
1150 if ((zstex->depth_clear_value[level] != 0) != (depth != 0)) { in si_clear()
1156 zstex->depth_clear_value[level] = depth; in si_clear()
1164 if (si_can_fast_clear_stencil(zstex, level, stencil, buffers)) { in si_clear()
1169 if (!(zstex->stencil_cleared_level_mask_once & BITFIELD_BIT(level)) || in si_clear()
1170 zstex->stencil_clear_value[level] != stencil) { in si_clear()
1174 if (zstex->stencil_clear_value[level] != (uint8_t)stencil) { in si_clear()
1176 zstex->stencil_clear_value[level] = stencil; in si_clear()
1203 zstex->depth_cleared_level_mask_once |= BITFIELD_BIT(zsbuf->u.tex.level); in si_clear()
1204 zstex->depth_cleared_level_mask |= BITFIELD_BIT(zsbuf->u.tex.level); in si_clear()
1211 zstex->stencil_cleared_level_mask_once |= BITFIELD_BIT(zsbuf->u.tex.level); in si_clear()