-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Filament Uniform Buffer Size Issue - Model Rendering Failure
Problem Summary
When attempting to load and render 3D models, the application encounters a uniform buffer binding error that prevents successful model rendering. The system allocates a buffer that is too small for the required uniform data.
Error Details
ValidateProgramUniformBlockBindings: Bound buffer is too small
(Bound buffer is 16384 bytes, 65520 bytes expected)
:0: DrawElements: ValidateState() failed
System Configuration
GPU Information:
- GPU Vendor: Imagination Technologies
- GPU Model: PowerVR Rogue GE8300
- OpenGL ES Version: 3.2 (build 1.11@5516664)
- GLSL ES Version: 3.20 (build 1.11@5516664)
- Feature Level: 2 (Backend), 1 (Engine)
OpenGL ES Capabilities:
- GL_MAX_UNIFORM_BLOCK_SIZE: 134,217,728 bytes (128MB)
- GL_MAX_UNIFORM_BUFFER_BINDINGS: 72
- GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT: 64 bytes
- GL_MAX_TEXTURE_IMAGE_UNITS: 16
- GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: 96
- GL_MAX_TEXTURE_SIZE: 4096
- GL_MAX_SAMPLES: 4
Active GPU Workarounds:
- disable_glFlush
- allow_read_only_ancillary_feedback_loop
- powervr_shader_workarounds
- delay_fbo_destruction
Platform:
- OS Version: Android API 29
Technical Analysis
The error indicates a significant discrepancy between:
- Allocated Buffer Size: 16,384 bytes (16KB)
- Required Buffer Size: 65,520 bytes (~64KB)
Key Observations
- Hardware Capability vs. Allocation: While the GPU supports up to 128MB for uniform blocks (GL_MAX_UNIFORM_BLOCK_SIZE), the actual buffer allocated by Filament is only 16KB.
- PowerVR-Specific Issue: The presence of powervr_shader_workarounds suggests this GPU has known limitations that may affect buffer management.
- Feature Level Mismatch: There's a discrepancy between backend feature level (2) and engine feature level (1), which may impact buffer allocation strategies.
Expected Behavior
Models should render successfully with properly sized uniform buffers that accommodate all required uniform data for the shaders.
Actual Behavior
Model rendering fails with a buffer size validation error, resulting in no visual output. The rendering pipeline cannot proceed due to insufficient uniform buffer allocation.
This issue prevents the application from displaying 3D models on PowerVR Rogue GE8300 GPU devices running Android API 29.