Lines Matching refs:pipe
127 struct blitter_context *util_blitter_create(struct pipe_context *pipe) in util_blitter_create() argument
141 ctx->base.pipe = pipe; in util_blitter_create()
159 pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_GEOMETRY, in util_blitter_create()
162 pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_VERTEX, in util_blitter_create()
165 pipe->screen->get_param(pipe->screen, in util_blitter_create()
169 pipe->screen->get_param(pipe->screen, in util_blitter_create()
174 ctx->blend_keep_color = pipe->create_blend_state(pipe, &blend); in util_blitter_create()
177 ctx->blend_write_color = pipe->create_blend_state(pipe, &blend); in util_blitter_create()
182 pipe->create_depth_stencil_alpha_state(pipe, &dsa); in util_blitter_create()
188 pipe->create_depth_stencil_alpha_state(pipe, &dsa); in util_blitter_create()
198 pipe->create_depth_stencil_alpha_state(pipe, &dsa); in util_blitter_create()
203 pipe->create_depth_stencil_alpha_state(pipe, &dsa); in util_blitter_create()
211 ctx->sampler_state = pipe->create_sampler_state(pipe, &sampler_state); in util_blitter_create()
219 ctx->rs_state = pipe->create_rasterizer_state(pipe, &rs_state); in util_blitter_create()
223 ctx->rs_discard_state = pipe->create_rasterizer_state(pipe, &rs_state); in util_blitter_create()
232 ctx->velem_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]); in util_blitter_create()
240 ctx->velem_sint_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]); in util_blitter_create()
247 ctx->velem_uint_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]); in util_blitter_create()
252 ctx->velem_state_readbuf = pipe->create_vertex_elements_state(pipe, 1, &velem[0]); in util_blitter_create()
263 util_make_vertex_passthrough_shader(pipe, 2, semantic_names, in util_blitter_create()
277 util_make_vertex_passthrough_shader_with_so(pipe, 1, semantic_names, in util_blitter_create()
285 ctx->upload = u_upload_create(pipe, 65536, 4, PIPE_BIND_VERTEX_BUFFER); in util_blitter_create()
293 struct pipe_context *pipe = blitter->pipe; in util_blitter_destroy() local
296 pipe->delete_blend_state(pipe, ctx->blend_write_color); in util_blitter_destroy()
297 pipe->delete_blend_state(pipe, ctx->blend_keep_color); in util_blitter_destroy()
298 pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); in util_blitter_destroy()
299 pipe->delete_depth_stencil_alpha_state(pipe, in util_blitter_destroy()
301 pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil); in util_blitter_destroy()
302 pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil); in util_blitter_destroy()
304 pipe->delete_rasterizer_state(pipe, ctx->rs_state); in util_blitter_destroy()
306 pipe->delete_rasterizer_state(pipe, ctx->rs_discard_state); in util_blitter_destroy()
307 pipe->delete_vs_state(pipe, ctx->vs); in util_blitter_destroy()
309 pipe->delete_vs_state(pipe, ctx->vs_pos_only); in util_blitter_destroy()
310 pipe->delete_vertex_elements_state(pipe, ctx->velem_state); in util_blitter_destroy()
312 pipe->delete_vertex_elements_state(pipe, ctx->velem_sint_state); in util_blitter_destroy()
313 pipe->delete_vertex_elements_state(pipe, ctx->velem_uint_state); in util_blitter_destroy()
316 pipe->delete_vertex_elements_state(pipe, ctx->velem_state_readbuf); in util_blitter_destroy()
320 pipe->delete_fs_state(pipe, ctx->fs_texfetch_col[i]); in util_blitter_destroy()
322 pipe->delete_fs_state(pipe, ctx->fs_texfetch_depth[i]); in util_blitter_destroy()
324 pipe->delete_fs_state(pipe, ctx->fs_texfetch_depthstencil[i]); in util_blitter_destroy()
326 pipe->delete_fs_state(pipe, ctx->fs_texfetch_stencil[i]); in util_blitter_destroy()
331 pipe->delete_fs_state(pipe, ctx->fs_col[i]); in util_blitter_destroy()
333 pipe->delete_fs_state(pipe, ctx->fs_col_int[i]); in util_blitter_destroy()
336 pipe->delete_sampler_state(pipe, ctx->sampler_state); in util_blitter_destroy()
371 struct pipe_context *pipe = ctx->base.pipe; in blitter_restore_vertex_states() local
375 pipe->set_vertex_buffers(pipe, in blitter_restore_vertex_states()
388 pipe->bind_vertex_elements_state(pipe, ctx->base.saved_velem_state); in blitter_restore_vertex_states()
392 pipe->bind_vs_state(pipe, ctx->base.saved_vs); in blitter_restore_vertex_states()
397 pipe->bind_gs_state(pipe, ctx->base.saved_gs); in blitter_restore_vertex_states()
403 pipe->set_stream_output_targets(pipe, in blitter_restore_vertex_states()
414 pipe->bind_rasterizer_state(pipe, ctx->base.saved_rs_state); in blitter_restore_vertex_states()
427 struct pipe_context *pipe = ctx->base.pipe; in blitter_restore_fragment_states() local
430 pipe->bind_fs_state(pipe, ctx->base.saved_fs); in blitter_restore_fragment_states()
434 pipe->bind_depth_stencil_alpha_state(pipe, ctx->base.saved_dsa_state); in blitter_restore_fragment_states()
438 pipe->bind_blend_state(pipe, ctx->base.saved_blend_state); in blitter_restore_fragment_states()
443 pipe->set_sample_mask(pipe, ctx->base.saved_sample_mask); in blitter_restore_fragment_states()
450 pipe->set_stencil_ref(pipe, &ctx->base.saved_stencil_ref); in blitter_restore_fragment_states()
451 pipe->set_viewport_state(pipe, &ctx->base.saved_viewport); in blitter_restore_fragment_states()
461 struct pipe_context *pipe = ctx->base.pipe; in blitter_restore_fb_state() local
463 pipe->set_framebuffer_state(pipe, &ctx->base.saved_fb_state); in blitter_restore_fb_state()
475 struct pipe_context *pipe = ctx->base.pipe; in blitter_restore_textures() local
479 pipe->bind_fragment_sampler_states(pipe, in blitter_restore_textures()
485 pipe->set_fragment_sampler_views(pipe, in blitter_restore_textures()
527 ctx->base.pipe->set_viewport_state(ctx->base.pipe, &ctx->viewport); in blitter_set_rectangle()
660 struct pipe_context *pipe = ctx->base.pipe; in blitter_get_fs_col() local
667 util_make_fragment_cloneinput_shader(pipe, num_cbufs, in blitter_get_fs_col()
674 util_make_fragment_cloneinput_shader(pipe, num_cbufs, in blitter_get_fs_col()
685 struct pipe_context *pipe = ctx->base.pipe; in blitter_get_fs_texfetch_col() local
697 *shader = util_make_fs_blit_msaa_color(pipe, tgsi_tex); in blitter_get_fs_texfetch_col()
709 util_make_fragment_tex_shader(pipe, tgsi_tex, in blitter_get_fs_texfetch_col()
721 struct pipe_context *pipe = ctx->base.pipe; in blitter_get_fs_texfetch_depth() local
734 util_make_fs_blit_msaa_depth(pipe, tgsi_tex); in blitter_get_fs_texfetch_depth()
746 util_make_fragment_tex_shader_writedepth(pipe, tgsi_tex, in blitter_get_fs_texfetch_depth()
758 struct pipe_context *pipe = ctx->base.pipe; in blitter_get_fs_texfetch_depthstencil() local
771 util_make_fs_blit_msaa_depthstencil(pipe, tgsi_tex); in blitter_get_fs_texfetch_depthstencil()
783 util_make_fragment_tex_shader_writedepthstencil(pipe, tgsi_tex, in blitter_get_fs_texfetch_depthstencil()
795 struct pipe_context *pipe = ctx->base.pipe; in blitter_get_fs_texfetch_stencil() local
808 util_make_fs_blit_msaa_stencil(pipe, tgsi_tex); in blitter_get_fs_texfetch_stencil()
820 util_make_fragment_tex_shader_writestencil(pipe, tgsi_tex, in blitter_get_fs_texfetch_stencil()
830 struct pipe_context *pipe = ctx->base.pipe; in blitter_set_common_draw_rect_state() local
832 pipe->bind_rasterizer_state(pipe, ctx->rs_state); in blitter_set_common_draw_rect_state()
833 pipe->bind_vs_state(pipe, ctx->vs); in blitter_set_common_draw_rect_state()
835 pipe->bind_gs_state(pipe, NULL); in blitter_set_common_draw_rect_state()
837 pipe->set_stream_output_targets(pipe, 0, NULL, 0); in blitter_set_common_draw_rect_state()
853 util_draw_vertex_buffer(ctx->base.pipe, NULL, buf, offset, in blitter_draw()
892 struct pipe_context *pipe = ctx->base.pipe; in util_blitter_clear_custom() local
903 pipe->bind_blend_state(pipe, custom_blend); in util_blitter_clear_custom()
905 pipe->bind_blend_state(pipe, ctx->blend_write_color); in util_blitter_clear_custom()
907 pipe->bind_blend_state(pipe, ctx->blend_keep_color); in util_blitter_clear_custom()
911 pipe->bind_depth_stencil_alpha_state(pipe, custom_dsa); in util_blitter_clear_custom()
913 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil); in util_blitter_clear_custom()
915 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil); in util_blitter_clear_custom()
917 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil); in util_blitter_clear_custom()
919 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); in util_blitter_clear_custom()
923 pipe->set_stencil_ref(pipe, &sr); in util_blitter_clear_custom()
926 pipe->bind_vertex_elements_state(pipe, ctx->velem_sint_state); in util_blitter_clear_custom()
928 pipe->bind_vertex_elements_state(pipe, ctx->velem_uint_state); in util_blitter_clear_custom()
930 pipe->bind_vertex_elements_state(pipe, ctx->velem_state); in util_blitter_clear_custom()
932 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, num_cbufs, int_format)); in util_blitter_clear_custom()
933 pipe->set_sample_mask(pipe, ~0); in util_blitter_clear_custom()
1033 struct pipe_screen *screen = ctx->base.pipe->screen; in util_blitter_is_copy_supported()
1091 struct pipe_context *pipe = ctx->base.pipe; in util_blitter_copy_texture() local
1100 dst_view = pipe->create_surface(pipe, dst, &dst_templ); in util_blitter_copy_texture()
1104 src_view = pipe->create_sampler_view(pipe, src, &src_templ); in util_blitter_copy_texture()
1126 struct pipe_context *pipe = ctx->base.pipe; in util_blitter_copy_texture_view() local
1167 pipe->bind_blend_state(pipe, ctx->blend_keep_color); in util_blitter_copy_texture_view()
1170 pipe->bind_depth_stencil_alpha_state(pipe, in util_blitter_copy_texture_view()
1172 pipe->bind_fs_state(pipe, in util_blitter_copy_texture_view()
1175 pipe->bind_depth_stencil_alpha_state(pipe, in util_blitter_copy_texture_view()
1177 pipe->bind_fs_state(pipe, in util_blitter_copy_texture_view()
1180 pipe->bind_depth_stencil_alpha_state(pipe, in util_blitter_copy_texture_view()
1182 pipe->bind_fs_state(pipe, in util_blitter_copy_texture_view()
1189 pipe->bind_blend_state(pipe, ctx->blend_write_color); in util_blitter_copy_texture_view()
1190 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); in util_blitter_copy_texture_view()
1191 pipe->bind_fs_state(pipe, in util_blitter_copy_texture_view()
1210 views[1] = pipe->create_sampler_view(pipe, src->texture, &templ); in util_blitter_copy_texture_view()
1212 pipe->set_fragment_sampler_views(pipe, 2, views); in util_blitter_copy_texture_view()
1213 pipe->bind_fragment_sampler_states(pipe, 2, samplers); in util_blitter_copy_texture_view()
1225 view = pipe->create_sampler_view(pipe, src->texture, &templ); in util_blitter_copy_texture_view()
1227 pipe->set_fragment_sampler_views(pipe, 1, &view); in util_blitter_copy_texture_view()
1228 pipe->bind_fragment_sampler_states(pipe, 1, &ctx->sampler_state); in util_blitter_copy_texture_view()
1232 pipe->set_fragment_sampler_views(pipe, 1, &src); in util_blitter_copy_texture_view()
1233 pipe->bind_fragment_sampler_states(pipe, 1, &ctx->sampler_state); in util_blitter_copy_texture_view()
1236 pipe->bind_vertex_elements_state(pipe, ctx->velem_state); in util_blitter_copy_texture_view()
1237 pipe->set_framebuffer_state(pipe, &fb_state); in util_blitter_copy_texture_view()
1238 pipe->set_sample_mask(pipe, dst_sample_mask); in util_blitter_copy_texture_view()
1285 struct pipe_context *pipe = ctx->base.pipe; in util_blitter_clear_render_target() local
1299 pipe->bind_blend_state(pipe, ctx->blend_write_color); in util_blitter_clear_render_target()
1300 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); in util_blitter_clear_render_target()
1301 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE)); in util_blitter_clear_render_target()
1302 pipe->bind_vertex_elements_state(pipe, ctx->velem_state); in util_blitter_clear_render_target()
1310 pipe->set_framebuffer_state(pipe, &fb_state); in util_blitter_clear_render_target()
1311 pipe->set_sample_mask(pipe, ~0); in util_blitter_clear_render_target()
1334 struct pipe_context *pipe = ctx->base.pipe; in util_blitter_clear_depth_stencil() local
1349 pipe->bind_blend_state(pipe, ctx->blend_keep_color); in util_blitter_clear_depth_stencil()
1352 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil); in util_blitter_clear_depth_stencil()
1353 pipe->set_stencil_ref(pipe, &sr); in util_blitter_clear_depth_stencil()
1356 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil); in util_blitter_clear_depth_stencil()
1360 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil); in util_blitter_clear_depth_stencil()
1361 pipe->set_stencil_ref(pipe, &sr); in util_blitter_clear_depth_stencil()
1365 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); in util_blitter_clear_depth_stencil()
1367 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 0, FALSE)); in util_blitter_clear_depth_stencil()
1368 pipe->bind_vertex_elements_state(pipe, ctx->velem_state); in util_blitter_clear_depth_stencil()
1376 pipe->set_framebuffer_state(pipe, &fb_state); in util_blitter_clear_depth_stencil()
1377 pipe->set_sample_mask(pipe, ~0); in util_blitter_clear_depth_stencil()
1398 struct pipe_context *pipe = ctx->base.pipe; in util_blitter_custom_depth_stencil() local
1412 pipe->bind_blend_state(pipe, ctx->blend_write_color); in util_blitter_custom_depth_stencil()
1413 pipe->bind_depth_stencil_alpha_state(pipe, dsa_stage); in util_blitter_custom_depth_stencil()
1414 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 0, FALSE)); in util_blitter_custom_depth_stencil()
1415 pipe->bind_vertex_elements_state(pipe, ctx->velem_state); in util_blitter_custom_depth_stencil()
1429 pipe->set_framebuffer_state(pipe, &fb_state); in util_blitter_custom_depth_stencil()
1430 pipe->set_sample_mask(pipe, sample_mask); in util_blitter_custom_depth_stencil()
1451 struct pipe_context *pipe = ctx->base.pipe; in util_blitter_copy_buffer() local
1475 util_resource_copy_region(pipe, dst, 0, dstx, 0, 0, src, 0, &box); in util_blitter_copy_buffer()
1486 pipe->set_vertex_buffers(pipe, 1, &vb); in util_blitter_copy_buffer()
1487 pipe->bind_vertex_elements_state(pipe, ctx->velem_state_readbuf); in util_blitter_copy_buffer()
1488 pipe->bind_vs_state(pipe, ctx->vs_pos_only); in util_blitter_copy_buffer()
1490 pipe->bind_gs_state(pipe, NULL); in util_blitter_copy_buffer()
1491 pipe->bind_rasterizer_state(pipe, ctx->rs_discard_state); in util_blitter_copy_buffer()
1493 so_target = pipe->create_stream_output_target(pipe, dst, dstx, size); in util_blitter_copy_buffer()
1494 pipe->set_stream_output_targets(pipe, 1, &so_target, 0); in util_blitter_copy_buffer()
1496 util_draw_arrays(pipe, PIPE_PRIM_POINTS, 0, size / 4); in util_blitter_copy_buffer()
1514 struct pipe_context *pipe = ctx->base.pipe; in util_blitter_custom_resolve_color() local
1523 pipe->bind_blend_state(pipe, custom_blend); in util_blitter_custom_resolve_color()
1524 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); in util_blitter_custom_resolve_color()
1525 pipe->bind_vertex_elements_state(pipe, ctx->velem_state); in util_blitter_custom_resolve_color()
1526 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE)); in util_blitter_custom_resolve_color()
1527 pipe->set_sample_mask(pipe, sample_mask); in util_blitter_custom_resolve_color()
1536 dstsurf = pipe->create_surface(pipe, dst, &surf_tmpl); in util_blitter_custom_resolve_color()
1542 srcsurf = pipe->create_surface(pipe, src, &surf_tmpl); in util_blitter_custom_resolve_color()
1551 pipe->set_framebuffer_state(pipe, &fb_state); in util_blitter_custom_resolve_color()
1571 struct pipe_context *pipe = ctx->base.pipe; in util_blitter_custom_color() local
1585 pipe->bind_blend_state(pipe, custom_blend); in util_blitter_custom_color()
1586 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); in util_blitter_custom_color()
1587 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE)); in util_blitter_custom_color()
1588 pipe->bind_vertex_elements_state(pipe, ctx->velem_state); in util_blitter_custom_color()
1589 pipe->set_sample_mask(pipe, (1ull << MAX2(1, dstsurf->texture->nr_samples)) - 1); in util_blitter_custom_color()
1597 pipe->set_framebuffer_state(pipe, &fb_state); in util_blitter_custom_color()
1598 pipe->set_sample_mask(pipe, ~0); in util_blitter_custom_color()