summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_gpe.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-07-14 03:56:44 +0800
committerChia-I Wu <[email protected]>2013-07-14 05:59:52 +0800
commit62c546bbf87afe32e49c100e245e04bc35304481 (patch)
treedfe218a3ebc658b1fa7e381877ff2bb43df2f39a /src/gallium/drivers/ilo/ilo_gpe.h
parent6bcbb0dc82f9f72c747ef39ed80a4ee0d883ce8e (diff)
ilo: skip 3DSTATE_INDEX_BUFFER when possible
When only the offset to the index buffer is changed, we can skip the 3DSTATE_INDEX_BUFFER if we always use 0 for the offset, and add (offset / index_size) to Start Vertex Location in 3DPRIMITIVE.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_gpe.h')
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe.h b/src/gallium/drivers/ilo/ilo_gpe.h
index 27fa57e2d38..73a94304bf4 100644
--- a/src/gallium/drivers/ilo/ilo_gpe.h
+++ b/src/gallium/drivers/ilo/ilo_gpe.h
@@ -63,9 +63,15 @@ struct ilo_vb_state {
};
struct ilo_ib_state {
- struct pipe_index_buffer state;
+ struct pipe_resource *buffer;
+ const void *user_buffer;
+ unsigned offset;
+ unsigned index_size;
- struct pipe_resource *resource;
+ /* these are not valid until the state is finalized */
+ struct pipe_resource *hw_resource;
+ unsigned hw_index_size;
+ /* an offset to be added to pipe_draw_info::start */
int64_t draw_start_offset;
};