i'm running some complex rendering code for integration testing on android emulator running on x86 linux, this code works nicely on android devices but on emulator i get "Vertex shader active uniforms exceed GL_MAX_VERTEX_UNIFORM_VECTORS (256)".
my emulator uses swiftshader, in the past when swiftshader wasn't vulkan only and had open gl specific code i was able to fix it this way:
--- a/swiftshader/src/OpenGL/libGLESv2/Context.h
+++ b/swiftshader/src/OpenGL/libGLESv2/Context.h
@@ -75,7 +75,7 @@
enum
{
MAX_VERTEX_ATTRIBS = sw::MAX_VERTEX_INPUTS,
- MAX_UNIFORM_VECTORS = 2051, // Device limit
+ MAX_UNIFORM_VECTORS = 256, // Device limit
MAX_VERTEX_UNIFORM_VECTORS = sw::VERTEX_UNIFORM_VECTORS - 3, // Reserve space for gl_DepthRange
MAX_VARYING_VECTORS = 10,
MAX_TEXTURE_IMAGE_UNITS = sw::TEXTURE_IMAGE_UNITS,
but now swift shader is stripped to vulkan only open gl is provided by angle on top of vulkan swiftshader, so swiftshader/src/OpenGL/libGLESv2/Context.h no longer exists. i wonder what would be my best bet for the fix for my integration testing need?
for example looking into angle and swift shader code i see that in src/libANGLE/Caps.cpp and also in other places in code we have maxVertexUniformVectors variable set to 256, i wonder if doing this fix there and rebuilding angle for emulator would be a good idea?