Fix resizing of gl_PrimitiveIndicesNV[] to max_primitives*geomSize

- This change also allows redeclaration of gl_PrimitiveIndicesNV and
  adds error checks against incorrect explicit array size.
- Also modifies gtests to check array bound limits and redeclare gl_PrimitiveIndicesNV[].
This commit is contained in:
Sahil Parmar
2019-02-11 15:12:13 -08:00
parent 05d12a9461
commit ab027bef3d
6 changed files with 106 additions and 64 deletions

View File

@@ -50,8 +50,9 @@ void main()
BARRIER();
// should truncate 257 -> 1
gl_PrimitiveIndicesNV[0] = 257;
// check bound limits
gl_PrimitiveIndicesNV[0] = 257; // should truncate 257 -> 1
gl_PrimitiveIndicesNV[(MAX_PRIM * 3) - 1] = 2;
gl_PrimitiveIndicesNV[gid] = gl_PrimitiveIndicesNV[gid-1];
// writes 4 indices at offset gl_DrawID