Commit 64c44b0c by Chris Forbes

Add assert for broken locations

Change-Id: I4750715a635ca3f929ae8d282c6cbaedfd4186f3 Reviewed-on: https://swiftshader-review.googlesource.com/c/23490Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent d9ce258c
......@@ -190,6 +190,7 @@ namespace sw
break;
default:
printf("Warning: ignored opcode %u\n", insn.opcode());
break; // This is OK, these passes are intentionally partial
}
}
......@@ -336,6 +337,7 @@ namespace sw
{
// Populate a single scalar slot in the interface from a collection of decorations and the intended component type.
auto scalarSlot = (d.Location << 2) | d.Component;
assert(scalarSlot >= 0 && scalarSlot < static_cast<int32_t>(iface->size()));
auto &slot = (*iface)[scalarSlot];
slot.Type = type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment