-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the bug using uniform block array
At the beginning of Program::defineUniformBlock, getUniformBlockSize will call getUniformBlockIndex on MacOS to check if the block is an active block with giving blockName. However, it didn't distinguish array and non-array situations and unified to use interfaceBlock.name as the blockName to call getUniformBlockIndex. It would result that INVALID_INDEX was returned when it's a block array. For example, using 'blockName' not 'blockName[0]'. In OpenGL 4.3 spec, section 7.3.1, there are following descriptions: If name exactly matches the name string of one of the active resources for programInterface, the index of the matched resource is returned. Additionally, if name would exactly match the name string of an active resource if "[0]" were appended to name, the index of the matched resource is returned. Otherwise, name is considered not to be the name of an active resource, and INVALID_INDEX is returned. So, for array block case, we use blockName appending [0] to check the activity. BUG=angleproject:1543 Change-Id: I8189b62066b779f7d392a7dba1cf5cb02a31936d Reviewed-on: https://chromium-review.googlesource.com/405830 Reviewed-by: Jamie Madill <[email protected]> Reviewed-by: Geoff Lang <[email protected]> Commit-Queue: Geoff Lang <[email protected]>
- Loading branch information
Showing
2 changed files
with
49 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters