summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_pipe.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-10-21 17:34:25 +1000
committerDave Airlie <[email protected]>2010-10-21 19:58:08 +1000
commite68c83a5a01a8a659857310cfcc785c7e028d3f0 (patch)
tree64da11e79b76d5e36d09493017470bee23766f80 /src/gallium/drivers/r600/r600_pipe.h
parent3a54195679b5a9ed12127c85ca03e5546643d63d (diff)
r600g: initial translate state support
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index e7c4b60d00c..7fb47b608e4 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -30,6 +30,7 @@
#include <pipe/p_screen.h>
#include <pipe/p_context.h>
#include <util/u_math.h>
+#include "translate/translate_cache.h"
#include "r600.h"
#include "r600_public.h"
#include "r600_shader.h"
@@ -83,7 +84,10 @@ struct r600_vertex_element
{
unsigned count;
unsigned refcount;
- 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_pipe_shader {
@@ -103,6 +107,16 @@ struct r600_textures_info {
unsigned n_samplers;
};
+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;
+};
+
#define R600_CONSTANT_ARRAY_SIZE 256
#define R600_RESOURCE_ARRAY_SIZE 160
@@ -142,6 +156,9 @@ struct r600_pipe_context {
unsigned any_user_vbs;
struct r600_textures_info ps_samplers;
+ unsigned vb_max_index;
+ struct r600_translate_context tran;
+
};
struct r600_drawl {