summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/vl/vl_vertex_buffers.h
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2011-03-08 18:34:05 +0100
committerChristian König <deathsimple@vodafone.de>2011-03-08 18:34:05 +0100
commit310eea52ca1e997295c84163066cc5d0fd4f8cf6 (patch)
tree0d6e0e5197303b97f6d35992398bdcd10b1c3f01 /src/gallium/auxiliary/vl/vl_vertex_buffers.h
parent43af13b2cb6d865610b3cdf64f8dbf16a9bca215 (diff)
[g3dvl] use a single vertex buffer for both idct and mc
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_vertex_buffers.h')
-rw-r--r--src/gallium/auxiliary/vl/vl_vertex_buffers.h50
1 files changed, 29 insertions, 21 deletions
diff --git a/src/gallium/auxiliary/vl/vl_vertex_buffers.h b/src/gallium/auxiliary/vl/vl_vertex_buffers.h
index ca06abe202..4400bda627 100644
--- a/src/gallium/auxiliary/vl/vl_vertex_buffers.h
+++ b/src/gallium/auxiliary/vl/vl_vertex_buffers.h
@@ -29,45 +29,53 @@
#include <assert.h>
#include <pipe/p_state.h>
+#include <pipe/p_video_state.h>
#include "vl_types.h"
+enum VS_INPUT
+{
+ VS_I_RECT,
+ VS_I_VPOS,
+ VS_I_EB_0_0,
+ VS_I_EB_0_1,
+ VS_I_EB_1_0,
+ VS_I_EB_1_1,
+ VS_I_MV0,
+ VS_I_MV1,
+ VS_I_MV2,
+ VS_I_MV3,
+
+ NUM_VS_INPUTS
+};
+
struct vl_vertex_buffer
{
- unsigned num_verts;
- unsigned stride;
+ unsigned size;
+ unsigned num_not_empty;
+ unsigned num_empty;
struct pipe_resource *resource;
struct pipe_transfer *transfer;
- void *vectors;
+ struct vl_vertex_stream *start;
+ struct vl_vertex_stream *end;
};
-struct pipe_vertex_buffer vl_vb_upload_quads(struct pipe_context *pipe, unsigned max_blocks);
+struct pipe_vertex_buffer vl_vb_upload_quads(struct pipe_context *pipe,
+ unsigned blocks_x, unsigned blocks_y);
-struct pipe_vertex_element vl_vb_get_quad_vertex_element(void);
-
-unsigned vl_vb_element_helper(struct pipe_vertex_element* elements, unsigned num_elements,
- unsigned vertex_buffer_index);
+void *vl_vb_get_elems_state(struct pipe_context *pipe, bool include_mvs);
struct pipe_vertex_buffer vl_vb_init(struct vl_vertex_buffer *buffer,
struct pipe_context *pipe,
- unsigned max_blocks, unsigned stride);
+ unsigned max_blocks);
void vl_vb_map(struct vl_vertex_buffer *buffer, struct pipe_context *pipe);
-static inline void
-vl_vb_add_block(struct vl_vertex_buffer *buffer, void *elements)
-{
- void *pos;
-
- assert(buffer);
-
- pos = buffer->vectors + buffer->num_verts * buffer->stride;
- memcpy(pos, elements, buffer->stride);
- buffer->num_verts++;
-}
+void vl_vb_add_block(struct vl_vertex_buffer *buffer, struct pipe_mpeg12_macroblock *mb,
+ const unsigned (*empty_block_mask)[3][2][2]);
void vl_vb_unmap(struct vl_vertex_buffer *buffer, struct pipe_context *pipe);
-unsigned vl_vb_restart(struct vl_vertex_buffer *buffer);
+void vl_vb_restart(struct vl_vertex_buffer *buffer);
void vl_vb_cleanup(struct vl_vertex_buffer *buffer);