This path shouldn't be possible for in-spec shaders, but let's be
defensive. (Because security, right? Mostly because Coverity.)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
// share a buffer in the decoder, but we only care about
// the position in the constant stream; the total number of
// instructions is redundant.
- unsigned const_idx = 7;
+ unsigned const_idx = 0;
switch (pos) {
case 0:
case 1:
break;
default:
printf("# unknown pos 0x%x\n", pos);
+ break;
}
+
if (num_consts < const_idx + 2)
num_consts = const_idx + 2;
+
consts[const_idx] = const0;
consts[const_idx + 1] = const1;
done = stop;