Comment out uniform pushing optimization. It's buggy at the moment.
--- a/mojoshader_opengl.c Sun Jul 27 02:29:07 2008 -0400
+++ b/mojoshader_opengl.c Wed Jul 30 04:59:35 2008 -0400
@@ -1534,7 +1534,7 @@
const size_t len = size * sizeof (GLfloat) * 4;
GLfloat *current = map->uniform_array_buffer;
- if (memcmp(current, f, len) != 0)
+ //if (memcmp(current, f, len) != 0)
{
// array has changed, upload it.
ctx->profileUniform4fv(pd, location, size, f);
@@ -1547,7 +1547,7 @@
if (type == MOJOSHADER_UNIFORM_FLOAT)
{
GLfloat *f = ®f[index * 4];
- if (memcmp(map->value.f, f, sizeof (map->value.f)) != 0)
+ //if (memcmp(map->value.f, f, sizeof (map->value.f)) != 0)
{
memcpy(map->value.f, f, sizeof (map->value.f));
ctx->profileUniform4fv(pd, location, 1, f);
@@ -1556,7 +1556,7 @@
else if (type == MOJOSHADER_UNIFORM_INT)
{
GLint *i = ®i[index * 4];
- if (memcmp(map->value.i, i, sizeof (map->value.i)) != 0)
+ //if (memcmp(map->value.i, i, sizeof (map->value.i)) != 0)
{
memcpy(map->value.i, i, sizeof (map->value.i));
ctx->profileUniform4iv(pd, location, 1, i);
@@ -1565,7 +1565,7 @@
else if (type == MOJOSHADER_UNIFORM_BOOL)
{
const GLint b = regb[index];
- if (b != map->value.b)
+ //if (b != map->value.b)
{
map->value.b = b;
ctx->profileUniform1i(pd, location, b);