• Home
  • Raw
  • Download

Lines Matching refs:idct

143 create_mismatch_vert_shader(struct vl_idct *idct)  in create_mismatch_vert_shader()  argument
175 (float)VL_BLOCK_WIDTH / idct->buffer_width, in create_mismatch_vert_shader()
176 (float)VL_BLOCK_HEIGHT / idct->buffer_height); in create_mismatch_vert_shader()
182 … calc_addr(shader, o_addr, ureg_src(t_tex), ureg_src(t_tex), false, false, idct->buffer_width / 4); in create_mismatch_vert_shader()
188 return ureg_create_shader_and_destroy(shader, idct->pipe); in create_mismatch_vert_shader()
192 create_mismatch_frag_shader(struct vl_idct *idct) in create_mismatch_frag_shader() argument
218 increment_addr(shader, m[i], addr, false, false, i, idct->buffer_height); in create_mismatch_frag_shader()
255 return ureg_create_shader_and_destroy(shader, idct->pipe); in create_mismatch_frag_shader()
259 create_stage1_vert_shader(struct vl_idct *idct) in create_stage1_vert_shader() argument
298 (float)VL_BLOCK_WIDTH / idct->buffer_width, in create_stage1_vert_shader()
299 (float)VL_BLOCK_HEIGHT / idct->buffer_height); in create_stage1_vert_shader()
309 …calc_addr(shader, o_l_addr, ureg_src(t_tex), ureg_src(t_start), false, false, idct->buffer_width /… in create_stage1_vert_shader()
317 return ureg_create_shader_and_destroy(shader, idct->pipe); in create_stage1_vert_shader()
321 create_stage1_frag_shader(struct vl_idct *idct) in create_stage1_frag_shader() argument
334 fragment = MALLOC(idct->nr_of_render_targets * sizeof(struct ureg_dst)); in create_stage1_frag_shader()
342 for (i = 0; i < idct->nr_of_render_targets; ++i) in create_stage1_frag_shader()
354 increment_addr(shader, l[i], l_addr, false, false, i - 2, idct->buffer_height); in create_stage1_frag_shader()
364 for (i = 0; i < idct->nr_of_render_targets; ++i) { in create_stage1_frag_shader()
367 …increment_addr(shader, r, r_addr, true, true, i - (signed)idct->nr_of_render_targets / 2, VL_BLOCK… in create_stage1_frag_shader()
389 return ureg_create_shader_and_destroy(shader, idct->pipe); in create_stage1_frag_shader()
393 vl_idct_stage2_vert_shader(struct vl_idct *idct, struct ureg_program *shader, in vl_idct_stage2_vert_shader() argument
415 (float)VL_BLOCK_WIDTH / idct->buffer_width, in vl_idct_stage2_vert_shader()
416 (float)VL_BLOCK_HEIGHT / idct->buffer_height); in vl_idct_stage2_vert_shader()
420 ureg_imm1f(shader, VL_BLOCK_WIDTH / idct->nr_of_render_targets)); in vl_idct_stage2_vert_shader()
424 …calc_addr(shader, o_r_addr, ureg_src(tex), ureg_src(t_start), true, false, idct->buffer_height / 4… in vl_idct_stage2_vert_shader()
431 vl_idct_stage2_frag_shader(struct vl_idct *idct, struct ureg_program *shader, in vl_idct_stage2_frag_shader() argument
463 init_shaders(struct vl_idct *idct) in init_shaders() argument
465 idct->vs_mismatch = create_mismatch_vert_shader(idct); in init_shaders()
466 if (!idct->vs_mismatch) in init_shaders()
469 idct->fs_mismatch = create_mismatch_frag_shader(idct); in init_shaders()
470 if (!idct->fs_mismatch) in init_shaders()
473 idct->vs = create_stage1_vert_shader(idct); in init_shaders()
474 if (!idct->vs) in init_shaders()
477 idct->fs = create_stage1_frag_shader(idct); in init_shaders()
478 if (!idct->fs) in init_shaders()
484 idct->pipe->delete_vs_state(idct->pipe, idct->vs); in init_shaders()
487 idct->pipe->delete_vs_state(idct->pipe, idct->vs_mismatch); in init_shaders()
490 idct->pipe->delete_vs_state(idct->pipe, idct->fs); in init_shaders()
497 cleanup_shaders(struct vl_idct *idct) in cleanup_shaders() argument
499 idct->pipe->delete_vs_state(idct->pipe, idct->vs_mismatch); in cleanup_shaders()
500 idct->pipe->delete_fs_state(idct->pipe, idct->fs_mismatch); in cleanup_shaders()
501 idct->pipe->delete_vs_state(idct->pipe, idct->vs); in cleanup_shaders()
502 idct->pipe->delete_fs_state(idct->pipe, idct->fs); in cleanup_shaders()
506 init_state(struct vl_idct *idct) in init_state() argument
513 assert(idct); in init_state()
522 idct->rs_state = idct->pipe->create_rasterizer_state(idct->pipe, &rs_state); in init_state()
523 if (!idct->rs_state) in init_state()
541 idct->blend = idct->pipe->create_blend_state(idct->pipe, &blend); in init_state()
542 if (!idct->blend) in init_state()
556 idct->samplers[i] = idct->pipe->create_sampler_state(idct->pipe, &sampler); in init_state()
557 if (!idct->samplers[i]) in init_state()
565 if (idct->samplers[i]) in init_state()
566 idct->pipe->delete_sampler_state(idct->pipe, idct->samplers[i]); in init_state()
568 idct->pipe->delete_rasterizer_state(idct->pipe, idct->rs_state); in init_state()
571 idct->pipe->delete_blend_state(idct->pipe, idct->blend); in init_state()
578 cleanup_state(struct vl_idct *idct) in cleanup_state() argument
583 idct->pipe->delete_sampler_state(idct->pipe, idct->samplers[i]); in cleanup_state()
585 idct->pipe->delete_rasterizer_state(idct->pipe, idct->rs_state); in cleanup_state()
586 idct->pipe->delete_blend_state(idct->pipe, idct->blend); in cleanup_state()
590 init_source(struct vl_idct *idct, struct vl_idct_buffer *buffer) in init_source() argument
595 assert(idct && buffer); in init_source()
607 buffer->fb_state_mismatch.cbufs[0] = idct->pipe->create_surface(idct->pipe, tex, &surf_templ); in init_source()
631 init_intermediate(struct vl_idct *idct, struct vl_idct_buffer *buffer) in init_intermediate() argument
637 assert(idct && buffer); in init_intermediate()
643 buffer->fb_state.nr_cbufs = idct->nr_of_render_targets; in init_intermediate()
644 for(i = 0; i < idct->nr_of_render_targets; ++i) { in init_intermediate()
649 buffer->fb_state.cbufs[i] = idct->pipe->create_surface( in init_intermediate()
650 idct->pipe, tex, &surf_templ); in init_intermediate()
667 for(i = 0; i < idct->nr_of_render_targets; ++i) in init_intermediate()
753 bool vl_idct_init(struct vl_idct *idct, struct pipe_context *pipe, in vl_idct_init() argument
759 assert(idct && pipe); in vl_idct_init()
762 idct->pipe = pipe; in vl_idct_init()
763 idct->buffer_width = buffer_width; in vl_idct_init()
764 idct->buffer_height = buffer_height; in vl_idct_init()
765 idct->nr_of_render_targets = nr_of_render_targets; in vl_idct_init()
767 pipe_sampler_view_reference(&idct->matrix, matrix); in vl_idct_init()
768 pipe_sampler_view_reference(&idct->transpose, transpose); in vl_idct_init()
770 if(!init_shaders(idct)) in vl_idct_init()
773 if(!init_state(idct)) { in vl_idct_init()
774 cleanup_shaders(idct); in vl_idct_init()
782 vl_idct_cleanup(struct vl_idct *idct) in vl_idct_cleanup() argument
784 cleanup_shaders(idct); in vl_idct_cleanup()
785 cleanup_state(idct); in vl_idct_cleanup()
787 pipe_sampler_view_reference(&idct->matrix, NULL); in vl_idct_cleanup()
788 pipe_sampler_view_reference(&idct->transpose, NULL); in vl_idct_cleanup()
792 vl_idct_init_buffer(struct vl_idct *idct, struct vl_idct_buffer *buffer, in vl_idct_init_buffer() argument
796 assert(buffer && idct); in vl_idct_init_buffer()
801 pipe_sampler_view_reference(&buffer->sampler_views.individual.matrix, idct->matrix); in vl_idct_init_buffer()
803 pipe_sampler_view_reference(&buffer->sampler_views.individual.transpose, idct->transpose); in vl_idct_init_buffer()
806 if (!init_source(idct, buffer)) in vl_idct_init_buffer()
809 if (!init_intermediate(idct, buffer)) in vl_idct_init_buffer()
828 vl_idct_flush(struct vl_idct *idct, struct vl_idct_buffer *buffer, unsigned num_instances) in vl_idct_flush() argument
832 idct->pipe->bind_rasterizer_state(idct->pipe, idct->rs_state); in vl_idct_flush()
833 idct->pipe->bind_blend_state(idct->pipe, idct->blend); in vl_idct_flush()
835 idct->pipe->bind_sampler_states(idct->pipe, PIPE_SHADER_FRAGMENT, in vl_idct_flush()
836 0, 2, idct->samplers); in vl_idct_flush()
838 idct->pipe->set_sampler_views(idct->pipe, PIPE_SHADER_FRAGMENT, 0, 2, 0, in vl_idct_flush()
842 idct->pipe->set_framebuffer_state(idct->pipe, &buffer->fb_state_mismatch); in vl_idct_flush()
843 idct->pipe->set_viewport_states(idct->pipe, 0, 1, &buffer->viewport_mismatch); in vl_idct_flush()
844 idct->pipe->bind_vs_state(idct->pipe, idct->vs_mismatch); in vl_idct_flush()
845 idct->pipe->bind_fs_state(idct->pipe, idct->fs_mismatch); in vl_idct_flush()
846 util_draw_arrays_instanced(idct->pipe, PIPE_PRIM_POINTS, 0, 1, 0, num_instances); in vl_idct_flush()
849 idct->pipe->set_framebuffer_state(idct->pipe, &buffer->fb_state); in vl_idct_flush()
850 idct->pipe->set_viewport_states(idct->pipe, 0, 1, &buffer->viewport); in vl_idct_flush()
851 idct->pipe->bind_vs_state(idct->pipe, idct->vs); in vl_idct_flush()
852 idct->pipe->bind_fs_state(idct->pipe, idct->fs); in vl_idct_flush()
853 util_draw_arrays_instanced(idct->pipe, PIPE_PRIM_QUADS, 0, 4, 0, num_instances); in vl_idct_flush()
857 vl_idct_prepare_stage2(struct vl_idct *idct, struct vl_idct_buffer *buffer) in vl_idct_prepare_stage2() argument
862 idct->pipe->bind_rasterizer_state(idct->pipe, idct->rs_state); in vl_idct_prepare_stage2()
863 idct->pipe->bind_sampler_states(idct->pipe, PIPE_SHADER_FRAGMENT, in vl_idct_prepare_stage2()
864 0, 2, idct->samplers); in vl_idct_prepare_stage2()
865 idct->pipe->set_sampler_views(idct->pipe, PIPE_SHADER_FRAGMENT, in vl_idct_prepare_stage2()