SFGraphics icon indicating copy to clipboard operation
SFGraphics copied to clipboard

Validate buffer writes for uniform blocks

Open ScanMountGoat opened this issue 5 years ago • 0 comments

Buffers will most likely be initialized once and then bound to shaders many times, so there is little performance impact for doing these checks. Writes should only be checked to ensure they don't exceed the length of the variable in the uniform blocks. Writing a byte[3] to a float should still be valid, for example.

  • [ ] check if write would exceed the buffer's storage
  • [ ] check if write would exceed the size of the uniform variable
  • [ ] check writes for arrays

ScanMountGoat avatar Jul 15 '20 02:07 ScanMountGoat