Better value for max vertex_attrib_loc
authorEthan Lee <flibitijibibo@flibitijibibo.com>
Mon, 27 Jan 2020 09:27:23 -0500
changeset 1232 eec14d60f416
parent 1231 76468460693e
child 1233 e3bd5f116e38
Better value for max vertex_attrib_loc
mojoshader_opengl.c
--- a/mojoshader_opengl.c	Mon Jan 27 09:26:35 2020 -0500
+++ b/mojoshader_opengl.c	Mon Jan 27 09:27:23 2020 -0500
@@ -118,8 +118,14 @@
 
     int uses_pointsize;
 
-    // 10 is apparently the resource limit according to SM3 -flibit
-    GLint vertex_attrib_loc[MOJOSHADER_USAGE_TOTAL][10];
+    // According to MSDN...
+    //
+    // n is an optional integer between 0 and the number of resources supported.
+    //  For example, POSITION0, TEXCOOR1, etc.
+    //
+    // The input registers consist of 16 four-component floating-point vectors,
+    //   designated as v0 through v15.
+    GLint vertex_attrib_loc[MOJOSHADER_USAGE_TOTAL][16];
 
     // GLSL uses these...location of uniform arrays.
     GLint vs_float4_loc;