Lines Matching refs:sctx
174 struct si_context *sctx = (struct si_context *)context; in si_destroy_context() local
184 si_release_all_descriptors(sctx); in si_destroy_context()
186 if (sctx->chip_class >= GFX10 && sctx->has_graphics) in si_destroy_context()
187 gfx10_destroy_query(sctx); in si_destroy_context()
189 pipe_resource_reference(&sctx->esgs_ring, NULL); in si_destroy_context()
190 pipe_resource_reference(&sctx->gsvs_ring, NULL); in si_destroy_context()
191 pipe_resource_reference(&sctx->tess_rings, NULL); in si_destroy_context()
192 pipe_resource_reference(&sctx->tess_rings_tmz, NULL); in si_destroy_context()
193 pipe_resource_reference(&sctx->null_const_buf.buffer, NULL); in si_destroy_context()
194 pipe_resource_reference(&sctx->sample_pos_buffer, NULL); in si_destroy_context()
195 si_resource_reference(&sctx->border_color_buffer, NULL); in si_destroy_context()
196 free(sctx->border_color_table); in si_destroy_context()
197 si_resource_reference(&sctx->scratch_buffer, NULL); in si_destroy_context()
198 si_resource_reference(&sctx->compute_scratch_buffer, NULL); in si_destroy_context()
199 si_resource_reference(&sctx->wait_mem_scratch, NULL); in si_destroy_context()
200 si_resource_reference(&sctx->wait_mem_scratch_tmz, NULL); in si_destroy_context()
201 si_resource_reference(&sctx->small_prim_cull_info_buf, NULL); in si_destroy_context()
203 if (sctx->cs_preamble_state) in si_destroy_context()
204 si_pm4_free_state(sctx, sctx->cs_preamble_state, ~0); in si_destroy_context()
205 if (sctx->cs_preamble_tess_rings) in si_destroy_context()
206 si_pm4_free_state(sctx, sctx->cs_preamble_tess_rings, ~0); in si_destroy_context()
207 if (sctx->cs_preamble_tess_rings_tmz) in si_destroy_context()
208 si_pm4_free_state(sctx, sctx->cs_preamble_tess_rings_tmz, ~0); in si_destroy_context()
209 if (sctx->cs_preamble_gs_rings) in si_destroy_context()
210 si_pm4_free_state(sctx, sctx->cs_preamble_gs_rings, ~0); in si_destroy_context()
211 for (i = 0; i < ARRAY_SIZE(sctx->vgt_shader_config); i++) in si_destroy_context()
212 si_pm4_delete_state(sctx, vgt_shader_config, sctx->vgt_shader_config[i]); in si_destroy_context()
214 if (sctx->fixed_func_tcs_shader.cso) in si_destroy_context()
215 sctx->b.delete_tcs_state(&sctx->b, sctx->fixed_func_tcs_shader.cso); in si_destroy_context()
216 if (sctx->custom_dsa_flush) in si_destroy_context()
217 sctx->b.delete_depth_stencil_alpha_state(&sctx->b, sctx->custom_dsa_flush); in si_destroy_context()
218 if (sctx->custom_blend_resolve) in si_destroy_context()
219 sctx->b.delete_blend_state(&sctx->b, sctx->custom_blend_resolve); in si_destroy_context()
220 if (sctx->custom_blend_fmask_decompress) in si_destroy_context()
221 sctx->b.delete_blend_state(&sctx->b, sctx->custom_blend_fmask_decompress); in si_destroy_context()
222 if (sctx->custom_blend_eliminate_fastclear) in si_destroy_context()
223 sctx->b.delete_blend_state(&sctx->b, sctx->custom_blend_eliminate_fastclear); in si_destroy_context()
224 if (sctx->custom_blend_dcc_decompress) in si_destroy_context()
225 sctx->b.delete_blend_state(&sctx->b, sctx->custom_blend_dcc_decompress); in si_destroy_context()
226 if (sctx->vs_blit_pos) in si_destroy_context()
227 sctx->b.delete_vs_state(&sctx->b, sctx->vs_blit_pos); in si_destroy_context()
228 if (sctx->vs_blit_pos_layered) in si_destroy_context()
229 sctx->b.delete_vs_state(&sctx->b, sctx->vs_blit_pos_layered); in si_destroy_context()
230 if (sctx->vs_blit_color) in si_destroy_context()
231 sctx->b.delete_vs_state(&sctx->b, sctx->vs_blit_color); in si_destroy_context()
232 if (sctx->vs_blit_color_layered) in si_destroy_context()
233 sctx->b.delete_vs_state(&sctx->b, sctx->vs_blit_color_layered); in si_destroy_context()
234 if (sctx->vs_blit_texcoord) in si_destroy_context()
235 sctx->b.delete_vs_state(&sctx->b, sctx->vs_blit_texcoord); in si_destroy_context()
236 if (sctx->cs_clear_buffer) in si_destroy_context()
237 sctx->b.delete_compute_state(&sctx->b, sctx->cs_clear_buffer); in si_destroy_context()
238 if (sctx->cs_copy_buffer) in si_destroy_context()
239 sctx->b.delete_compute_state(&sctx->b, sctx->cs_copy_buffer); in si_destroy_context()
240 if (sctx->cs_copy_image) in si_destroy_context()
241 sctx->b.delete_compute_state(&sctx->b, sctx->cs_copy_image); in si_destroy_context()
242 if (sctx->cs_copy_image_1d_array) in si_destroy_context()
243 sctx->b.delete_compute_state(&sctx->b, sctx->cs_copy_image_1d_array); in si_destroy_context()
244 if (sctx->cs_clear_render_target) in si_destroy_context()
245 sctx->b.delete_compute_state(&sctx->b, sctx->cs_clear_render_target); in si_destroy_context()
246 if (sctx->cs_clear_render_target_1d_array) in si_destroy_context()
247 sctx->b.delete_compute_state(&sctx->b, sctx->cs_clear_render_target_1d_array); in si_destroy_context()
248 if (sctx->cs_clear_12bytes_buffer) in si_destroy_context()
249 sctx->b.delete_compute_state(&sctx->b, sctx->cs_clear_12bytes_buffer); in si_destroy_context()
250 if (sctx->cs_dcc_decompress) in si_destroy_context()
251 sctx->b.delete_compute_state(&sctx->b, sctx->cs_dcc_decompress); in si_destroy_context()
252 if (sctx->cs_dcc_retile) in si_destroy_context()
253 sctx->b.delete_compute_state(&sctx->b, sctx->cs_dcc_retile); in si_destroy_context()
255 for (unsigned i = 0; i < ARRAY_SIZE(sctx->cs_fmask_expand); i++) { in si_destroy_context()
256 for (unsigned j = 0; j < ARRAY_SIZE(sctx->cs_fmask_expand[i]); j++) { in si_destroy_context()
257 if (sctx->cs_fmask_expand[i][j]) { in si_destroy_context()
258 sctx->b.delete_compute_state(&sctx->b, sctx->cs_fmask_expand[i][j]); in si_destroy_context()
263 if (sctx->blitter) in si_destroy_context()
264 util_blitter_destroy(sctx->blitter); in si_destroy_context()
267 for (int i = 0; i < ARRAY_SIZE(sctx->dcc_stats); i++) { in si_destroy_context()
268 assert(!sctx->dcc_stats[i].query_active); in si_destroy_context()
270 for (int j = 0; j < ARRAY_SIZE(sctx->dcc_stats[i].ps_stats); j++) in si_destroy_context()
271 if (sctx->dcc_stats[i].ps_stats[j]) in si_destroy_context()
272 sctx->b.destroy_query(&sctx->b, sctx->dcc_stats[i].ps_stats[j]); in si_destroy_context()
274 si_texture_reference(&sctx->dcc_stats[i].tex, NULL); in si_destroy_context()
277 if (sctx->query_result_shader) in si_destroy_context()
278 sctx->b.delete_compute_state(&sctx->b, sctx->query_result_shader); in si_destroy_context()
279 if (sctx->sh_query_result_shader) in si_destroy_context()
280 sctx->b.delete_compute_state(&sctx->b, sctx->sh_query_result_shader); in si_destroy_context()
282 if (sctx->gfx_cs) in si_destroy_context()
283 sctx->ws->cs_destroy(sctx->gfx_cs); in si_destroy_context()
284 if (sctx->sdma_cs) in si_destroy_context()
285 sctx->ws->cs_destroy(sctx->sdma_cs); in si_destroy_context()
286 if (sctx->ctx) in si_destroy_context()
287 sctx->ws->ctx_destroy(sctx->ctx); in si_destroy_context()
289 if (sctx->b.stream_uploader) in si_destroy_context()
290 u_upload_destroy(sctx->b.stream_uploader); in si_destroy_context()
291 if (sctx->b.const_uploader) in si_destroy_context()
292 u_upload_destroy(sctx->b.const_uploader); in si_destroy_context()
293 if (sctx->cached_gtt_allocator) in si_destroy_context()
294 u_upload_destroy(sctx->cached_gtt_allocator); in si_destroy_context()
296 slab_destroy_child(&sctx->pool_transfers); in si_destroy_context()
297 slab_destroy_child(&sctx->pool_transfers_unsync); in si_destroy_context()
299 if (sctx->allocator_zeroed_memory) in si_destroy_context()
300 u_suballocator_destroy(sctx->allocator_zeroed_memory); in si_destroy_context()
302 sctx->ws->fence_reference(&sctx->last_gfx_fence, NULL); in si_destroy_context()
303 sctx->ws->fence_reference(&sctx->last_sdma_fence, NULL); in si_destroy_context()
304 sctx->ws->fence_reference(&sctx->last_ib_barrier_fence, NULL); in si_destroy_context()
305 si_resource_reference(&sctx->eop_bug_scratch, NULL); in si_destroy_context()
306 si_resource_reference(&sctx->eop_bug_scratch_tmz, NULL); in si_destroy_context()
307 si_resource_reference(&sctx->index_ring, NULL); in si_destroy_context()
308 si_resource_reference(&sctx->barrier_buf, NULL); in si_destroy_context()
309 si_resource_reference(&sctx->last_ib_barrier_buf, NULL); in si_destroy_context()
310 si_resource_reference(&sctx->shadowed_regs, NULL); in si_destroy_context()
311 pb_reference(&sctx->gds, NULL); in si_destroy_context()
312 pb_reference(&sctx->gds_oa, NULL); in si_destroy_context()
314 si_destroy_compiler(&sctx->compiler); in si_destroy_context()
316 si_saved_cs_reference(&sctx->current_saved_cs, NULL); in si_destroy_context()
318 _mesa_hash_table_destroy(sctx->tex_handles, NULL); in si_destroy_context()
319 _mesa_hash_table_destroy(sctx->img_handles, NULL); in si_destroy_context()
321 util_dynarray_fini(&sctx->resident_tex_handles); in si_destroy_context()
322 util_dynarray_fini(&sctx->resident_img_handles); in si_destroy_context()
323 util_dynarray_fini(&sctx->resident_tex_needs_color_decompress); in si_destroy_context()
324 util_dynarray_fini(&sctx->resident_img_needs_color_decompress); in si_destroy_context()
325 util_dynarray_fini(&sctx->resident_tex_needs_depth_decompress); in si_destroy_context()
326 si_unref_sdma_uploads(sctx); in si_destroy_context()
327 free(sctx->sdma_uploads); in si_destroy_context()
328 FREE(sctx); in si_destroy_context()
333 struct si_context *sctx = (struct si_context *)ctx; in si_get_reset_status() local
334 struct si_screen *sscreen = sctx->screen; in si_get_reset_status()
335 enum pipe_reset_status status = sctx->ws->ctx_query_reset_status(sctx->ctx); in si_get_reset_status()
339 if (sctx->device_reset_callback.reset) { in si_get_reset_status()
340 sctx->device_reset_callback.reset(sctx->device_reset_callback.data, status); in si_get_reset_status()
364 struct si_context *sctx = (struct si_context *)ctx; in si_set_device_reset_callback() local
367 sctx->device_reset_callback = *cb; in si_set_device_reset_callback()
369 memset(&sctx->device_reset_callback, 0, sizeof(sctx->device_reset_callback)); in si_set_device_reset_callback()
382 struct si_context *sctx = (struct si_context *)ctx; in si_emit_string_marker() local
384 dd_parse_apitrace_marker(string, len, &sctx->apitrace_call_number); in si_emit_string_marker()
386 if (sctx->log) in si_emit_string_marker()
387 u_log_printf(sctx->log, "\nString marker: %*s\n", len, string); in si_emit_string_marker()
392 struct si_context *sctx = (struct si_context *)ctx; in si_set_debug_callback() local
393 struct si_screen *screen = sctx->screen; in si_set_debug_callback()
399 sctx->debug = *cb; in si_set_debug_callback()
401 memset(&sctx->debug, 0, sizeof(sctx->debug)); in si_set_debug_callback()
406 struct si_context *sctx = (struct si_context *)ctx; in si_set_log_context() local
407 sctx->log = log; in si_set_log_context()
410 u_log_add_auto_logger(log, si_auto_log_cs, sctx); in si_set_log_context()
428 struct si_context *sctx = (struct si_context *)ctx; in si_set_frontend_noop() local
431 sctx->is_noop = enable; in si_set_frontend_noop()
443 struct si_context *sctx = CALLOC_STRUCT(si_context); in si_create_context() local
448 if (!sctx) in si_create_context()
451 sctx->has_graphics = sscreen->info.chip_class == GFX6 || !(flags & PIPE_CONTEXT_COMPUTE_ONLY); in si_create_context()
456 sctx->b.screen = screen; /* this must be set first */ in si_create_context()
457 sctx->b.priv = NULL; in si_create_context()
458 sctx->b.destroy = si_destroy_context; in si_create_context()
459 sctx->screen = sscreen; /* Easy accessing of screen/winsys. */ in si_create_context()
460 sctx->is_debug = (flags & PIPE_CONTEXT_DEBUG) != 0; in si_create_context()
462 slab_create_child(&sctx->pool_transfers, &sscreen->pool_transfers); in si_create_context()
463 slab_create_child(&sctx->pool_transfers_unsync, &sscreen->pool_transfers); in si_create_context()
465 sctx->ws = sscreen->ws; in si_create_context()
466 sctx->family = sscreen->info.family; in si_create_context()
467 sctx->chip_class = sscreen->info.chip_class; in si_create_context()
469 if (sctx->chip_class == GFX7 || sctx->chip_class == GFX8 || sctx->chip_class == GFX9) { in si_create_context()
470 sctx->eop_bug_scratch = si_aligned_buffer_create( in si_create_context()
473 if (sctx->screen->info.has_tmz_support) in si_create_context()
474 sctx->eop_bug_scratch_tmz = si_aligned_buffer_create( in si_create_context()
477 if (!sctx->eop_bug_scratch) in si_create_context()
482 sctx->allocator_zeroed_memory = in si_create_context()
483 u_suballocator_create(&sctx->b, 128 * 1024, 0, PIPE_USAGE_DEFAULT, in si_create_context()
485 if (!sctx->allocator_zeroed_memory) in si_create_context()
488 sctx->b.stream_uploader = in si_create_context()
489 u_upload_create(&sctx->b, 1024 * 1024, 0, PIPE_USAGE_STREAM, SI_RESOURCE_FLAG_READ_ONLY); in si_create_context()
490 if (!sctx->b.stream_uploader) in si_create_context()
493 sctx->cached_gtt_allocator = u_upload_create(&sctx->b, 16 * 1024, 0, PIPE_USAGE_STAGING, 0); in si_create_context()
494 if (!sctx->cached_gtt_allocator) in si_create_context()
497 sctx->ctx = sctx->ws->ctx_create(sctx->ws); in si_create_context()
498 if (!sctx->ctx) in si_create_context()
517 sctx->sdma_cs = sctx->ws->cs_create(sctx->ctx, RING_DMA, (void *)si_flush_dma_cs, sctx, in si_create_context()
521 bool use_sdma_upload = sscreen->info.has_dedicated_vram && sctx->sdma_cs; in si_create_context()
522 sctx->b.const_uploader = in si_create_context()
523 u_upload_create(&sctx->b, 256 * 1024, 0, PIPE_USAGE_DEFAULT, in si_create_context()
526 if (!sctx->b.const_uploader) in si_create_context()
530 u_upload_enable_flush_explicit(sctx->b.const_uploader); in si_create_context()
532 sctx->gfx_cs = ws->cs_create(sctx->ctx, sctx->has_graphics ? RING_GFX : RING_COMPUTE, in si_create_context()
533 (void *)si_flush_gfx_cs, sctx, stop_exec_on_failure); in si_create_context()
536 sctx->border_color_table = malloc(SI_MAX_BORDER_COLORS * sizeof(*sctx->border_color_table)); in si_create_context()
537 if (!sctx->border_color_table) in si_create_context()
540 sctx->border_color_buffer = si_resource(pipe_buffer_create( in si_create_context()
541 screen, 0, PIPE_USAGE_DEFAULT, SI_MAX_BORDER_COLORS * sizeof(*sctx->border_color_table))); in si_create_context()
542 if (!sctx->border_color_buffer) in si_create_context()
545 sctx->border_color_map = in si_create_context()
546 ws->buffer_map(sctx->border_color_buffer->buf, NULL, PIPE_MAP_WRITE); in si_create_context()
547 if (!sctx->border_color_map) in si_create_context()
550 sctx->ngg = sscreen->use_ngg; in si_create_context()
553 if (sctx->chip_class >= GFX10) in si_create_context()
554 sctx->emit_cache_flush = gfx10_emit_cache_flush; in si_create_context()
556 sctx->emit_cache_flush = si_emit_cache_flush; in si_create_context()
558 sctx->b.emit_string_marker = si_emit_string_marker; in si_create_context()
559 sctx->b.set_debug_callback = si_set_debug_callback; in si_create_context()
560 sctx->b.set_log_context = si_set_log_context; in si_create_context()
561 sctx->b.set_context_param = si_set_context_param; in si_create_context()
562 sctx->b.get_device_reset_status = si_get_reset_status; in si_create_context()
563 sctx->b.set_device_reset_callback = si_set_device_reset_callback; in si_create_context()
564 sctx->b.set_frontend_noop = si_set_frontend_noop; in si_create_context()
566 si_init_all_descriptors(sctx); in si_create_context()
567 si_init_buffer_functions(sctx); in si_create_context()
568 si_init_clear_functions(sctx); in si_create_context()
569 si_init_blit_functions(sctx); in si_create_context()
570 si_init_compute_functions(sctx); in si_create_context()
571 si_init_compute_blit_functions(sctx); in si_create_context()
572 si_init_debug_functions(sctx); in si_create_context()
573 si_init_fence_functions(sctx); in si_create_context()
574 si_init_query_functions(sctx); in si_create_context()
575 si_init_state_compute_functions(sctx); in si_create_context()
576 si_init_context_texture_functions(sctx); in si_create_context()
579 if (sctx->has_graphics) { in si_create_context()
580 if (sctx->chip_class >= GFX10) in si_create_context()
581 gfx10_init_query(sctx); in si_create_context()
582 si_init_msaa_functions(sctx); in si_create_context()
583 si_init_shader_functions(sctx); in si_create_context()
584 si_init_state_functions(sctx); in si_create_context()
585 si_init_streamout_functions(sctx); in si_create_context()
586 si_init_viewport_functions(sctx); in si_create_context()
588 sctx->blitter = util_blitter_create(&sctx->b); in si_create_context()
589 if (sctx->blitter == NULL) in si_create_context()
591 sctx->blitter->skip_viewport_restore = true; in si_create_context()
594 sctx->noop_blend = util_blitter_get_noop_blend_state(sctx->blitter); in si_create_context()
595 sctx->queued.named.blend = sctx->noop_blend; in si_create_context()
597 sctx->noop_dsa = util_blitter_get_noop_dsa_state(sctx->blitter); in si_create_context()
598 sctx->queued.named.dsa = sctx->noop_dsa; in si_create_context()
600 sctx->discard_rasterizer_state = util_blitter_get_discard_rasterizer_state(sctx->blitter); in si_create_context()
601 sctx->queued.named.rasterizer = sctx->discard_rasterizer_state; in si_create_context()
603 si_init_draw_functions(sctx); in si_create_context()
608 &sctx->prim_discard_vertex_count_threshold, in si_create_context()
609 &sctx->index_ring_size_per_ib); in si_create_context()
611 sctx->prim_discard_vertex_count_threshold = UINT_MAX; in si_create_context()
615 if (sctx->chip_class >= GFX7) in si_create_context()
616 cik_init_sdma_functions(sctx); in si_create_context()
618 sctx->dma_copy = si_resource_copy_region; in si_create_context()
621 sctx->b.resource_copy_region = sctx->dma_copy; in si_create_context()
623 sctx->sample_mask = 0xffff; in si_create_context()
627 sctx->b.create_video_codec = si_uvd_create_decoder; in si_create_context()
628 sctx->b.create_video_buffer = si_video_buffer_create; in si_create_context()
630 sctx->b.create_video_codec = vl_create_decoder; in si_create_context()
631 sctx->b.create_video_buffer = vl_video_buffer_create; in si_create_context()
634 if (sctx->chip_class >= GFX9 || si_compute_prim_discard_enabled(sctx)) { in si_create_context()
635 sctx->wait_mem_scratch = in si_create_context()
640 if (!sctx->wait_mem_scratch) in si_create_context()
644 sctx->wait_mem_scratch_tmz = in si_create_context()
650 if (!sctx->wait_mem_scratch_tmz) in si_create_context()
657 if (sctx->chip_class == GFX7) { in si_create_context()
658 sctx->null_const_buf.buffer = in si_create_context()
662 sctx->screen->info.tcc_cache_line_size); in si_create_context()
663 if (!sctx->null_const_buf.buffer) in si_create_context()
665 sctx->null_const_buf.buffer_size = sctx->null_const_buf.buffer->width0; in si_create_context()
667 unsigned start_shader = sctx->has_graphics ? 0 : PIPE_SHADER_COMPUTE; in si_create_context()
670 sctx->b.set_constant_buffer(&sctx->b, shader, i, &sctx->null_const_buf); in si_create_context()
674 si_set_rw_buffer(sctx, SI_HS_CONST_DEFAULT_TESS_LEVELS, &sctx->null_const_buf); in si_create_context()
675 si_set_rw_buffer(sctx, SI_VS_CONST_INSTANCE_DIVISORS, &sctx->null_const_buf); in si_create_context()
676 si_set_rw_buffer(sctx, SI_VS_CONST_CLIP_PLANES, &sctx->null_const_buf); in si_create_context()
677 si_set_rw_buffer(sctx, SI_PS_CONST_POLY_STIPPLE, &sctx->null_const_buf); in si_create_context()
678 si_set_rw_buffer(sctx, SI_PS_CONST_SAMPLE_POSITIONS, &sctx->null_const_buf); in si_create_context()
697 sctx->scratch_waves = in si_create_context()
701 sctx->tex_handles = _mesa_hash_table_create(NULL, _mesa_hash_pointer, _mesa_key_pointer_equal); in si_create_context()
702 sctx->img_handles = _mesa_hash_table_create(NULL, _mesa_hash_pointer, _mesa_key_pointer_equal); in si_create_context()
704 util_dynarray_init(&sctx->resident_tex_handles, NULL); in si_create_context()
705 util_dynarray_init(&sctx->resident_img_handles, NULL); in si_create_context()
706 util_dynarray_init(&sctx->resident_tex_needs_color_decompress, NULL); in si_create_context()
707 util_dynarray_init(&sctx->resident_img_needs_color_decompress, NULL); in si_create_context()
708 util_dynarray_init(&sctx->resident_tex_needs_depth_decompress, NULL); in si_create_context()
710 sctx->sample_pos_buffer = in si_create_context()
711 pipe_buffer_create(sctx->b.screen, 0, PIPE_USAGE_DEFAULT, sizeof(sctx->sample_positions)); in si_create_context()
712 pipe_buffer_write(&sctx->b, sctx->sample_pos_buffer, 0, sizeof(sctx->sample_positions), in si_create_context()
713 &sctx->sample_positions); in si_create_context()
716 assert(sctx->gfx_cs->current.cdw == 0); in si_create_context()
718 if (sctx->has_graphics) { in si_create_context()
719 si_init_cp_reg_shadowing(sctx); in si_create_context()
722 si_begin_new_gfx_cs(sctx, true); in si_create_context()
723 assert(sctx->gfx_cs->current.cdw == sctx->initial_gfx_cs_size); in si_create_context()
726 if (sctx->wait_mem_scratch) in si_create_context()
727 si_cp_write_data(sctx, sctx->wait_mem_scratch, 0, 4, V_370_MEM, V_370_ME, in si_create_context()
728 &sctx->wait_mem_number); in si_create_context()
729 if (sctx->wait_mem_scratch_tmz) in si_create_context()
730 si_cp_write_data(sctx, sctx->wait_mem_scratch_tmz, 0, 4, V_370_MEM, V_370_ME, in si_create_context()
731 &sctx->wait_mem_number); in si_create_context()
733 if (sctx->chip_class == GFX7) { in si_create_context()
739 si_clear_buffer(sctx, sctx->null_const_buf.buffer, 0, sctx->null_const_buf.buffer->width0, in si_create_context()
743 sctx->initial_gfx_cs_size = sctx->gfx_cs->current.cdw; in si_create_context()
744 return &sctx->b; in si_create_context()
747 si_destroy_context(&sctx->b); in si_create_context()
868 struct si_context *sctx = (struct si_context *)ctx; in si_test_vmfault() local
879 si_cp_dma_copy_buffer(sctx, buf, buf, 0, 4, 4, 0, SI_COHERENCY_NONE, L2_BYPASS); in si_test_vmfault()
884 si_sdma_clear_buffer(sctx, buf, 0, 4, 0); in si_test_vmfault()
895 static void si_test_gds_memory_management(struct si_context *sctx, unsigned alloc_size, in si_test_gds_memory_management() argument
898 struct radeon_winsys *ws = sctx->ws; in si_test_gds_memory_management()
903 cs[i] = ws->cs_create(sctx->ctx, RING_COMPUTE, NULL, NULL, false); in si_test_gds_memory_management()
916 sctx, cs[i], NULL, 0, alloc_size, 0, in si_test_gds_memory_management()