From: Karol Herbst Date: Thu, 5 Dec 2019 10:42:14 +0000 (+0100) Subject: clover/nir: treat UniformConstant as global memory X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d08f034ce5695032c0d3f156907f6a0177b0556;p=mesa.git 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 Reviewed-by: Alyssa Rosenzweig Reviewed-by: Dave Airlie --- 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: