Lines Matching refs:sctx

193 void vi_dcc_clear_level(struct si_context *sctx,  in vi_dcc_clear_level()  argument
210 if (sctx->b.chip_class >= GFX9) { in vi_dcc_clear_level()
232 si_clear_buffer(&sctx->b.b, dcc_buffer, dcc_offset, clear_size, in vi_dcc_clear_level()
344 static void si_do_fast_color_clear(struct si_context *sctx, in si_do_fast_color_clear() argument
348 struct pipe_framebuffer_state *fb = &sctx->framebuffer.state; in si_do_fast_color_clear()
356 if (sctx->b.render_cond) in si_do_fast_color_clear()
398 if (sctx->b.chip_class == CIK && in si_do_fast_color_clear()
400 sctx->screen->info.drm_major == 2 && in si_do_fast_color_clear()
401 sctx->screen->info.drm_minor < 38) { in si_do_fast_color_clear()
408 if (sctx->b.chip_class >= VI && in si_do_fast_color_clear()
409 !(sctx->screen->debug_flags & DBG(NO_DCC_FB))) { in si_do_fast_color_clear()
410 vi_separate_dcc_try_enable(&sctx->b, tex); in si_do_fast_color_clear()
418 sctx->b.family == CHIP_STONEY) in si_do_fast_color_clear()
439 if (sctx->screen->debug_flags & DBG(NO_DCC_CLEAR)) in si_do_fast_color_clear()
443 if (sctx->b.chip_class == VI && in si_do_fast_color_clear()
461 si_clear_buffer(&sctx->b.b, &tex->cmask_buffer->b.b, in si_do_fast_color_clear()
467 vi_dcc_clear_level(sctx, tex, 0, reset_value); in si_do_fast_color_clear()
483 if (sctx->b.family == CHIP_STONEY) in si_do_fast_color_clear()
487 si_alloc_separate_cmask(sctx->screen, tex); in si_do_fast_color_clear()
493 si_clear_buffer(&sctx->b.b, &tex->cmask_buffer->b.b, in si_do_fast_color_clear()
502 p_atomic_inc(&sctx->screen->compressed_colortex_counter); in si_do_fast_color_clear()
506 si_set_optimal_micro_tile_mode(sctx->screen, tex); in si_do_fast_color_clear()
510 sctx->framebuffer.dirty_cbufs |= 1 << i; in si_do_fast_color_clear()
511 si_mark_atom_dirty(sctx, &sctx->framebuffer.atom); in si_do_fast_color_clear()
520 struct si_context *sctx = (struct si_context *)ctx; in si_clear() local
521 struct pipe_framebuffer_state *fb = &sctx->framebuffer.state; in si_clear()
527 si_do_fast_color_clear(sctx, &buffers, color); in si_clear()
563 sctx->db_depth_disable_expclear = true; in si_clear()
567 sctx->framebuffer.dirty_zsbuf = true; in si_clear()
568 si_mark_atom_dirty(sctx, &sctx->framebuffer.atom); /* updates DB_DEPTH_CLEAR */ in si_clear()
569 sctx->db_depth_clear = true; in si_clear()
570 si_mark_atom_dirty(sctx, &sctx->db_render_state); in si_clear()
581 sctx->db_stencil_disable_expclear = true; in si_clear()
585 sctx->framebuffer.dirty_zsbuf = true; in si_clear()
586 si_mark_atom_dirty(sctx, &sctx->framebuffer.atom); /* updates DB_STENCIL_CLEAR */ in si_clear()
587 sctx->db_stencil_clear = true; in si_clear()
588 si_mark_atom_dirty(sctx, &sctx->db_render_state); in si_clear()
602 if (sctx->screen->clear_db_cache_before_clear) { in si_clear()
603 sctx->b.flags |= SI_CONTEXT_FLUSH_AND_INV_DB; in si_clear()
608 util_blitter_clear(sctx->blitter, fb->width, fb->height, in si_clear()
613 if (sctx->db_depth_clear) { in si_clear()
614 sctx->db_depth_clear = false; in si_clear()
615 sctx->db_depth_disable_expclear = false; in si_clear()
617 si_mark_atom_dirty(sctx, &sctx->db_render_state); in si_clear()
620 if (sctx->db_stencil_clear) { in si_clear()
621 sctx->db_stencil_clear = false; in si_clear()
622 sctx->db_stencil_disable_expclear = false; in si_clear()
624 si_mark_atom_dirty(sctx, &sctx->db_render_state); in si_clear()
635 struct si_context *sctx = (struct si_context *)ctx; in si_clear_render_target() local
639 util_blitter_clear_render_target(sctx->blitter, dst, color, in si_clear_render_target()
653 struct si_context *sctx = (struct si_context *)ctx; in si_clear_depth_stencil() local
657 util_blitter_clear_depth_stencil(sctx->blitter, dst, clear_flags, depth, stencil, in si_clear_depth_stencil()
727 void si_init_clear_functions(struct si_context *sctx) in si_init_clear_functions() argument
729 sctx->b.b.clear = si_clear; in si_init_clear_functions()
730 sctx->b.b.clear_render_target = si_clear_render_target; in si_init_clear_functions()
731 sctx->b.b.clear_depth_stencil = si_clear_depth_stencil; in si_init_clear_functions()
732 sctx->b.b.clear_texture = si_clear_texture; in si_init_clear_functions()