Some SampledImageDescriptor members are assumed to be 16-byte aligned, such as the sw::Mipmap::pitchP member accessed by sampleFloat2D(). To guarantee this while descriptor sets can contain multiple types of descriptor, all descriptors are made a multiple of 16 bytes in size. Also, each descriptor set starts with a pointer to its layout, followed by the actual descriptor content. To ensure the latter is 16-byte aligned, the layout pointer was placed in a header structure which itself is 16-byte aligned and thus includes the necessary padding. The placement of the descriptor set itself is guaranteed to be 16-byte aligned by vk::REQUIRED_MEMORY_ALIGNMENT = 16 being used for descriptor pool allocation. Bug: b/129523279 Bug: b/123244275 Change-Id: I72fb92d9ff5a8d100d05f5b9e38170ade557d434 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29970 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:Ben Clayton <bclayton@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .vscode | Loading commit data... | |
| build | Loading commit data... | |
| docs | Loading commit data... | |
| extensions | Loading commit data... | |
| include | Loading commit data... | |
| src | Loading commit data... | |
| tests | Loading commit data... | |
| third_party | Loading commit data... | |
| .dir-locals.el | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gitmodules | Loading commit data... | |
| .travis.yml | Loading commit data... | |
| AUTHORS.txt | Loading commit data... | |
| Android.bp | Loading commit data... | |
| Android.mk | Loading commit data... | |
| BUILD.gn | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| CONTRIBUTING.txt | Loading commit data... | |
| CONTRIBUTORS.txt | Loading commit data... | |
| LICENSE.txt | Loading commit data... | |
| OWNERS | Loading commit data... | |
| README.md | Loading commit data... | |
| SwiftShader.sln | Loading commit data... |