Conversation
0473505 to
3e83a5d
Compare
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jan 31, 2024
…turization. (#55) Original motivation back when I first started this refactor was this bug: - EmbarkStudios/rust-gpu#1086 Progress stalled back then and I only revived the branch for the Vulkan layer (#53), because trying to run the Vulkan CTS with the SPIR-T layer would run into: - missing `OpSpecConstantOp` support (already implemented in the Vulkan layer branch) - structurizer region desync `list_eq_key` panics (fixed by this PR) - missing `OpTypeForwardPointer` support (not implemented yet, but it's much rarer and only used with `PhysicalStorageBuffer` pointers, since logical pointers don't allow recursive data types in the first place) On top of unblocking the SPIR-T Vulkan layer for in-depth testing, this refactor, out of necessity of not introducing even more spurious unused `bool`s, makes the existing ones as lazy as possible (within the limits of what the structurizer knows without adding more analysis passes). You can see in the `README.md` example, that this PR removes *both* extraneous `bool`s (for "does `break`" vs "doesn't `break`"), and instead the original condition (`v2`) is now used directly by the loop. I've also theoretically come up with even more advanced techniques (such as taking N disjoint targets that can be dispatched all at once, and lazily generating the appropriate propagation of integer values `0..N` to use a `switch`), but they either require other PRs to land as well first, and/or are too invasive and this has already been a ridiculous sunken cost compared to the measely benefits it offers.
Contributor
Author
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.
vectoraka [WIP] Introduce vectors as "native" SPIR-T types. #52Behavior is kind of arbitrary right now (mostly a demo), and ergonomics are lacking.
The main goal will be to run the full Vulkan CTS ("Conformance Test Suite") with it enabled.
Both of these should work (where
vkappis e.g.vkcube) on Linux:VK_LAYER_PATH=$PWD/vk-layer/manifests/target_debug_lib.so VK_LOADER_LAYERS_ENABLE=VK_LAYER_SPIRT_shaders vkappcargo build -p spirt-vk-layer --target=i686-unknown-linux-gnu VK_LAYER_PATH=$PWD/vk-layer/manifests/target_i686-unknown-linux-gnu_debug_lib.so VK_LOADER_LAYERS_ENABLE=VK_LAYER_SPIRT_shaders vkapp32On Linux/Mesa, by setting

MESA_LOADER_DRIVER_OVERRIDE=zinkas well, it ends up affecting OpenGL too: