From 2d13b5ac81a8c2aa1f36be7e3350b12fbdbd65e8 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 30 Sep 2014 10:32:53 +0800 Subject: ilo: add a pass to finalize ilo_ve_state Add finalize_vertex_elements() to finalize ilo_ve_state. This fixes a potential issue with URB entry allocation for VS and move the complexity of gen6_3DSTATE_VERTEX_ELEMENTS() to the new function. Signed-off-by: Chia-I Wu --- src/gallium/drivers/ilo/ilo_state.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/ilo/ilo_state.h') diff --git a/src/gallium/drivers/ilo/ilo_state.h b/src/gallium/drivers/ilo/ilo_state.h index 7f68118d4b6..3f3c495b061 100644 --- a/src/gallium/drivers/ilo/ilo_state.h +++ b/src/gallium/drivers/ilo/ilo_state.h @@ -176,6 +176,13 @@ struct ilo_ve_state { unsigned instance_divisors[PIPE_MAX_ATTRIBS]; unsigned vb_mapping[PIPE_MAX_ATTRIBS]; unsigned vb_count; + + /* these are not valid until the state is finalized */ + struct ilo_ve_cso edgeflag_cso; + bool last_cso_edgeflag; + + struct ilo_ve_cso nosrc_cso; + bool prepend_nosrc_cso; }; struct ilo_so_state { @@ -385,7 +392,7 @@ struct ilo_state_vector { uint32_t dirty; struct ilo_vb_state vb; - const struct ilo_ve_state *ve; + struct ilo_ve_state *ve; struct ilo_ib_state ib; struct ilo_shader_state *vs; -- cgit v1.2.3