Fix reading of depth textures/buffers in ODR.#2652
Merged
pmuetschard merged 4 commits intogoogle:masterfrom Mar 7, 2019
Merged
Fix reading of depth textures/buffers in ODR.#2652pmuetschard merged 4 commits intogoogle:masterfrom
pmuetschard merged 4 commits intogoogle:masterfrom
Conversation
A 32bit depth and 8bit stencil buffer has format GL_DEPTH32F_STENCIL8.
GLES does not actually have `GL_DEPTH_COMPONENT32`. Instead, `GL_DEPTH_COMPONENT` with `GL_UNSIGNED_INT` is actually a `GL_DEPTH_COMPONENT24` format.
Adds the internal format, as specified by the application, to the `Image` struct. This field is only maintained for texture images and represents the internal format as specified by the application and may thus be unsized (GLES2) or sized (GLES3). This is primarily required for reading the data back from the GPU, as there are limitations when using GLES2 type texture specification.
Depth textures, and framebuffers backed by depth textures, that where created with an unsized internal format require special handling when read back from the GPU. For example, when blitting a FB, the source and target formats will have to match and thus have to both be created with a sized or unsized internal format. Fixes google#2584
Member
Author
|
Note that the field added in 60bef28 is only used in one place in this PR, but will need to be used in other places as well. For example, my test app for this doesn't replay correctly in MEC, due to the fact that you can use |
AWoloszyn
approved these changes
Mar 7, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depth textures, and framebuffers backed by depth textures, that where created with an unsized internal format require special handling when read back from the GPU. For example, when blitting a FB, the source and target formats will have to match and thus have to both be created with a sized or unsized internal format.
Fixes #2584