Add assert for broken locations

Change-Id: I4750715a635ca3f929ae8d282c6cbaedfd4186f3
Reviewed-on: https://swiftshader-review.googlesource.com/c/23490
Tested-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Pipeline/SpirvShader.cpp b/src/Pipeline/SpirvShader.cpp
index 08d0d25..ae76ff8 100644
--- a/src/Pipeline/SpirvShader.cpp
+++ b/src/Pipeline/SpirvShader.cpp
@@ -190,6 +190,7 @@
 				break;
 
 			default:
+				printf("Warning: ignored opcode %u\n", insn.opcode());
 				break;    // This is OK, these passes are intentionally partial
 			}
 		}
@@ -336,6 +337,7 @@
 	{
 		// 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;