iris: add an extra BT assert from Chris Wilson
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 24 Nov 2018 10:55:40 +0000 (02:55 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:10 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index d561b83ef532025a71632e3c5e4e13404cac6511..0b5e1a3aa011906f18b852ff9aa25b7862187123 100644 (file)
@@ -3575,7 +3575,9 @@ use_image(struct iris_batch *batch, struct iris_context *ice,
 
 #define push_bt_entry(addr) \
    assert(addr >= binder_addr); \
+   assert(s < prog_data->binding_table.size_bytes / sizeof(uint32_t)); \
    if (!pin_only) bt_map[s++] = (addr) - binder_addr;
+
 #define bt_assert(section, exists)                           \
    if (!pin_only) assert(prog_data->binding_table.section == \
                          (exists) ? s : 0xd0d0d0d0)