Lines Matching refs:renderer
475 vl_mc_init(struct vl_mc *renderer, struct pipe_context *pipe, in vl_mc_init() argument
482 assert(renderer); in vl_mc_init()
485 memset(renderer, 0, sizeof(struct vl_mc)); in vl_mc_init()
487 renderer->pipe = pipe; in vl_mc_init()
488 renderer->buffer_width = buffer_width; in vl_mc_init()
489 renderer->buffer_height = buffer_height; in vl_mc_init()
490 renderer->macroblock_size = macroblock_size; in vl_mc_init()
492 if (!init_pipe_state(renderer)) in vl_mc_init()
495 renderer->vs_ref = create_ref_vert_shader(renderer); in vl_mc_init()
496 if (!renderer->vs_ref) in vl_mc_init()
499 renderer->vs_ycbcr = create_ycbcr_vert_shader(renderer, vs_callback, callback_priv); in vl_mc_init()
500 if (!renderer->vs_ycbcr) in vl_mc_init()
503 renderer->fs_ref = create_ref_frag_shader(renderer); in vl_mc_init()
504 if (!renderer->fs_ref) in vl_mc_init()
507 … renderer->fs_ycbcr = create_ycbcr_frag_shader(renderer, scale, false, fs_callback, callback_priv); in vl_mc_init()
508 if (!renderer->fs_ycbcr) in vl_mc_init()
511 …renderer->fs_ycbcr_sub = create_ycbcr_frag_shader(renderer, scale, true, fs_callback, callback_pri… in vl_mc_init()
512 if (!renderer->fs_ycbcr_sub) in vl_mc_init()
518 renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ycbcr); in vl_mc_init()
521 renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ref); in vl_mc_init()
524 renderer->pipe->delete_vs_state(renderer->pipe, renderer->vs_ycbcr); in vl_mc_init()
527 renderer->pipe->delete_vs_state(renderer->pipe, renderer->vs_ref); in vl_mc_init()
530 cleanup_pipe_state(renderer); in vl_mc_init()
537 vl_mc_cleanup(struct vl_mc *renderer) in vl_mc_cleanup() argument
539 assert(renderer); in vl_mc_cleanup()
541 cleanup_pipe_state(renderer); in vl_mc_cleanup()
543 renderer->pipe->delete_vs_state(renderer->pipe, renderer->vs_ref); in vl_mc_cleanup()
544 renderer->pipe->delete_vs_state(renderer->pipe, renderer->vs_ycbcr); in vl_mc_cleanup()
545 renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ref); in vl_mc_cleanup()
546 renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ycbcr); in vl_mc_cleanup()
547 renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ycbcr_sub); in vl_mc_cleanup()
551 vl_mc_init_buffer(struct vl_mc *renderer, struct vl_mc_buffer *buffer) in vl_mc_init_buffer() argument
553 assert(renderer && buffer); in vl_mc_init_buffer()
590 prepare_pipe_4_rendering(struct vl_mc *renderer, struct vl_mc_buffer *buffer, unsigned mask) in prepare_pipe_4_rendering() argument
594 renderer->pipe->bind_rasterizer_state(renderer->pipe, renderer->rs_state); in prepare_pipe_4_rendering()
597 renderer->pipe->bind_blend_state(renderer->pipe, renderer->blend_add[mask]); in prepare_pipe_4_rendering()
599 renderer->pipe->bind_blend_state(renderer->pipe, renderer->blend_clear[mask]); in prepare_pipe_4_rendering()
601 renderer->pipe->set_framebuffer_state(renderer->pipe, &buffer->fb_state); in prepare_pipe_4_rendering()
602 renderer->pipe->set_viewport_state(renderer->pipe, &buffer->viewport); in prepare_pipe_4_rendering()
606 vl_mc_render_ref(struct vl_mc *renderer, struct vl_mc_buffer *buffer, struct pipe_sampler_view *ref) in vl_mc_render_ref() argument
610 prepare_pipe_4_rendering(renderer, buffer, PIPE_MASK_R | PIPE_MASK_G | PIPE_MASK_B); in vl_mc_render_ref()
612 renderer->pipe->bind_vs_state(renderer->pipe, renderer->vs_ref); in vl_mc_render_ref()
613 renderer->pipe->bind_fs_state(renderer->pipe, renderer->fs_ref); in vl_mc_render_ref()
615 renderer->pipe->set_fragment_sampler_views(renderer->pipe, 1, &ref); in vl_mc_render_ref()
616 renderer->pipe->bind_fragment_sampler_states(renderer->pipe, 1, &renderer->sampler_ref); in vl_mc_render_ref()
618 util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4, 0, in vl_mc_render_ref()
619 renderer->buffer_width / VL_MACROBLOCK_WIDTH * in vl_mc_render_ref()
620 renderer->buffer_height / VL_MACROBLOCK_HEIGHT); in vl_mc_render_ref()
626 vl_mc_render_ycbcr(struct vl_mc *renderer, struct vl_mc_buffer *buffer, unsigned component, unsigne… in vl_mc_render_ycbcr() argument
635 prepare_pipe_4_rendering(renderer, buffer, mask); in vl_mc_render_ycbcr()
637 renderer->pipe->bind_vs_state(renderer->pipe, renderer->vs_ycbcr); in vl_mc_render_ycbcr()
638 renderer->pipe->bind_fs_state(renderer->pipe, renderer->fs_ycbcr); in vl_mc_render_ycbcr()
640 util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4, 0, num_instances); in vl_mc_render_ycbcr()
643 renderer->pipe->bind_blend_state(renderer->pipe, renderer->blend_sub[mask]); in vl_mc_render_ycbcr()
644 renderer->pipe->bind_fs_state(renderer->pipe, renderer->fs_ycbcr_sub); in vl_mc_render_ycbcr()
645 util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4, 0, num_instances); in vl_mc_render_ycbcr()