From 465d1aece78cde4ee95301465554e6f716a87888 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 27 Jan 2020 09:27:23 -0500 Subject: [PATCH] Better value for max vertex_attrib_loc --- mojoshader_opengl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mojoshader_opengl.c b/mojoshader_opengl.c index fbf888f3..293ff19d 100644 --- a/mojoshader_opengl.c +++ b/mojoshader_opengl.c @@ -118,8 +118,14 @@ struct MOJOSHADER_glProgram 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;