bug:
34245909
If the vertex attribute divisor is nonzero,
that actually affects first index for non-instanced draws
at least.
TODO: Figure out if this affects the instanced draws too.
dEQP-GLES3.functional.draw.random.210 : Fail -> Pass
Change-Id: Ida45d4689e0418ad8679091556a9fcaa64bbe25e
int stride = curr_binding.stride;
int effectiveStride = curr_binding.effectiveStride;
uintptr_t offset = curr_binding.offset;
+
int firstIndex = effectiveStride * first;
+ if (firstIndex && divisor && !primcount) {
+ // If firstIndex != 0 according to effectiveStride * first,
+ // it needs to be adjusted if a divisor has been specified,
+ // even if we are not in glDraw***Instanced.
+ firstIndex = 0;
+ }
if (bufferObject == 0) {
unsigned int datalen = state.elementSize * count;