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