@@ -345,6 +345,7 @@ class GLUniform {
345345 // In multiples of 4 bytes
346346 // FIXME: the uniform structs are actually std140 so it would be more relevant to provide std140 info
347347 const GLuint _std430BaseSize;
348+ GLuint _std430Size; // includes padding that depends on the other uniforms in the struct
348349 const GLuint _std430Alignment;
349350 const GLuint _bufferSize;
350351 GLuint _nextUniformOffset;
@@ -379,13 +380,13 @@ class GLUniform {
379380 uint32_t * currentValue;
380381
381382 const bool bufferUniform = ( _shader->UseMaterialSystem () && _updateType == MATERIAL_OR_PUSH )
382- || ( glConfig2 .pushBufferAvailable && _updateType <= FRAME );
383+ || ( glConfig .pushBufferAvailable && _updateType <= FRAME );
383384
384385 if ( bufferUniform ) {
385386 currentValue = _shader->uniformStorage + _uniformStorageOffset;
386387 } else {
387388 ShaderProgramDescriptor* p = _shader->GetProgram ();
388- ASSERT_EQ ( p, glState.currentProgram );
389+ DAEMON_ASSERT_EQ ( p, glState.currentProgram );
389390
390391 currentValue = p->uniformStorage + _uniformStorageOffset;
391392 }
@@ -416,7 +417,7 @@ class GLUniform {
416417 uint32_t * currentValue;
417418
418419 const bool bufferUniform = ( _shader->UseMaterialSystem () && _updateType == MATERIAL_OR_PUSH )
419- || ( glConfig2 .pushBufferAvailable && _updateType <= FRAME );
420+ || ( glConfig .pushBufferAvailable && _updateType <= FRAME );
420421
421422 if ( bufferUniform ) {
422423 currentValue = _shader->uniformStorage + _uniformStorageOffset;
0 commit comments