summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-01-20 01:07:41 -0800
committerKenneth Graunke <[email protected]>2019-02-21 10:26:05 -0800
commit5fad62cef10ad07d27f00e294302b5ac026f6458 (patch)
tree60c2a91af43483000c6b358a153b231f01592b57 /src/gallium/drivers
parent95fe254cf29cc221bdcd7ef70bd7ee41835a94b8 (diff)
iris: fix bogus index buffer reference
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/iris/iris_state.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index bfca3fb75cb..1ec34bddbcb 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -1445,7 +1445,7 @@ iris_upload_render_state(struct iris_context *ice,
}
// draw->index_size > 0
- if (1) {
+ if (draw->index_size > 0) {
struct iris_resource *res = (struct iris_resource *)draw->index.resource;
assert(!draw->has_user_indices);
@@ -1457,24 +1457,24 @@ iris_upload_render_state(struct iris_context *ice,
// XXX: gah, addresses :( need two different combine address funcs
// ib.BufferStartingAddress = res->bo;
}
+ }
- assert(!draw->indirect); // XXX: indirect support
-
- iris_emit_cmd(batch, GENX(3DPRIMITIVE), prim) {
- prim.StartInstanceLocation = draw->start_instance;
- prim.InstanceCount = draw->instance_count;
+ assert(!draw->indirect); // XXX: indirect support
- // XXX: this is probably bonkers.
- prim.StartVertexLocation = draw->start;
+ iris_emit_cmd(batch, GENX(3DPRIMITIVE), prim) {
+ prim.StartInstanceLocation = draw->start_instance;
+ prim.InstanceCount = draw->instance_count;
- if (draw->index_size) {
- prim.BaseVertexLocation += draw->index_bias;
- } else {
- prim.StartVertexLocation += draw->index_bias;
- }
+ // XXX: this is probably bonkers.
+ prim.StartVertexLocation = draw->start;
- //prim.BaseVertexLocation = ...;
+ if (draw->index_size) {
+ prim.BaseVertexLocation += draw->index_bias;
+ } else {
+ prim.StartVertexLocation += draw->index_bias;
}
+
+ //prim.BaseVertexLocation = ...;
}
#if 0
l3 configuration