diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-06-17 18:16:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-06-20 13:30:48 +0300 |
commit | ff1883307f12a8b734bfcf87b01743dc73afae75 (patch) | |
tree | 95fbecc1e681e89f6a5d030cb5f5f96879dc7fa7 /intern/cycles/kernel/device/optix/globals.h | |
parent | b73a52302edcd99f086fc26fc62a8ed4db29d562 (diff) |
Cleanup: renaming and consistency for kernel data
* Rename "texture" to "data array". This has not used textures for a long time,
there are just global memory arrays now. (On old CUDA GPUs there was a cache
for textures but not global memory, so we used to put all data in textures.)
* For CUDA and HIP, put globals in KernelParams struct like other devices.
* Drop __ prefix for data array names, no possibility for naming conflict now that
these are in a struct.
Diffstat (limited to 'intern/cycles/kernel/device/optix/globals.h')
-rw-r--r-- | intern/cycles/kernel/device/optix/globals.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/intern/cycles/kernel/device/optix/globals.h b/intern/cycles/kernel/device/optix/globals.h index bb752c531f0..7af2e421378 100644 --- a/intern/cycles/kernel/device/optix/globals.h +++ b/intern/cycles/kernel/device/optix/globals.h @@ -28,21 +28,21 @@ struct KernelParamsOptiX { /* Global scene data and textures */ KernelData data; -#define KERNEL_TEX(type, name) const type *name; -#include "kernel/textures.h" +#define KERNEL_DATA_ARRAY(type, name) const type *name; +#include "kernel/data_arrays.h" /* Integrator state */ - IntegratorStateGPU __integrator_state; + IntegratorStateGPU integrator_state; }; #ifdef __NVCC__ -extern "C" static __constant__ KernelParamsOptiX __params; +extern "C" static __constant__ KernelParamsOptiX kernel_params; #endif /* Abstraction macros */ -#define kernel_data __params.data -#define kernel_tex_array(t) __params.t -#define kernel_tex_fetch(t, index) __params.t[(index)] -#define kernel_integrator_state __params.__integrator_state +#define kernel_data kernel_params.data +#define kernel_data_array(name) kernel_params.name +#define kernel_data_fetch(name, index) kernel_params.name[(index)] +#define kernel_integrator_state kernel_params.integrator_state CCL_NAMESPACE_END |