~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/drivers/llvmpipe/lp_context.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
   if (llvmpipe->csctx) {
65
65
      lp_csctx_destroy(llvmpipe->csctx);
66
66
   }
 
67
   if (llvmpipe->task_ctx) {
 
68
      lp_csctx_destroy(llvmpipe->task_ctx);
 
69
   }
 
70
   if (llvmpipe->mesh_ctx) {
 
71
      lp_csctx_destroy(llvmpipe->mesh_ctx);
 
72
   }
67
73
   if (llvmpipe->blitter) {
68
74
      util_blitter_destroy(llvmpipe->blitter);
69
75
   }
78
84
 
79
85
   util_unreference_framebuffer_state(&llvmpipe->framebuffer);
80
86
 
81
 
   for (enum pipe_shader_type s = PIPE_SHADER_VERTEX; s < PIPE_SHADER_TYPES; s++) {
 
87
   for (enum pipe_shader_type s = PIPE_SHADER_VERTEX; s < PIPE_SHADER_MESH_TYPES; s++) {
82
88
      for (i = 0; i < ARRAY_SIZE(llvmpipe->sampler_views[0]); i++) {
83
89
         pipe_sampler_view_reference(&llvmpipe->sampler_views[s][i], NULL);
84
90
      }
99
105
 
100
106
   lp_delete_setup_variants(llvmpipe);
101
107
 
 
108
   llvmpipe_sampler_matrix_destroy(llvmpipe);
 
109
 
102
110
#ifndef USE_GLOBAL_LLVM_CONTEXT
103
111
   LLVMContextDispose(llvmpipe->context);
104
112
#endif
240
248
   llvmpipe_init_vs_funcs(llvmpipe);
241
249
   llvmpipe_init_gs_funcs(llvmpipe);
242
250
   llvmpipe_init_tess_funcs(llvmpipe);
 
251
   llvmpipe_init_task_funcs(llvmpipe);
 
252
   llvmpipe_init_mesh_funcs(llvmpipe);
243
253
   llvmpipe_init_rasterizer_funcs(llvmpipe);
244
254
   llvmpipe_init_context_resource_funcs(&llvmpipe->pipe);
245
255
   llvmpipe_init_surface_functions(llvmpipe);
246
256
 
 
257
   llvmpipe_init_sampler_matrix(llvmpipe);
 
258
 
247
259
#ifdef USE_GLOBAL_LLVM_CONTEXT
248
260
   llvmpipe->context = LLVMGetGlobalContext();
249
261
#else
283
295
   if (!llvmpipe->csctx)
284
296
      goto fail;
285
297
 
 
298
   llvmpipe->task_ctx = lp_csctx_create(&llvmpipe->pipe);
 
299
   if (!llvmpipe->task_ctx)
 
300
      goto fail;
 
301
 
 
302
   llvmpipe->mesh_ctx = lp_csctx_create(&llvmpipe->pipe);
 
303
   if (!llvmpipe->mesh_ctx)
 
304
      goto fail;
 
305
 
286
306
   llvmpipe->pipe.stream_uploader = u_upload_create_default(&llvmpipe->pipe);
287
307
   if (!llvmpipe->pipe.stream_uploader)
288
308
      goto fail;
305
325
   /* convert points and lines into triangles:
306
326
    * (otherwise, draw points and lines natively)
307
327
    */
308
 
   draw_wide_point_sprites(llvmpipe->draw, FALSE);
309
 
   draw_enable_point_sprites(llvmpipe->draw, FALSE);
 
328
   draw_wide_point_sprites(llvmpipe->draw, false);
 
329
   draw_enable_point_sprites(llvmpipe->draw, false);
310
330
   draw_wide_point_threshold(llvmpipe->draw, 10000.0);
311
331
   draw_wide_line_threshold(llvmpipe->draw, 10000.0);
312
332
 
313
333
   /* initial state for clipping - enabled, with no guardband */
314
 
   draw_set_driver_clipping(llvmpipe->draw, FALSE, FALSE, FALSE, TRUE);
 
334
   draw_set_driver_clipping(llvmpipe->draw, false, false, false, true);
315
335
 
316
336
   lp_reset_counters();
317
337