From e68c83a5a01a8a659857310cfcc785c7e028d3f0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 21 Oct 2010 17:34:25 +1000 Subject: r600g: initial translate state support --- src/gallium/drivers/r600/r600_pipe.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/r600/r600_pipe.h') diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index e7c4b60d00..7fb47b608e 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -30,6 +30,7 @@ #include #include #include +#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 { -- cgit v1.2.3