diff options
author | Karol Herbst <[email protected]> | 2019-12-05 11:42:14 +0100 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-12-11 23:54:39 +0000 |
commit | 6d08f034ce5695032c0d3f156907f6a0177b0556 (patch) | |
tree | bddaebab368f8eb7bec6691a1907c3960a47efd9 | |
parent | 2402232c90ef362a6cf14ff1cf5518e6c25bf9f9 (diff) |
clover/nir: treat UniformConstant as global memory
Just like we already do in the llvm backend. The current constant buffer code
seems fundamentally flawed and right now we are thinking on how we want to
reimplement all of that.
But until that happens, just treat is as global memory and go on.
Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/clover/nir/invocation.cpp | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/spirv/invocation.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/nir/invocation.cpp b/src/gallium/state_trackers/clover/nir/invocation.cpp index ceeb3a45c5b..75a1d63ba0c 100644 --- a/src/gallium/state_trackers/clover/nir/invocation.cpp +++ b/src/gallium/state_trackers/clover/nir/invocation.cpp @@ -68,6 +68,7 @@ module clover::nir::spirv_to_nir(const module &mod, const device &dev, spirv_options.caps.int16 = true; spirv_options.caps.int64 = true; spirv_options.caps.kernel = true; + spirv_options.constant_as_global = true; module m; // We only insert one section. diff --git a/src/gallium/state_trackers/clover/spirv/invocation.cpp b/src/gallium/state_trackers/clover/spirv/invocation.cpp index 620c6b1e0ea..c368e430de5 100644 --- a/src/gallium/state_trackers/clover/spirv/invocation.cpp +++ b/src/gallium/state_trackers/clover/spirv/invocation.cpp @@ -62,7 +62,7 @@ namespace { case SpvStorageClassFunction: return module::argument::scalar; case SpvStorageClassUniformConstant: - return module::argument::constant; + return module::argument::global; case SpvStorageClassWorkgroup: return module::argument::local; case SpvStorageClassCrossWorkgroup: |