chore: cherry-pick c4f3b713800f from swiftshader #25266
Merged
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.
Fix copying cubemap textures out of bounds
Cubemap textures are created with a border, which means that their
size is larger. Their range is also different. Instead of [0, dim-1],
they have a [-1, dim] range. This means that if we copy them starting
at [0, 0] for their full size, we'll overflow at the end, since the
buffer starts at [-1, -1]. This cl prevents going through the fast
copy path when we have a border.
Bug: chromium:1115345
Change-Id: I333acfd6094645231eb111634359d82ed3d5c787
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/47668
Presubmit-Ready: Alexis Hétu sugoi@google.com
Reviewed-by: Corentin Wallez cwallez@google.com
Reviewed-by: Chris Forbes chrisforbes@google.com
Tested-by: Alexis Hétu sugoi@google.com
Notes: Security: backported fix for 1115345.