Lines Matching refs:ctx
45 static struct pipe_context *ctx = NULL;
171 ctx->buffer_subdata(ctx, constbuf1,
175 pipe_set_constant_buffer(ctx,
180 ctx->buffer_subdata(ctx, constbuf2,
184 pipe_set_constant_buffer(ctx,
214 ctx->set_viewport_states( ctx, 0, 1, &vp );
234 handle = ctx->create_vertex_elements_state(ctx, 4, ve);
235 ctx->bind_vertex_elements_state(ctx, handle);
242 vbuf.buffer.resource = pipe_buffer_create_with_data(ctx,
248 vbuf.buffer.resource = pipe_buffer_create_with_data(ctx,
255 ctx->set_vertex_buffers(ctx, 0, 1, 0, false, &vbuf);
277 handle = graw_parse_vertex_shader(ctx, text);
278 ctx->bind_vs_state(ctx, handle);
291 handle = graw_parse_fragment_shader(ctx, text);
292 ctx->bind_fs_state(ctx, handle);
316 handle = graw_parse_geometry_shader(ctx, buf);
317 ctx->bind_gs_state(ctx, handle);
326 ctx->clear(ctx, PIPE_CLEAR_COLOR, NULL, &clear_color, 0, 0);
328 util_draw_arrays(ctx, PIPE_PRIM_TRIANGLE_STRIP, 0, 4);
330 util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
332 ctx->flush(ctx, NULL, 0);
334 graw_save_surface_to_file(ctx, surf, NULL);
336 screen->flush_frontbuffer(screen, ctx, rttex, 0, 0, window, NULL);
409 ctx->texture_subdata(ctx,
424 ptr = pipe_texture_map(ctx, samptex,
434 ctx->texture_unmap(ctx, t);
444 sv = ctx->create_sampler_view(ctx, samptex, &sv_template);
448 ctx->set_sampler_views(ctx, PIPE_SHADER_FRAGMENT, 0, 1, 0, false, &sv);
463 sampler = ctx->create_sampler_state(ctx, &sampler_desc);
467 ctx->bind_sampler_states(ctx, PIPE_SHADER_FRAGMENT, 0, 1, &sampler);
496 ctx = screen->context_create(screen, NULL, 0);
497 if (ctx == NULL)
520 surf = ctx->create_surface(ctx, rttex, &surf_tmpl);
530 ctx->set_framebuffer_state(ctx, &fb);
537 handle = ctx->create_blend_state(ctx, &blend);
538 ctx->bind_blend_state(ctx, handle);
545 handle = ctx->create_depth_stencil_alpha_state(ctx, &depthstencil);
546 ctx->bind_depth_stencil_alpha_state(ctx, handle);
558 handle = ctx->create_rasterizer_state(ctx, &rasterizer);
559 ctx->bind_rasterizer_state(ctx, handle);