• Home
  • Raw
  • Download

Lines Matching refs:sctx

216 bool vi_dcc_clear_level(struct si_context *sctx, struct si_texture *tex, unsigned level,  in vi_dcc_clear_level()  argument
232 if (sctx->chip_class >= GFX9) { in vi_dcc_clear_level()
261 si_clear_buffer(sctx, dcc_buffer, dcc_offset, clear_size, &clear_value, 4, SI_COHERENCY_CB_META, in vi_dcc_clear_level()
373 static void si_do_fast_color_clear(struct si_context *sctx, unsigned *buffers, in si_do_fast_color_clear() argument
376 struct pipe_framebuffer_state *fb = &sctx->framebuffer.state; in si_do_fast_color_clear()
384 if (sctx->render_cond) in si_do_fast_color_clear()
409 if (sctx->chip_class >= GFX9 && tex->buffer.b.b.last_level > 0) in si_do_fast_color_clear()
431 if (sctx->chip_class <= GFX8 && tex->surface.u.legacy.level[0].mode == RADEON_SURF_MODE_1D && in si_do_fast_color_clear()
432 !sctx->screen->info.htile_cmask_support_1d_tiling) in si_do_fast_color_clear()
449 if (sctx->family == CHIP_STONEY && !too_small) { in si_do_fast_color_clear()
450 vi_separate_dcc_try_enable(sctx, tex); in si_do_fast_color_clear()
465 if (sctx->screen->debug_flags & DBG(NO_DCC_CLEAR)) in si_do_fast_color_clear()
468 if (!vi_get_fast_clear_parameters(sctx->screen, tex->buffer.b.b.format, in si_do_fast_color_clear()
480 if (!vi_dcc_clear_level(sctx, tex, 0, reset_value)) in si_do_fast_color_clear()
489 si_clear_buffer(sctx, &tex->cmask_buffer->b.b, tex->surface.cmask_offset, in si_do_fast_color_clear()
503 if (sctx->family == CHIP_STONEY) in si_do_fast_color_clear()
511 si_alloc_separate_cmask(sctx->screen, tex); in si_do_fast_color_clear()
517 si_clear_buffer(sctx, &tex->cmask_buffer->b.b, tex->surface.cmask_offset, in si_do_fast_color_clear()
525 p_atomic_inc(&sctx->screen->compressed_colortex_counter); in si_do_fast_color_clear()
529 si_set_optimal_micro_tile_mode(sctx->screen, tex); in si_do_fast_color_clear()
536 if (sctx->screen->info.has_dcc_constant_encode && !eliminate_needed) in si_do_fast_color_clear()
540 sctx->framebuffer.dirty_cbufs |= 1 << i; in si_do_fast_color_clear()
541 si_mark_atom_dirty(sctx, &sctx->atoms.s.framebuffer); in si_do_fast_color_clear()
550 struct si_context *sctx = (struct si_context *)ctx; in si_clear() local
551 struct pipe_framebuffer_state *fb = &sctx->framebuffer.state; in si_clear()
557 si_do_fast_color_clear(sctx, &buffers, color); in si_clear()
590 sctx->framebuffer.DB_has_shader_readable_metadata = true; in si_clear()
591 sctx->framebuffer.dirty_zsbuf = true; in si_clear()
592 si_mark_atom_dirty(sctx, &sctx->atoms.s.framebuffer); in si_clear()
595 p_atomic_inc(&sctx->screen->dirty_tex_counter); in si_clear()
608 sctx->chip_class == GFX8 ? 0xfffff30f : 0xfffc000f; in si_clear()
609 si_clear_buffer(sctx, &zstex->buffer.b.b, zstex->surface.htile_offset, in si_clear()
620 sctx->db_depth_disable_expclear = true; in si_clear()
631 sctx->framebuffer.dirty_zsbuf = true; in si_clear()
632 si_mark_atom_dirty(sctx, &sctx->atoms.s.framebuffer); in si_clear()
634 sctx->db_depth_clear = true; in si_clear()
635 si_mark_atom_dirty(sctx, &sctx->atoms.s.db_render_state); in si_clear()
647 sctx->db_stencil_disable_expclear = true; in si_clear()
653 sctx->framebuffer.dirty_zsbuf = true; in si_clear()
654 si_mark_atom_dirty(sctx, &sctx->atoms.s.framebuffer); in si_clear()
656 sctx->db_stencil_clear = true; in si_clear()
657 si_mark_atom_dirty(sctx, &sctx->atoms.s.db_render_state); in si_clear()
661 sctx->flags |= SI_CONTEXT_FLUSH_AND_INV_DB; in si_clear()
664 si_blitter_begin(sctx, SI_CLEAR); in si_clear()
665 util_blitter_clear(sctx->blitter, fb->width, fb->height, util_framebuffer_get_num_layers(fb), in si_clear()
666 buffers, color, depth, stencil, sctx->framebuffer.nr_samples > 1); in si_clear()
667 si_blitter_end(sctx); in si_clear()
669 if (sctx->db_depth_clear) { in si_clear()
670 sctx->db_depth_clear = false; in si_clear()
671 sctx->db_depth_disable_expclear = false; in si_clear()
673 si_mark_atom_dirty(sctx, &sctx->atoms.s.db_render_state); in si_clear()
676 if (sctx->db_stencil_clear) { in si_clear()
677 sctx->db_stencil_clear = false; in si_clear()
678 sctx->db_stencil_disable_expclear = false; in si_clear()
680 si_mark_atom_dirty(sctx, &sctx->atoms.s.db_render_state); in si_clear()
689 struct si_context *sctx = (struct si_context *)ctx; in si_clear_render_target() local
698 si_blitter_begin(sctx, in si_clear_render_target()
700 util_blitter_clear_render_target(sctx->blitter, dst, color, dstx, dsty, width, height); in si_clear_render_target()
701 si_blitter_end(sctx); in si_clear_render_target()
709 struct si_context *sctx = (struct si_context *)ctx; in si_clear_depth_stencil() local
711 si_blitter_begin(sctx, in si_clear_depth_stencil()
713 util_blitter_clear_depth_stencil(sctx->blitter, dst, clear_flags, depth, stencil, dstx, dsty, in si_clear_depth_stencil()
715 si_blitter_end(sctx); in si_clear_depth_stencil()
766 void si_init_clear_functions(struct si_context *sctx) in si_init_clear_functions() argument
768 sctx->b.clear_render_target = si_clear_render_target; in si_init_clear_functions()
769 sctx->b.clear_texture = si_clear_texture; in si_init_clear_functions()
771 if (sctx->has_graphics) { in si_init_clear_functions()
772 sctx->b.clear = si_clear; in si_init_clear_functions()
773 sctx->b.clear_depth_stencil = si_clear_depth_stencil; in si_init_clear_functions()