-
Notifications
You must be signed in to change notification settings - Fork 265
Description
Bug Report: Incorrect Vertex Positioning When Drawing Large Number of Vertices in a StateGroup
Description
When attempting to draw 2D graphics using the engine, adding a drawCall command within a StateGroup that utilizes a vertex count of approximately 10 million and an index count of around 20 million results in the final vertex being incorrectly positioned at the (0,0) coordinates.
Initially, I suspected a memory allocation overflow might be the cause. Upon checking the configuration parameters in the ResourceRequirements.h file, specifically adjusting the VkDeviceSize minimumBufferSize = 16 * 1024 * 1024, the issue persists even after modifying this setting.
Interestingly, splitting the 10 million vertices into 10 separate batches and drawing them within individual StateGroup instances resolves the problem.
Steps to Reproduce
- Use the engine to attempt drawing with a
StateGroup. - Add a
drawCallcontaining approximately 10 million vertices and 20 million indices. - Observe the incorrect positioning of the last vertex at (0,0).
Expected Behavior
The expectation is for all vertices to be drawn correctly without any positional errors or misplacements regardless of the number of vertices or indices used.
Actual Behavior
The last vertex ends up being placed at (0,0), indicating an issue with either the buffer handling or state management within large draw calls.
Temporary Workaround
Splitting the vertices into smaller batches and rendering each batch within its own StateGroup mitigates the issue.
Environment
- Engine version: [Specify the version you're using]
- Operating System: [Your OS information]
Additional Information
Upon examining the ResourceRequirements.h file, it was observed that changing the minimumBufferSize did not resolve the issue. Further investigation or advice from the development team would be greatly appreciated to pinpoint the root cause.