summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_gpe.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-06-01 02:00:55 +0800
committerChia-I Wu <[email protected]>2013-06-07 11:13:15 +0800
commit70e78211d6c09b3076ac261d2cde9d0037540065 (patch)
treef9cc047a59838302e2aff736eef02f49a82bc862 /src/gallium/drivers/ilo/ilo_gpe.h
parentd4fa98db0c9a5d640fee946c713c8d06597e47f3 (diff)
ilo: introduce vertex element CSO
Introduce ilo_ve_cso and initialize it in create_vertex_elements_state(). This commit goes a step further by setting up mappings from HW VB to PIPE VB, which we failed to do previously. That allows us to support instanced rendering.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_gpe.h')
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe.h b/src/gallium/drivers/ilo/ilo_gpe.h
index dc4e80eb97e..ae813b1e839 100644
--- a/src/gallium/drivers/ilo/ilo_gpe.h
+++ b/src/gallium/drivers/ilo/ilo_gpe.h
@@ -62,9 +62,18 @@ struct ilo_ib_state {
struct pipe_index_buffer state;
};
+struct ilo_ve_cso {
+ /* VERTEX_ELEMENT_STATE */
+ uint32_t payload[2];
+};
+
struct ilo_ve_state {
- struct pipe_vertex_element states[PIPE_MAX_ATTRIBS];
+ struct ilo_ve_cso cso[PIPE_MAX_ATTRIBS];
unsigned count;
+
+ unsigned instance_divisors[PIPE_MAX_ATTRIBS];
+ unsigned vb_mapping[PIPE_MAX_ATTRIBS];
+ unsigned vb_count;
};
struct ilo_so_state {
@@ -191,6 +200,12 @@ struct ilo_global_binding {
};
void
+ilo_gpe_init_ve(const struct ilo_dev_info *dev,
+ unsigned num_states,
+ const struct pipe_vertex_element *states,
+ struct ilo_ve_state *ve);
+
+void
ilo_gpe_set_viewport_cso(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *state,
struct ilo_viewport_cso *vp);