Reset the PixelUnpackState
for replay serialisation of glTexImage*
APIs
#3113
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.
Description
Reset the
PixelUnpackState
for replay serialisation of the following APIs:glTexImage1D
glTexImage2D
glTexImage3D
glCompressedTexImage1D
glCompressedTexImage2D
glCompressedTexImage3D
Did NOT add support for non-zero
pixels
parameter being used as an offset toGL_PIXEL_UNPACK_BUFFER
Notes
Could extend this work by:
pixels
parameter used as an offset toGL_PIXEL_UNPACK_BUFFER
(it looks like it would need capture changes to serialize extra data)UNPACK_ROW_LENGTH
and to cover theglCompressedTexImage?D
APIsTesting
Added a basic test for to
gl_texture_zoo
for non-zeroUNPACK_ROW_LENGTH
for the following APIs:glTexImage1D
glTexImage2D
glTexImage3D
The test fails before the code change and passes afterwards.
Background
Looking at GL APIs related to storing pixel data into textures discovered the following:
GL APIs affected by
glPixelStore
glTexImage1D
glTexImage2D
glTexImage3D
glCompressedTexImage1D
glCompressedTexImage2D
glCompressedTexImage3D
glTexSubImage1D
glTexSubImage2D
glTexSubImage3D
glCompressedTexSubImage1D
glCompressedTexSubImage2D
glCompressedTexSubImage1D
APIs that handle
glPixelStore
parameters during RenderDoc replayglTexSubImage1D
glTexSubImage2D
glTexSubImage3D
glCompressedTexSubImage1D
glCompressedTexSubImage2D
glCompressedTexSubImage1D
These APIs also DO support pixels being an offset into
GL_PIXEL_UNPACK_BUFFER
APIs that do not handle
glPixelStore
parameters during RenderDoc replayglTexImage1D
glTexImage2D
glTexImage3D
glCompressedTexImage1D
glCompressedTexImage2D
glCompressedTexImage3D
These APIs also DO NOT support the
pixels
parameter being a non-zero offset intoGL_PIXEL_UNPACK_BUFFER
(which is supported by the replay serialisation of the other GL texture storage APIs).