Home | History | Annotate | Download | only in radeonsi

Lines Matching refs:sctx

53 	struct si_context *sctx = (struct si_context *)ctx;
55 util_blitter_save_vertex_buffer_slot(sctx->blitter, sctx->vertex_buffer);
56 util_blitter_save_vertex_elements(sctx->blitter, sctx->vertex_elements);
57 util_blitter_save_vertex_shader(sctx->blitter, sctx->vs_shader.cso);
58 util_blitter_save_tessctrl_shader(sctx->blitter, sctx->tcs_shader.cso);
59 util_blitter_save_tesseval_shader(sctx->blitter, sctx->tes_shader.cso);
60 util_blitter_save_geometry_shader(sctx->blitter, sctx->gs_shader.cso);
61 util_blitter_save_so_targets(sctx->blitter, sctx->b.streamout.num_targets,
62 (struct pipe_stream_output_target**)sctx->b.streamout.targets);
63 util_blitter_save_rasterizer(sctx->blitter, sctx->queued.named.rasterizer);
66 util_blitter_save_blend(sctx->blitter, sctx->queued.named.blend);
67 util_blitter_save_depth_stencil_alpha(sctx->blitter, sctx->queued.named.dsa);
68 util_blitter_save_stencil_ref(sctx->blitter, &sctx->stencil_ref.state);
69 util_blitter_save_fragment_shader(sctx->blitter, sctx->ps_shader.cso);
70 util_blitter_save_sample_mask(sctx->blitter, sctx->sample_mask.sample_mask);
71 util_blitter_save_viewport(sctx->blitter, &sctx->b.viewports.states[0]);
72 util_blitter_save_scissor(sctx->blitter, &sctx->b.scissors.states[0]);
76 util_blitter_save_framebuffer(sctx->blitter, &sctx->framebuffer.state);
80 sctx->blitter, 2,
81 (void**)sctx->samplers[PIPE_SHADER_FRAGMENT].views.sampler_states);
83 util_blitter_save_fragment_sampler_views(sctx->blitter, 2,
84 sctx->samplers[PIPE_SHADER_FRAGMENT].views.views);
88 sctx->b.render_cond_force_off = true;
93 struct si_context *sctx = (struct si_context *)ctx;
95 sctx->b.render_cond_force_off = false;
104 si_blit_dbcb_copy(struct si_context *sctx,
116 sctx->dbcb_depth_copy_enabled = true;
118 sctx->dbcb_stencil_copy_enabled = true;
119 si_mark_atom_dirty(sctx, &sctx->db_render_state);
121 assert(sctx->dbcb_depth_copy_enabled || sctx->dbcb_stencil_copy_enabled);
140 zsurf = sctx->b.b.create_surface(&sctx->b.b, &src->resource.b.b, &surf_tmpl);
143 cbsurf = sctx->b.b.create_surface(&sctx->b.b, &dst->resource.b.b, &surf_tmpl);
146 if (sample != sctx->dbcb_copy_sample) {
147 sctx->dbcb_copy_sample = sample;
148 si_mark_atom_dirty(sctx, &sctx->db_render_state);
151 si_blitter_begin(&sctx->b.b, SI_DECOMPRESS);
152 util_blitter_custom_depth_stencil(sctx->blitter, zsurf, cbsurf, 1 << sample,
153 sctx->custom_dsa_flush, 1.0f);
154 si_blitter_end(&sctx->b.b);
166 sctx->dbcb_depth_copy_enabled = false;
167 sctx->dbcb_stencil_copy_enabled = false;
168 si_mark_atom_dirty(sctx, &sctx->db_render_state);
201 si_blit_decompress_zs_planes_in_place(struct si_context *sctx,
214 sctx->db_flush_stencil_inplace = true;
216 sctx->db_flush_depth_inplace = true;
217 si_mark_atom_dirty(sctx, &sctx->db_render_state);
235 zsurf = sctx->b.b.create_surface(&sctx->b.b, &texture->resource.b.b, &surf_tmpl);
237 si_blitter_begin(&sctx->b.b, SI_DECOMPRESS);
238 util_blitter_custom_depth_stencil(sctx->blitter, zsurf, NULL, ~0,
239 sctx->custom_dsa_flush,
241 si_blitter_end(&sctx->b.b);
258 sctx->db_flush_depth_inplace = false;
259 sctx->db_flush_stencil_inplace = false;
260 si_mark_atom_dirty(sctx, &sctx->db_render_state);
267 si_blit_decompress_zs_in_place(struct si_context *sctx,
277 sctx, texture, PIPE_MASK_Z | PIPE_MASK_S,
287 sctx, texture, PIPE_MASK_Z,
294 sctx, texture, PIPE_MASK_S,
301 si_flush_depth_texture(struct si_context *sctx,
341 r600_init_flushed_depth_texture(&sctx->b.b, &tex->resource.b.b, NULL))) {
361 sctx, tex, dst, copy_planes, levels,
373 sctx, tex,
380 si_flush_depth_textures(struct si_context *sctx,
401 sctx, tex,
414 struct si_context *sctx = (struct si_context *)ctx;
426 custom_blend = sctx->custom_blend_dcc_decompress;
435 custom_blend = sctx->custom_blend_decompress;
437 custom_blend = sctx->custom_blend_fastclear;
458 util_blitter_custom_color(sctx->blitter, cbsurf, custom_blend);
473 si_decompress_sampler_color_textures(struct si_context *sctx,
493 si_blit_decompress_color(&sctx->b.b, tex,
501 si_decompress_image_color_textures(struct si_context *sctx,
520 si_blit_decompress_color(&sctx->b.b, tex,
527 static void si_check_render_feedback_textures(struct si_context *sctx,
547 for (unsigned j = 0; j < sctx->framebuffer.state.nr_cbufs; ++j) {
550 if (!sctx->framebuffer.state.cbufs[j])
553 surf = (struct r600_surface*)sctx->framebuffer.state.cbufs[j];
564 r600_texture_disable_dcc(&sctx->b, tex);
568 static void si_check_render_feedback_images(struct si_context *sctx,
588 for (unsigned j = 0; j < sctx->framebuffer.state.nr_cbufs; ++j) {
591 if (!sctx->framebuffer.state.cbufs[j])
594 surf = (struct r600_surface*)sctx->framebuffer.state.cbufs[j];
604 r600_texture_disable_dcc(&sctx->b, tex);
608 static void si_check_render_feedback(struct si_context *sctx)
611 if (!sctx->need_check_render_feedback)
615 si_check_render_feedback_images(sctx, &sctx->images[i]);
616 si_check_render_feedback_textures(sctx, &sctx->samplers[i]);
618 sctx->need_check_render_feedback = false;
621 static void si_decompress_textures(struct si_context *sctx, unsigned shader_mask)
625 if (sctx->blitter->running)
629 compressed_colortex_counter = p_atomic_read(&sctx->screen->b.compressed_colortex_counter);
630 if (compressed_colortex_counter != sctx->b.last_compressed_colortex_counter) {
631 sctx->b.last_compressed_colortex_counter = compressed_colortex_counter;
632 si_update_compressed_colortex_masks(sctx);
636 mask = sctx->compressed_tex_shader_mask & shader_mask;
640 if (sctx->samplers[i].depth_texture_mask) {
641 si_flush_depth_textures(sctx, &sctx->samplers[i]);
643 if (sctx->samplers[i].compressed_colortex_mask) {
644 si_decompress_sampler_color_textures(sctx, &sctx->samplers[i]);
646 if (sctx->images[i].compressed_colortex_mask) {
647 si_decompress_image_color_textures(sctx, &sctx->images[i]);
651 si_check_render_feedback(sctx);
654 void si_decompress_graphics_textures(struct si_context *sctx)
656 si_decompress_textures(sctx, u_bit_consecutive(0, SI_NUM_GRAPHICS_SHADERS));
659 void si_decompress_compute_textures(struct si_context *sctx)
661 si_decompress_textures(sctx, 1 << PIPE_SHADER_COMPUTE);
668 struct si_context *sctx = (struct si_context *)ctx;
669 struct pipe_framebuffer_state *fb = &sctx->framebuffer.state;
675 evergreen_do_fast_color_clear(&sctx->b, fb,
676 &sctx->framebuffer.atom, &buffers,
677 &sctx->framebuffer.dirty_cbufs,
714 sctx->db_depth_disable_expclear = true;
718 sctx->framebuffer.dirty_zsbuf = true;
719 si_mark_atom_dirty(sctx, &sctx->framebuffer.atom); /* updates DB_DEPTH_CLEAR */
720 sctx->db_depth_clear = true;
721 si_mark_atom_dirty(sctx, &sctx->db_render_state);
732 sctx->db_stencil_disable_expclear = true;
736 sctx->framebuffer.dirty_zsbuf = true;
737 si_mark_atom_dirty(sctx, &sctx->framebuffer.atom); /* updates DB_STENCIL_CLEAR */
738 sctx->db_stencil_clear = true;
739 si_mark_atom_dirty(sctx, &sctx->db_render_state);
744 util_blitter_clear(sctx->blitter, fb->width, fb->height,
749 if (sctx->db_depth_clear) {
750 sctx->db_depth_clear = false;
751 sctx->db_depth_disable_expclear = false;
753 si_mark_atom_dirty(sctx, &sctx->db_render_state);
756 if (sctx->db_stencil_clear) {
757 sctx->db_stencil_clear = false;
758 sctx->db_stencil_disable_expclear = false;
760 si_mark_atom_dirty(sctx, &sctx->db_render_state);
771 struct si_context *sctx = (struct si_context *)ctx;
775 util_blitter_clear_render_target(sctx->blitter, dst, color,
789 struct si_context *sctx = (struct si_context *)ctx;
793 util_blitter_clear_depth_stencil(sctx->blitter, dst, clear_flags, depth, stencil,
807 struct si_context *sctx = (struct si_context *)ctx;
816 si_flush_depth_texture(sctx, rtex, planes,
843 struct si_context *sctx = (struct si_context *)ctx;
853 si_copy_buffer(sctx, dst, src, dstx, src_box->x, src_box->width, 0);
899 } else if (!util_blitter_is_copy_supported(sctx->blitter, dst, src) ||
961 util_blitter_blit_generic(sctx->blitter, dst_view, &dstbox,
974 struct si_context *sctx = (struct si_context*)ctx;
1038 vi_dcc_clear_level(&sctx->b, dst, info->dst.level,
1046 util_blitter_custom_resolve_color(sctx->blitter,
1050 sample_mask, sctx->custom_blend_resolve,
1088 util_blitter_custom_resolve_color(sctx->blitter, tmp, 0, 0,
1090 sample_mask, sctx->custom_blend_resolve,
1101 util_blitter_blit(sctx->blitter, &blit);
1111 struct si_context *sctx = (struct si_context*)ctx;
1125 sctx->b.dma_copy &&
1127 sctx->b.dma_copy(ctx, info->dst.resource, info->dst.level,
1135 assert(util_blitter_is_blit_supported(sctx->blitter, info));
1139 vi_dcc_disable_if_incompatible_format(&sctx->b, info->src.resource,
1142 vi_dcc_disable_if_incompatible_format(&sctx->b, info->dst.resource,
1150 if (sctx->screen->b.debug_flags & DBG_FORCE_DMA &&
1156 util_blitter_blit(sctx->blitter, info);
1166 struct si_context *sctx = (struct si_context*)ctx;
1169 if (!util_blitter_is_copy_supported(sctx->blitter, tex, tex))
1174 vi_dcc_disable_if_incompatible_format(&sctx->b, tex, base_level,
1185 util_blitter_generate_mipmap(sctx->blitter, tex, format,
1235 struct si_context *sctx = (struct si_context*)ctx;
1261 util_blitter_clear_buffer(sctx->blitter, dst, offset,
1285 sctx->b.clear_buffer(ctx, dst, offset, size, dword_value,
1289 void si_init_blit_functions(struct si_context *sctx)
1291 sctx->b.b.clear = si_clear;
1292 sctx->b.b.clear_buffer = si_pipe_clear_buffer;
1293 sctx->b.b.clear_render_target = si_clear_render_target;
1294 sctx->b.b.clear_depth_stencil = si_clear_depth_stencil;
1295 sctx->b.b.resource_copy_region = si_resource_copy_region;
1296 sctx->b.b.blit = si_blit;
1297 sctx->b.b.flush_resource = si_flush_resource;
1298 sctx->b.b.generate_mipmap = si_generate_mipmap;
1299 sctx->b.blit_decompress_depth = si_blit_decompress_depth;
1300 sctx->b.decompress_dcc = si_decompress_dcc;