mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 20:50:09 +01:00
anv: assert that we don't overflow
Our exposed limits say we shouldn't be able to, but let's add an assert in case something changes, and to help Coverity out. CID: 1662103 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37583>
This commit is contained in:
parent
01cbd0f24a
commit
d5199b07d2
1 changed files with 1 additions and 0 deletions
|
|
@ -1656,6 +1656,7 @@ void genX(CmdDrawIndirectByteCountEXT)(
|
|||
mi_store(&b, mi_reg32(GFX7_3DPRIM_VERTEX_COUNT), count);
|
||||
|
||||
mi_store(&b, mi_reg32(GFX7_3DPRIM_START_VERTEX), mi_imm(firstVertex));
|
||||
assert(((uint64_t)instanceCount * gfx->instance_multiplier <= UINT32_MAX));
|
||||
mi_store(&b, mi_reg32(GFX7_3DPRIM_INSTANCE_COUNT),
|
||||
mi_imm(instanceCount * gfx->instance_multiplier));
|
||||
mi_store(&b, mi_reg32(GFX7_3DPRIM_START_INSTANCE), mi_imm(firstInstance));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue