summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_context.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-24 13:11:17 +1000
committerDave Airlie <[email protected]>2010-09-29 14:41:16 +1000
commit914b669b082258fc05d0fec047b69949d88585c4 (patch)
tree9c27436b22ecafa55b31fa8c78e70a7d36c29e11 /src/gallium/drivers/r600/r600_context.h
parent565ff676887fc40b4715b44d9407c638480485e6 (diff)
r600g: add initial vertex translate support.
Diffstat (limited to 'src/gallium/drivers/r600/r600_context.h')
-rw-r--r--src/gallium/drivers/r600/r600_context.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h
index d104531d365..ae32194318c 100644
--- a/src/gallium/drivers/r600/r600_context.h
+++ b/src/gallium/drivers/r600/r600_context.h
@@ -31,6 +31,7 @@
#include <tgsi/tgsi_util.h>
#include <util/u_blitter.h>
#include <util/u_double_list.h>
+#include "translate/translate_cache.h"
#include "radeon.h"
#include "r600_shader.h"
@@ -115,7 +116,11 @@ struct r600_vertex_element
{
unsigned refcount;
unsigned count;
- struct pipe_vertex_element elements[32];
+ struct pipe_vertex_element elements[PIPE_MAX_ATTRIBS];
+
+ enum pipe_format hw_format[PIPE_MAX_ATTRIBS];
+ unsigned hw_format_size[PIPE_MAX_ATTRIBS];
+ boolean incompatible_layout;
};
struct r600_draw {
@@ -132,6 +137,18 @@ struct r600_draw {
unsigned index_bias;
};
+struct r600_translate_context {
+ /* Translate cache for incompatible vertex offset/stride/format fallback. */
+ struct translate_cache *translate_cache;
+
+ /* The vertex buffer slot containing the translated buffer. */
+ unsigned vb_slot;
+
+ /* Saved and new vertex element state. */
+ void *saved_velems, *new_velems;
+};
+
+
struct r600_context_hw_states {
struct radeon_state rasterizer;
struct radeon_state scissor;
@@ -247,6 +264,10 @@ struct r600_context {
struct u_upload_mgr *upload_vb;
struct u_upload_mgr *upload_ib;
bool any_user_vbs;
+ unsigned vb_max_index;
+
+ /* For translating vertex buffers having incompatible vertex layout. */
+ struct r600_translate_context tran;
};
/* Convenience cast wrapper. */