• Home
  • Raw
  • Download

Lines Matching refs:sctx

43 	struct si_context *sctx = (struct si_context *)context;  in si_destroy_context()  local
52 si_release_all_descriptors(sctx); in si_destroy_context()
54 if (sctx->ce_suballocator) in si_destroy_context()
55 u_suballocator_destroy(sctx->ce_suballocator); in si_destroy_context()
57 pipe_resource_reference(&sctx->esgs_ring, NULL); in si_destroy_context()
58 pipe_resource_reference(&sctx->gsvs_ring, NULL); in si_destroy_context()
59 pipe_resource_reference(&sctx->tf_ring, NULL); in si_destroy_context()
60 pipe_resource_reference(&sctx->tess_offchip_ring, NULL); in si_destroy_context()
61 pipe_resource_reference(&sctx->null_const_buf.buffer, NULL); in si_destroy_context()
62 r600_resource_reference(&sctx->border_color_buffer, NULL); in si_destroy_context()
63 free(sctx->border_color_table); in si_destroy_context()
64 r600_resource_reference(&sctx->scratch_buffer, NULL); in si_destroy_context()
65 r600_resource_reference(&sctx->compute_scratch_buffer, NULL); in si_destroy_context()
67 si_pm4_free_state(sctx, sctx->init_config, ~0); in si_destroy_context()
68 if (sctx->init_config_gs_rings) in si_destroy_context()
69 si_pm4_free_state(sctx, sctx->init_config_gs_rings, ~0); in si_destroy_context()
70 for (i = 0; i < ARRAY_SIZE(sctx->vgt_shader_config); i++) in si_destroy_context()
71 si_pm4_delete_state(sctx, vgt_shader_config, sctx->vgt_shader_config[i]); in si_destroy_context()
73 if (sctx->fixed_func_tcs_shader.cso) in si_destroy_context()
74 sctx->b.b.delete_tcs_state(&sctx->b.b, sctx->fixed_func_tcs_shader.cso); in si_destroy_context()
75 if (sctx->custom_dsa_flush) in si_destroy_context()
76 sctx->b.b.delete_depth_stencil_alpha_state(&sctx->b.b, sctx->custom_dsa_flush); in si_destroy_context()
77 if (sctx->custom_blend_resolve) in si_destroy_context()
78 sctx->b.b.delete_blend_state(&sctx->b.b, sctx->custom_blend_resolve); in si_destroy_context()
79 if (sctx->custom_blend_decompress) in si_destroy_context()
80 sctx->b.b.delete_blend_state(&sctx->b.b, sctx->custom_blend_decompress); in si_destroy_context()
81 if (sctx->custom_blend_fastclear) in si_destroy_context()
82 sctx->b.b.delete_blend_state(&sctx->b.b, sctx->custom_blend_fastclear); in si_destroy_context()
83 if (sctx->custom_blend_dcc_decompress) in si_destroy_context()
84 sctx->b.b.delete_blend_state(&sctx->b.b, sctx->custom_blend_dcc_decompress); in si_destroy_context()
86 if (sctx->blitter) in si_destroy_context()
87 util_blitter_destroy(sctx->blitter); in si_destroy_context()
89 r600_common_context_cleanup(&sctx->b); in si_destroy_context()
91 LLVMDisposeTargetMachine(sctx->tm); in si_destroy_context()
93 r600_resource_reference(&sctx->trace_buf, NULL); in si_destroy_context()
94 r600_resource_reference(&sctx->last_trace_buf, NULL); in si_destroy_context()
95 radeon_clear_saved_cs(&sctx->last_gfx); in si_destroy_context()
97 FREE(sctx); in si_destroy_context()
103 struct si_context *sctx = (struct si_context *)ctx; in si_amdgpu_get_reset_status() local
105 return sctx->b.ws->ctx_query_reset_status(sctx->b.ctx); in si_amdgpu_get_reset_status()
119 struct si_context *sctx = (struct si_context *)ctx; in si_emit_string_marker() local
121 dd_parse_apitrace_marker(string, len, &sctx->apitrace_call_number); in si_emit_string_marker()
144 struct si_context *sctx = CALLOC_STRUCT(si_context); in si_create_context() local
149 if (!sctx) in si_create_context()
158 sctx->b.b.screen = screen; /* this must be set first */ in si_create_context()
159 sctx->b.b.priv = priv; in si_create_context()
160 sctx->b.b.destroy = si_destroy_context; in si_create_context()
161 sctx->b.b.emit_string_marker = si_emit_string_marker; in si_create_context()
162 sctx->b.set_atom_dirty = (void *)si_set_atom_dirty; in si_create_context()
163 sctx->screen = sscreen; /* Easy accessing of screen/winsys. */ in si_create_context()
164 sctx->is_debug = (flags & PIPE_CONTEXT_DEBUG) != 0; in si_create_context()
166 if (!r600_common_context_init(&sctx->b, &sscreen->b, flags)) in si_create_context()
170 sctx->b.b.get_device_reset_status = si_amdgpu_get_reset_status; in si_create_context()
172 si_init_blit_functions(sctx); in si_create_context()
173 si_init_compute_functions(sctx); in si_create_context()
174 si_init_cp_dma_functions(sctx); in si_create_context()
175 si_init_debug_functions(sctx); in si_create_context()
178 sctx->b.b.create_video_codec = si_uvd_create_decoder; in si_create_context()
179 sctx->b.b.create_video_buffer = si_video_buffer_create; in si_create_context()
181 sctx->b.b.create_video_codec = vl_create_decoder; in si_create_context()
182 sctx->b.b.create_video_buffer = vl_video_buffer_create; in si_create_context()
185 sctx->b.gfx.cs = ws->cs_create(sctx->b.ctx, RING_GFX, in si_create_context()
186 si_context_gfx_flush, sctx); in si_create_context()
194 sctx->ce_ib = ws->cs_add_const_ib(sctx->b.gfx.cs); in si_create_context()
195 if (!sctx->ce_ib) in si_create_context()
199 sctx->ce_preamble_ib = in si_create_context()
200 ws->cs_add_const_preamble_ib(sctx->b.gfx.cs); in si_create_context()
202 if (!sctx->ce_preamble_ib) in si_create_context()
206 sctx->ce_suballocator = in si_create_context()
207 u_suballocator_create(&sctx->b.b, 1024 * 1024, in si_create_context()
209 if (!sctx->ce_suballocator) in si_create_context()
213 sctx->b.gfx.flush = si_context_gfx_flush; in si_create_context()
216 sctx->border_color_table = malloc(SI_MAX_BORDER_COLORS * in si_create_context()
217 sizeof(*sctx->border_color_table)); in si_create_context()
218 if (!sctx->border_color_table) in si_create_context()
221 sctx->border_color_buffer = (struct r600_resource*) in si_create_context()
224 sizeof(*sctx->border_color_table)); in si_create_context()
225 if (!sctx->border_color_buffer) in si_create_context()
228 sctx->border_color_map = in si_create_context()
229 ws->buffer_map(sctx->border_color_buffer->buf, in si_create_context()
231 if (!sctx->border_color_map) in si_create_context()
234 si_init_all_descriptors(sctx); in si_create_context()
235 si_init_state_functions(sctx); in si_create_context()
236 si_init_shader_functions(sctx); in si_create_context()
238 if (sctx->b.chip_class >= CIK) in si_create_context()
239 cik_init_sdma_functions(sctx); in si_create_context()
241 si_init_dma_functions(sctx); in si_create_context()
244 sctx->b.b.resource_copy_region = sctx->b.dma_copy; in si_create_context()
246 sctx->blitter = util_blitter_create(&sctx->b.b); in si_create_context()
247 if (sctx->blitter == NULL) in si_create_context()
249 sctx->blitter->draw_rectangle = r600_draw_rectangle; in si_create_context()
251 sctx->sample_mask.sample_mask = 0xffff; in si_create_context()
254 si_begin_new_cs(sctx); in si_create_context()
255 r600_query_init_backend_mask(&sctx->b); /* this emits commands and must be last */ in si_create_context()
259 if (sctx->b.chip_class == CIK) { in si_create_context()
260 sctx->null_const_buf.buffer = pipe_buffer_create(screen, PIPE_BIND_CONSTANT_BUFFER, in si_create_context()
262 if (!sctx->null_const_buf.buffer) in si_create_context()
264 sctx->null_const_buf.buffer_size = sctx->null_const_buf.buffer->width0; in si_create_context()
268 sctx->b.b.set_constant_buffer(&sctx->b.b, shader, i, in si_create_context()
269 &sctx->null_const_buf); in si_create_context()
273 si_set_rw_buffer(sctx, SI_HS_CONST_DEFAULT_TESS_LEVELS, in si_create_context()
274 &sctx->null_const_buf); in si_create_context()
275 si_set_rw_buffer(sctx, SI_VS_CONST_CLIP_PLANES, in si_create_context()
276 &sctx->null_const_buf); in si_create_context()
277 si_set_rw_buffer(sctx, SI_PS_CONST_POLY_STIPPLE, in si_create_context()
278 &sctx->null_const_buf); in si_create_context()
279 si_set_rw_buffer(sctx, SI_PS_CONST_SAMPLE_POSITIONS, in si_create_context()
280 &sctx->null_const_buf); in si_create_context()
283 sctx->b.clear_buffer(&sctx->b.b, sctx->null_const_buf.buffer, 0, in si_create_context()
284 sctx->null_const_buf.buffer->width0, 0, in si_create_context()
305 sctx->scratch_waves = MAX2(32 * sscreen->b.info.num_good_compute_units, in si_create_context()
308 sctx->tm = si_create_llvm_target_machine(sscreen); in si_create_context()
310 return &sctx->b.b; in si_create_context()
313 si_destroy_context(&sctx->b.b); in si_create_context()