• Home
  • Raw
  • Download

Lines Matching refs:softpipe

60    struct softpipe_context *softpipe = softpipe_context( pipe );  in softpipe_destroy()  local
64 if (softpipe->pstipple.sampler) in softpipe_destroy()
65 pipe->delete_sampler_state(pipe, softpipe->pstipple.sampler); in softpipe_destroy()
67 pipe_resource_reference(&softpipe->pstipple.texture, NULL); in softpipe_destroy()
68 pipe_sampler_view_reference(&softpipe->pstipple.sampler_view, NULL); in softpipe_destroy()
71 if (softpipe->blitter) { in softpipe_destroy()
72 util_blitter_destroy(softpipe->blitter); in softpipe_destroy()
75 if (softpipe->draw) in softpipe_destroy()
76 draw_destroy( softpipe->draw ); in softpipe_destroy()
78 if (softpipe->quad.shade) in softpipe_destroy()
79 softpipe->quad.shade->destroy( softpipe->quad.shade ); in softpipe_destroy()
81 if (softpipe->quad.depth_test) in softpipe_destroy()
82 softpipe->quad.depth_test->destroy( softpipe->quad.depth_test ); in softpipe_destroy()
84 if (softpipe->quad.blend) in softpipe_destroy()
85 softpipe->quad.blend->destroy( softpipe->quad.blend ); in softpipe_destroy()
87 if (softpipe->quad.pstipple) in softpipe_destroy()
88 softpipe->quad.pstipple->destroy( softpipe->quad.pstipple ); in softpipe_destroy()
90 if (softpipe->pipe.stream_uploader) in softpipe_destroy()
91 u_upload_destroy(softpipe->pipe.stream_uploader); in softpipe_destroy()
94 sp_destroy_tile_cache(softpipe->cbuf_cache[i]); in softpipe_destroy()
95 pipe_surface_reference(&softpipe->framebuffer.cbufs[i], NULL); in softpipe_destroy()
98 sp_destroy_tile_cache(softpipe->zsbuf_cache); in softpipe_destroy()
99 pipe_surface_reference(&softpipe->framebuffer.zsbuf, NULL); in softpipe_destroy()
101 for (sh = 0; sh < ARRAY_SIZE(softpipe->tex_cache); sh++) { in softpipe_destroy()
102 for (i = 0; i < ARRAY_SIZE(softpipe->tex_cache[0]); i++) { in softpipe_destroy()
103 sp_destroy_tex_tile_cache(softpipe->tex_cache[sh][i]); in softpipe_destroy()
104 pipe_sampler_view_reference(&softpipe->sampler_views[sh][i], NULL); in softpipe_destroy()
108 for (sh = 0; sh < ARRAY_SIZE(softpipe->constants); sh++) { in softpipe_destroy()
109 for (i = 0; i < ARRAY_SIZE(softpipe->constants[0]); i++) { in softpipe_destroy()
110 if (softpipe->constants[sh][i]) { in softpipe_destroy()
111 pipe_resource_reference(&softpipe->constants[sh][i], NULL); in softpipe_destroy()
116 for (i = 0; i < softpipe->num_vertex_buffers; i++) { in softpipe_destroy()
117 pipe_vertex_buffer_unreference(&softpipe->vertex_buffer[i]); in softpipe_destroy()
120 tgsi_exec_machine_destroy(softpipe->fs_machine); in softpipe_destroy()
123 FREE(softpipe->tgsi.sampler[i]); in softpipe_destroy()
124 FREE(softpipe->tgsi.image[i]); in softpipe_destroy()
125 FREE(softpipe->tgsi.buffer[i]); in softpipe_destroy()
128 FREE( softpipe ); in softpipe_destroy()
145 struct softpipe_context *softpipe = softpipe_context( pipe ); in softpipe_is_resource_referenced() local
152 if (softpipe->dirty_render_cache) { in softpipe_is_resource_referenced()
153 for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++) { in softpipe_is_resource_referenced()
154 if (softpipe->framebuffer.cbufs[i] && in softpipe_is_resource_referenced()
155 softpipe->framebuffer.cbufs[i]->texture == texture) { in softpipe_is_resource_referenced()
159 if (softpipe->framebuffer.zsbuf && in softpipe_is_resource_referenced()
160 softpipe->framebuffer.zsbuf->texture == texture) { in softpipe_is_resource_referenced()
166 for (sh = 0; sh < ARRAY_SIZE(softpipe->tex_cache); sh++) { in softpipe_is_resource_referenced()
167 for (i = 0; i < ARRAY_SIZE(softpipe->tex_cache[0]); i++) { in softpipe_is_resource_referenced()
168 if (softpipe->tex_cache[sh][i] && in softpipe_is_resource_referenced()
169 softpipe->tex_cache[sh][i]->texture == texture) in softpipe_is_resource_referenced()
186 struct softpipe_context *softpipe = softpipe_context( pipe ); in softpipe_render_condition() local
188 softpipe->render_cond_query = query; in softpipe_render_condition()
189 softpipe->render_cond_mode = mode; in softpipe_render_condition()
190 softpipe->render_cond_cond = condition; in softpipe_render_condition()
198 struct softpipe_context *softpipe = softpipe_context(pipe); in softpipe_set_debug_callback() local
201 softpipe->debug = *cb; in softpipe_set_debug_callback()
203 memset(&softpipe->debug, 0, sizeof(softpipe->debug)); in softpipe_set_debug_callback()
212 struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context); in softpipe_create_context() local
218 softpipe->tgsi.sampler[i] = sp_create_tgsi_sampler(); in softpipe_create_context()
222 softpipe->tgsi.image[i] = sp_create_tgsi_image(); in softpipe_create_context()
226 softpipe->tgsi.buffer[i] = sp_create_tgsi_buffer(); in softpipe_create_context()
229 softpipe->pipe.screen = screen; in softpipe_create_context()
230 softpipe->pipe.destroy = softpipe_destroy; in softpipe_create_context()
231 softpipe->pipe.priv = priv; in softpipe_create_context()
234 softpipe_init_blend_funcs(&softpipe->pipe); in softpipe_create_context()
235 softpipe_init_clip_funcs(&softpipe->pipe); in softpipe_create_context()
236 softpipe_init_query_funcs( softpipe ); in softpipe_create_context()
237 softpipe_init_rasterizer_funcs(&softpipe->pipe); in softpipe_create_context()
238 softpipe_init_sampler_funcs(&softpipe->pipe); in softpipe_create_context()
239 softpipe_init_shader_funcs(&softpipe->pipe); in softpipe_create_context()
240 softpipe_init_streamout_funcs(&softpipe->pipe); in softpipe_create_context()
241 softpipe_init_texture_funcs( &softpipe->pipe ); in softpipe_create_context()
242 softpipe_init_vertex_funcs(&softpipe->pipe); in softpipe_create_context()
243 softpipe_init_image_funcs(&softpipe->pipe); in softpipe_create_context()
245 softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state; in softpipe_create_context()
246 softpipe->pipe.set_debug_callback = softpipe_set_debug_callback; in softpipe_create_context()
248 softpipe->pipe.draw_vbo = softpipe_draw_vbo; in softpipe_create_context()
250 softpipe->pipe.launch_grid = softpipe_launch_grid; in softpipe_create_context()
252 softpipe->pipe.clear = softpipe_clear; in softpipe_create_context()
253 softpipe->pipe.flush = softpipe_flush_wrapped; in softpipe_create_context()
254 softpipe->pipe.texture_barrier = softpipe_texture_barrier; in softpipe_create_context()
255 softpipe->pipe.memory_barrier = softpipe_memory_barrier; in softpipe_create_context()
256 softpipe->pipe.render_condition = softpipe_render_condition; in softpipe_create_context()
263 softpipe->cbuf_cache[i] = sp_create_tile_cache( &softpipe->pipe ); in softpipe_create_context()
264 softpipe->zsbuf_cache = sp_create_tile_cache( &softpipe->pipe ); in softpipe_create_context()
267 for (sh = 0; sh < ARRAY_SIZE(softpipe->tex_cache); sh++) { in softpipe_create_context()
268 for (i = 0; i < ARRAY_SIZE(softpipe->tex_cache[0]); i++) { in softpipe_create_context()
269 softpipe->tex_cache[sh][i] = sp_create_tex_tile_cache(&softpipe->pipe); in softpipe_create_context()
270 if (!softpipe->tex_cache[sh][i]) in softpipe_create_context()
275 softpipe->fs_machine = tgsi_exec_machine_create(PIPE_SHADER_FRAGMENT); in softpipe_create_context()
278 softpipe->quad.shade = sp_quad_shade_stage(softpipe); in softpipe_create_context()
279 softpipe->quad.depth_test = sp_quad_depth_test_stage(softpipe); in softpipe_create_context()
280 softpipe->quad.blend = sp_quad_blend_stage(softpipe); in softpipe_create_context()
281 softpipe->quad.pstipple = sp_quad_polygon_stipple_stage(softpipe); in softpipe_create_context()
283 softpipe->pipe.stream_uploader = u_upload_create_default(&softpipe->pipe); in softpipe_create_context()
284 if (!softpipe->pipe.stream_uploader) in softpipe_create_context()
286 softpipe->pipe.const_uploader = softpipe->pipe.stream_uploader; in softpipe_create_context()
292 softpipe->draw = draw_create(&softpipe->pipe); in softpipe_create_context()
294 softpipe->draw = draw_create_no_llvm(&softpipe->pipe); in softpipe_create_context()
295 if (!softpipe->draw) in softpipe_create_context()
298 draw_texture_sampler(softpipe->draw, in softpipe_create_context()
301 softpipe->tgsi.sampler[PIPE_SHADER_VERTEX]); in softpipe_create_context()
303 draw_texture_sampler(softpipe->draw, in softpipe_create_context()
306 softpipe->tgsi.sampler[PIPE_SHADER_GEOMETRY]); in softpipe_create_context()
308 draw_image(softpipe->draw, in softpipe_create_context()
311 softpipe->tgsi.image[PIPE_SHADER_VERTEX]); in softpipe_create_context()
313 draw_image(softpipe->draw, in softpipe_create_context()
316 softpipe->tgsi.image[PIPE_SHADER_GEOMETRY]); in softpipe_create_context()
318 draw_buffer(softpipe->draw, in softpipe_create_context()
321 softpipe->tgsi.buffer[PIPE_SHADER_VERTEX]); in softpipe_create_context()
323 draw_buffer(softpipe->draw, in softpipe_create_context()
326 softpipe->tgsi.buffer[PIPE_SHADER_GEOMETRY]); in softpipe_create_context()
328 softpipe->vbuf_backend = sp_create_vbuf_backend(softpipe); in softpipe_create_context()
329 if (!softpipe->vbuf_backend) in softpipe_create_context()
332 softpipe->vbuf = draw_vbuf_stage(softpipe->draw, softpipe->vbuf_backend); in softpipe_create_context()
333 if (!softpipe->vbuf) in softpipe_create_context()
336 draw_set_rasterize_stage(softpipe->draw, softpipe->vbuf); in softpipe_create_context()
337 draw_set_render(softpipe->draw, softpipe->vbuf_backend); in softpipe_create_context()
339 softpipe->blitter = util_blitter_create(&softpipe->pipe); in softpipe_create_context()
340 if (!softpipe->blitter) { in softpipe_create_context()
345 util_blitter_cache_all_shaders(softpipe->blitter); in softpipe_create_context()
348 draw_install_aaline_stage(softpipe->draw, &softpipe->pipe); in softpipe_create_context()
349 draw_install_aapoint_stage(softpipe->draw, &softpipe->pipe); in softpipe_create_context()
353 draw_install_pstipple_stage(softpipe->draw, &softpipe->pipe); in softpipe_create_context()
356 draw_wide_point_sprites(softpipe->draw, TRUE); in softpipe_create_context()
358 sp_init_surface_functions(softpipe); in softpipe_create_context()
362 softpipe->pstipple.sampler = util_pstipple_create_sampler(&softpipe->pipe); in softpipe_create_context()
365 return &softpipe->pipe; in softpipe_create_context()
368 softpipe_destroy(&softpipe->pipe); in softpipe_create_context()