1 /**************************************************************************
3 * Copyright 2010 Christian König
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
31 #include <pipe/p_state.h>
35 struct pipe_context
*pipe
;
39 struct pipe_viewport_state viewport
;
40 struct pipe_resource
*vs_const_buf
;
41 struct pipe_framebuffer_state fb_state
;
43 struct pipe_resource
*destination
;
45 void *vertex_elems_state
;
52 void *transpose
, *source
;
53 void *matrix
, *intermediate
;
59 struct pipe_sampler_view
*all
[4];
60 struct pipe_sampler_view
*stage
[2][2];
62 struct pipe_sampler_view
*transpose
, *source
;
63 struct pipe_sampler_view
*matrix
, *intermediate
;
68 void *transpose_fs
, *matrix_fs
, *eb_fs
;
72 struct pipe_resource
*all
[4];
73 struct pipe_resource
*stage
[2][2];
75 struct pipe_resource
*transpose
, *source
;
76 struct pipe_resource
*matrix
, *intermediate
;
82 struct pipe_vertex_buffer all
[2];
83 struct { struct pipe_vertex_buffer quad
, pos
; } individual
;
87 unsigned num_empty_blocks
;
89 struct pipe_transfer
*tex_transfer
;
92 struct pipe_transfer
*vec_transfer
;
93 struct vertex2f
*vectors
;
96 struct pipe_surface
*intermediate
, *destination
;
100 bool vl_idct_init(struct vl_idct
*idct
, struct pipe_context
*pipe
, struct pipe_resource
*dst
);
102 void vl_idct_cleanup(struct vl_idct
*idct
);
104 void vl_idct_add_block(struct vl_idct
*idct
, unsigned x
, unsigned y
, short *block
);
106 void vl_idct_flush(struct vl_idct
*idct
);