summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl/vl_idct.h
diff options
context:
space:
mode:
authorChristian König <[email protected]>2010-12-08 02:12:24 +0100
committerChristian König <[email protected]>2010-12-08 02:12:24 +0100
commit0b749d6dcb537472771d6fe6e454aafc916ab3fe (patch)
tree5c581343dc3484443cbbc8740e96709bfed1bccd /src/gallium/auxiliary/vl/vl_idct.h
parent22b4acb2069a368e986805d3b43395172ebf9146 (diff)
[g3dvl] split idct code into state and buffers
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_idct.h')
-rw-r--r--src/gallium/auxiliary/vl/vl_idct.h45
1 files changed, 27 insertions, 18 deletions
diff --git a/src/gallium/auxiliary/vl/vl_idct.h b/src/gallium/auxiliary/vl/vl_idct.h
index 2e98f22bea2..6076bdec46c 100644
--- a/src/gallium/auxiliary/vl/vl_idct.h
+++ b/src/gallium/auxiliary/vl/vl_idct.h
@@ -31,10 +31,6 @@
#include <pipe/p_state.h>
#include "vl_vertex_buffers.h"
-struct vl_idct_buffer
-{
-};
-
struct vl_idct
{
struct pipe_context *pipe;
@@ -44,13 +40,7 @@ struct vl_idct
unsigned max_blocks;
- struct pipe_viewport_state viewport[2];
- struct pipe_framebuffer_state fb_state[2];
-
- struct pipe_resource *destination;
-
void *rs_state;
-
void *vertex_elems_state;
union
@@ -63,6 +53,22 @@ struct vl_idct
} individual;
} samplers;
+ void *vs;
+ void *matrix_fs, *transpose_fs;
+
+ struct pipe_resource *matrix;
+ struct pipe_vertex_buffer quad;
+
+ unsigned vertex_buffer_stride;
+};
+
+struct vl_idct_buffer
+{
+ struct pipe_viewport_state viewport[2];
+ struct pipe_framebuffer_state fb_state[2];
+
+ struct pipe_resource *destination;
+
union
{
struct pipe_sampler_view *all[4];
@@ -73,9 +79,6 @@ struct vl_idct
} individual;
} sampler_views;
- void *vs;
- void *matrix_fs, *transpose_fs;
-
union
{
struct pipe_resource *all[4];
@@ -100,16 +103,22 @@ struct vl_idct
struct pipe_resource *vl_idct_upload_matrix(struct pipe_context *pipe);
-bool vl_idct_init(struct vl_idct *idct, struct pipe_context *pipe, struct pipe_resource *dst, struct pipe_resource *matrix);
+bool vl_idct_init(struct vl_idct *idct, struct pipe_context *pipe,
+ unsigned buffer_width, unsigned buffer_height,
+ struct pipe_resource *matrix);
void vl_idct_cleanup(struct vl_idct *idct);
-void vl_idct_map_buffers(struct vl_idct *idct);
+bool vl_idct_init_buffer(struct vl_idct *idct, struct vl_idct_buffer *buffer, struct pipe_resource *dst);
+
+void vl_idct_cleanup_buffer(struct vl_idct *idct, struct vl_idct_buffer *buffer);
+
+void vl_idct_map_buffers(struct vl_idct *idct, struct vl_idct_buffer *buffer);
-void vl_idct_add_block(struct vl_idct *idct, unsigned x, unsigned y, short *block);
+void vl_idct_add_block(struct vl_idct_buffer *buffer, unsigned x, unsigned y, short *block);
-void vl_idct_unmap_buffers(struct vl_idct *idct);
+void vl_idct_unmap_buffers(struct vl_idct *idct, struct vl_idct_buffer *buffer);
-void vl_idct_flush(struct vl_idct *idct);
+void vl_idct_flush(struct vl_idct *idct, struct vl_idct_buffer *buffer);
#endif