From a45c36efae07f22dd1da1ebac728324aeafce85e Mon Sep 17 00:00:00 2001 From: Patrick Mours Date: Mon, 12 Sep 2022 18:46:20 +0200 Subject: Cycles: Make OSL implementation independent from SVM Cleans up the file structure to be more similar to that of the SVM and also makes it possible to build kernels with OSL support, but without having to include SVM support. This patch was split from D15902. Differential Revision: https://developer.blender.org/D15949 --- intern/cycles/device/cpu/device_impl.cpp | 1 - intern/cycles/device/cpu/device_impl.h | 1 - intern/cycles/device/cpu/kernel_thread_globals.cpp | 7 ++----- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'intern/cycles/device/cpu') diff --git a/intern/cycles/device/cpu/device_impl.cpp b/intern/cycles/device/cpu/device_impl.cpp index 1e4b9baa0c0..a2b8d1cbbfa 100644 --- a/intern/cycles/device/cpu/device_impl.cpp +++ b/intern/cycles/device/cpu/device_impl.cpp @@ -28,7 +28,6 @@ #include "kernel/device/cpu/kernel.h" #include "kernel/types.h" -#include "kernel/osl/shader.h" #include "kernel/osl/globals.h" // clang-format on diff --git a/intern/cycles/device/cpu/device_impl.h b/intern/cycles/device/cpu/device_impl.h index 5c1f3cc6ce5..e7e77f18194 100644 --- a/intern/cycles/device/cpu/device_impl.h +++ b/intern/cycles/device/cpu/device_impl.h @@ -23,7 +23,6 @@ #include "kernel/device/cpu/kernel.h" #include "kernel/device/cpu/globals.h" -#include "kernel/osl/shader.h" #include "kernel/osl/globals.h" // clang-format on diff --git a/intern/cycles/device/cpu/kernel_thread_globals.cpp b/intern/cycles/device/cpu/kernel_thread_globals.cpp index 89545399602..99af1525d92 100644 --- a/intern/cycles/device/cpu/kernel_thread_globals.cpp +++ b/intern/cycles/device/cpu/kernel_thread_globals.cpp @@ -3,10 +3,7 @@ #include "device/cpu/kernel_thread_globals.h" -// clang-format off -#include "kernel/osl/shader.h" #include "kernel/osl/globals.h" -// clang-format on #include "util/profiling.h" @@ -20,7 +17,7 @@ CPUKernelThreadGlobals::CPUKernelThreadGlobals(const KernelGlobalsCPU &kernel_gl reset_runtime_memory(); #ifdef WITH_OSL - OSLShader::thread_init(this, reinterpret_cast(osl_globals_memory)); + OSLGlobals::thread_init(this, static_cast(osl_globals_memory)); #else (void)osl_globals_memory; #endif @@ -35,7 +32,7 @@ CPUKernelThreadGlobals::CPUKernelThreadGlobals(CPUKernelThreadGlobals &&other) n CPUKernelThreadGlobals::~CPUKernelThreadGlobals() { #ifdef WITH_OSL - OSLShader::thread_free(this); + OSLGlobals::thread_free(this); #endif } -- cgit v1.2.3