summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_context.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-06-08 23:45:11 +0200
committerMarek Olšák <[email protected]>2010-06-08 23:50:05 +0200
commitfccfb7b16512a36424370dc1942cdedd3d1c208a (patch)
tree30e7c4356adab9827f487e7f05a77511071dcb8f /src/gallium/drivers/r300/r300_context.h
parentbcf63dbbd8fd31b724294b34a62a0e6c565dce87 (diff)
r300g: skip rendering for unsupported vertex formats instead of aborting
The next step is to replace skipping by an actual fallback.
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r--src/gallium/drivers/r300/r300_context.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 48ec52d26cf..cca11f80452 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -326,6 +326,17 @@ struct r300_vertex_element_state {
unsigned count;
struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS];
+ /* If (velem[i].src_format != hw_format[i]), the vertex buffer
+ * referenced by this vertex element cannot be used for rendering and
+ * its vertex data must be translated to hw_format[i]. */
+ enum pipe_format hw_format[PIPE_MAX_ATTRIBS];
+ unsigned hw_format_size[PIPE_MAX_ATTRIBS];
+
+ /* This might mean two things:
+ * - src_format != hw_format, as discussed above.
+ * - src_offset % 4 != 0. */
+ boolean incompatible_layout;
+
struct r300_vertex_stream_state vertex_stream;
};
@@ -434,6 +445,8 @@ struct r300_context {
int sprite_coord_enable;
/* Whether two-sided color selection is enabled (AKA light_twoside). */
boolean two_sided_color;
+ /* Incompatible vertex buffer layout? (misaligned stride or buffer_offset) */
+ boolean incompatible_vb_layout;
/* upload managers */
struct u_upload_mgr *upload_vb;