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()
200 struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context); in softpipe_create_context() local
206 softpipe->tgsi.sampler[i] = sp_create_tgsi_sampler(); in softpipe_create_context()
210 softpipe->tgsi.image[i] = sp_create_tgsi_image(); in softpipe_create_context()
214 softpipe->tgsi.buffer[i] = sp_create_tgsi_buffer(); in softpipe_create_context()
217 softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE ); in softpipe_create_context()
218 softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", FALSE ); in softpipe_create_context()
219 softpipe->dump_cs = debug_get_bool_option( "SOFTPIPE_DUMP_CS", FALSE ); in softpipe_create_context()
221 softpipe->pipe.screen = screen; in softpipe_create_context()
222 softpipe->pipe.destroy = softpipe_destroy; in softpipe_create_context()
223 softpipe->pipe.priv = priv; in softpipe_create_context()
226 softpipe_init_blend_funcs(&softpipe->pipe); in softpipe_create_context()
227 softpipe_init_clip_funcs(&softpipe->pipe); in softpipe_create_context()
228 softpipe_init_query_funcs( softpipe ); in softpipe_create_context()
229 softpipe_init_rasterizer_funcs(&softpipe->pipe); in softpipe_create_context()
230 softpipe_init_sampler_funcs(&softpipe->pipe); in softpipe_create_context()
231 softpipe_init_shader_funcs(&softpipe->pipe); in softpipe_create_context()
232 softpipe_init_streamout_funcs(&softpipe->pipe); in softpipe_create_context()
233 softpipe_init_texture_funcs( &softpipe->pipe ); in softpipe_create_context()
234 softpipe_init_vertex_funcs(&softpipe->pipe); in softpipe_create_context()
235 softpipe_init_image_funcs(&softpipe->pipe); in softpipe_create_context()
237 softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state; in softpipe_create_context()
239 softpipe->pipe.draw_vbo = softpipe_draw_vbo; in softpipe_create_context()
241 softpipe->pipe.launch_grid = softpipe_launch_grid; in softpipe_create_context()
243 softpipe->pipe.clear = softpipe_clear; in softpipe_create_context()
244 softpipe->pipe.flush = softpipe_flush_wrapped; in softpipe_create_context()
245 softpipe->pipe.texture_barrier = softpipe_texture_barrier; in softpipe_create_context()
246 softpipe->pipe.memory_barrier = softpipe_memory_barrier; in softpipe_create_context()
247 softpipe->pipe.render_condition = softpipe_render_condition; in softpipe_create_context()
254 softpipe->cbuf_cache[i] = sp_create_tile_cache( &softpipe->pipe ); in softpipe_create_context()
255 softpipe->zsbuf_cache = sp_create_tile_cache( &softpipe->pipe ); in softpipe_create_context()
258 for (sh = 0; sh < ARRAY_SIZE(softpipe->tex_cache); sh++) { in softpipe_create_context()
259 for (i = 0; i < ARRAY_SIZE(softpipe->tex_cache[0]); i++) { in softpipe_create_context()
260 softpipe->tex_cache[sh][i] = sp_create_tex_tile_cache(&softpipe->pipe); in softpipe_create_context()
261 if (!softpipe->tex_cache[sh][i]) in softpipe_create_context()
266 softpipe->fs_machine = tgsi_exec_machine_create(PIPE_SHADER_FRAGMENT); in softpipe_create_context()
269 softpipe->quad.shade = sp_quad_shade_stage(softpipe); in softpipe_create_context()
270 softpipe->quad.depth_test = sp_quad_depth_test_stage(softpipe); in softpipe_create_context()
271 softpipe->quad.blend = sp_quad_blend_stage(softpipe); in softpipe_create_context()
272 softpipe->quad.pstipple = sp_quad_polygon_stipple_stage(softpipe); in softpipe_create_context()
274 softpipe->pipe.stream_uploader = u_upload_create_default(&softpipe->pipe); in softpipe_create_context()
275 if (!softpipe->pipe.stream_uploader) in softpipe_create_context()
277 softpipe->pipe.const_uploader = softpipe->pipe.stream_uploader; in softpipe_create_context()
283 softpipe->draw = draw_create(&softpipe->pipe); in softpipe_create_context()
285 softpipe->draw = draw_create_no_llvm(&softpipe->pipe); in softpipe_create_context()
286 if (!softpipe->draw) in softpipe_create_context()
289 draw_texture_sampler(softpipe->draw, in softpipe_create_context()
292 softpipe->tgsi.sampler[PIPE_SHADER_VERTEX]); in softpipe_create_context()
294 draw_texture_sampler(softpipe->draw, in softpipe_create_context()
297 softpipe->tgsi.sampler[PIPE_SHADER_GEOMETRY]); in softpipe_create_context()
299 draw_image(softpipe->draw, in softpipe_create_context()
302 softpipe->tgsi.image[PIPE_SHADER_VERTEX]); in softpipe_create_context()
304 draw_image(softpipe->draw, in softpipe_create_context()
307 softpipe->tgsi.image[PIPE_SHADER_GEOMETRY]); in softpipe_create_context()
309 draw_buffer(softpipe->draw, in softpipe_create_context()
312 softpipe->tgsi.buffer[PIPE_SHADER_VERTEX]); in softpipe_create_context()
314 draw_buffer(softpipe->draw, in softpipe_create_context()
317 softpipe->tgsi.buffer[PIPE_SHADER_GEOMETRY]); in softpipe_create_context()
320 softpipe->no_rast = TRUE; in softpipe_create_context()
322 softpipe->vbuf_backend = sp_create_vbuf_backend(softpipe); in softpipe_create_context()
323 if (!softpipe->vbuf_backend) in softpipe_create_context()
326 softpipe->vbuf = draw_vbuf_stage(softpipe->draw, softpipe->vbuf_backend); in softpipe_create_context()
327 if (!softpipe->vbuf) in softpipe_create_context()
330 draw_set_rasterize_stage(softpipe->draw, softpipe->vbuf); in softpipe_create_context()
331 draw_set_render(softpipe->draw, softpipe->vbuf_backend); in softpipe_create_context()
333 softpipe->blitter = util_blitter_create(&softpipe->pipe); in softpipe_create_context()
334 if (!softpipe->blitter) { in softpipe_create_context()
339 util_blitter_cache_all_shaders(softpipe->blitter); in softpipe_create_context()
342 draw_install_aaline_stage(softpipe->draw, &softpipe->pipe); in softpipe_create_context()
343 draw_install_aapoint_stage(softpipe->draw, &softpipe->pipe); in softpipe_create_context()
347 draw_install_pstipple_stage(softpipe->draw, &softpipe->pipe); in softpipe_create_context()
350 draw_wide_point_sprites(softpipe->draw, TRUE); in softpipe_create_context()
352 sp_init_surface_functions(softpipe); in softpipe_create_context()
356 softpipe->pstipple.sampler = util_pstipple_create_sampler(&softpipe->pipe); in softpipe_create_context()
359 return &softpipe->pipe; in softpipe_create_context()
362 softpipe_destroy(&softpipe->pipe); in softpipe_create_context()