summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_draw.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2015-06-18 13:55:32 +0800
committerChia-I Wu <[email protected]>2015-06-20 11:14:10 +0800
commit7b3432b62d25494b3662d12634e34d75e29ec865 (patch)
treeaa917265624a8f473b185127e2c8cc3bbe450443 /src/gallium/drivers/ilo/ilo_draw.c
parent73f0d6d22db21f1fa553d8a26687edc5083e3c23 (diff)
ilo: embed pipe_index_buffer in ilo_ib_state
Make it obvious that we save a copy of pipe_index_buffer.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_draw.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_draw.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/drivers/ilo/ilo_draw.c b/src/gallium/drivers/ilo/ilo_draw.c
index fc91fd312d2..e8e1a4cd14c 100644
--- a/src/gallium/drivers/ilo/ilo_draw.c
+++ b/src/gallium/drivers/ilo/ilo_draw.c
@@ -452,12 +452,12 @@ draw_vbo_with_sw_restart(struct ilo_context *ilo,
} u;
/* we will draw with IB mapped */
- if (ib->buffer) {
- u.ptr = intel_bo_map(ilo_buffer(ib->buffer)->bo, false);
+ if (ib->state.buffer) {
+ u.ptr = intel_bo_map(ilo_buffer(ib->state.buffer)->bo, false);
if (u.ptr)
- u.u8 += ib->offset;
+ u.u8 += ib->state.offset;
} else {
- u.ptr = ib->user_buffer;
+ u.ptr = ib->state.user_buffer;
}
if (!u.ptr)
@@ -483,7 +483,7 @@ draw_vbo_with_sw_restart(struct ilo_context *ilo,
(pipe)->draw_vbo(pipe, &subinfo); \
} while (0)
- switch (ib->index_size) {
+ switch (ib->state.index_size) {
case 1:
DRAW_VBO_WITH_SW_RESTART(&ilo->base, info, u.u8);
break;
@@ -500,8 +500,8 @@ draw_vbo_with_sw_restart(struct ilo_context *ilo,
#undef DRAW_VBO_WITH_SW_RESTART
- if (ib->buffer)
- intel_bo_unmap(ilo_buffer(ib->buffer)->bo);
+ if (ib->state.buffer)
+ intel_bo_unmap(ilo_buffer(ib->state.buffer)->bo);
}
static bool
@@ -511,9 +511,9 @@ draw_vbo_need_sw_restart(const struct ilo_context *ilo,
/* the restart index is fixed prior to GEN7.5 */
if (ilo_dev_gen(ilo->dev) < ILO_GEN(7.5)) {
const unsigned cut_index =
- (ilo->state_vector.ib.index_size == 1) ? 0xff :
- (ilo->state_vector.ib.index_size == 2) ? 0xffff :
- (ilo->state_vector.ib.index_size == 4) ? 0xffffffff : 0;
+ (ilo->state_vector.ib.state.index_size == 1) ? 0xff :
+ (ilo->state_vector.ib.state.index_size == 2) ? 0xffff :
+ (ilo->state_vector.ib.state.index_size == 4) ? 0xffffffff : 0;
if (info->restart_index < cut_index)
return true;