Currently all conditional branches in SPIR-V shaders are 'flattened', resulting in the execution of all instructions in both code paths, even in the case where none of the SIMD lanes are active. If a logically never taken code path contains an image sampling instruction which accesses a sampler or image array out of bounds, this could lead to reading invalid descriptor data, or a page fault. This is fixed by checking if any SIMD lanes are active, and if not, jumping over the actual sampling operations which access the descriptor data. Bug: b/153380916 Change-Id: I8e0cf7ef855e1250ce6dce9ebf7a47e29da7814d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43549Tested-by:Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .vscode | Loading commit data... | |
| build | Loading commit data... | |
| build_overrides | 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... | |
| tools/cmake_generate_graphviz | Loading commit data... | |
| .clang-format | 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... | |
| BUILD.gn | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| CMakeSettings.json | 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... | |
| codereview.settings | Loading commit data... |