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/data_arrays.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/data_arrays.h')
-rw-r--r-- | intern/cycles/kernel/data_arrays.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/intern/cycles/kernel/data_arrays.h b/intern/cycles/kernel/data_arrays.h new file mode 100644 index 00000000000..7205f728088 --- /dev/null +++ b/intern/cycles/kernel/data_arrays.h @@ -0,0 +1,82 @@ +/* SPDX-License-Identifier: Apache-2.0 + * Copyright 2011-2022 Blender Foundation */ + +#ifndef KERNEL_DATA_ARRAY +# define KERNEL_DATA_ARRAY(type, name) +#endif + +/* BVH2, not used for OptiX or Embree. */ +KERNEL_DATA_ARRAY(float4, bvh_nodes) +KERNEL_DATA_ARRAY(float4, bvh_leaf_nodes) +KERNEL_DATA_ARRAY(uint, prim_type) +KERNEL_DATA_ARRAY(uint, prim_visibility) +KERNEL_DATA_ARRAY(uint, prim_index) +KERNEL_DATA_ARRAY(uint, prim_object) +KERNEL_DATA_ARRAY(uint, object_node) +KERNEL_DATA_ARRAY(float2, prim_time) + +/* objects */ +KERNEL_DATA_ARRAY(KernelObject, objects) +KERNEL_DATA_ARRAY(Transform, object_motion_pass) +KERNEL_DATA_ARRAY(DecomposedTransform, object_motion) +KERNEL_DATA_ARRAY(uint, object_flag) +KERNEL_DATA_ARRAY(float, object_volume_step) +KERNEL_DATA_ARRAY(uint, object_prim_offset) + +/* cameras */ +KERNEL_DATA_ARRAY(DecomposedTransform, camera_motion) + +/* triangles */ +KERNEL_DATA_ARRAY(uint, tri_shader) +KERNEL_DATA_ARRAY(packed_float3, tri_vnormal) +KERNEL_DATA_ARRAY(uint4, tri_vindex) +KERNEL_DATA_ARRAY(uint, tri_patch) +KERNEL_DATA_ARRAY(float2, tri_patch_uv) +KERNEL_DATA_ARRAY(packed_float3, tri_verts) + +/* curves */ +KERNEL_DATA_ARRAY(KernelCurve, curves) +KERNEL_DATA_ARRAY(float4, curve_keys) +KERNEL_DATA_ARRAY(KernelCurveSegment, curve_segments) + +/* patches */ +KERNEL_DATA_ARRAY(uint, patches) + +/* pointclouds */ +KERNEL_DATA_ARRAY(float4, points) +KERNEL_DATA_ARRAY(uint, points_shader) + +/* attributes */ +KERNEL_DATA_ARRAY(AttributeMap, attributes_map) +KERNEL_DATA_ARRAY(float, attributes_float) +KERNEL_DATA_ARRAY(float2, attributes_float2) +KERNEL_DATA_ARRAY(packed_float3, attributes_float3) +KERNEL_DATA_ARRAY(float4, attributes_float4) +KERNEL_DATA_ARRAY(uchar4, attributes_uchar4) + +/* lights */ +KERNEL_DATA_ARRAY(KernelLightDistribution, light_distribution) +KERNEL_DATA_ARRAY(KernelLight, lights) +KERNEL_DATA_ARRAY(float2, light_background_marginal_cdf) +KERNEL_DATA_ARRAY(float2, light_background_conditional_cdf) + +/* particles */ +KERNEL_DATA_ARRAY(KernelParticle, particles) + +/* shaders */ +KERNEL_DATA_ARRAY(uint4, svm_nodes) +KERNEL_DATA_ARRAY(KernelShader, shaders) + +/* lookup tables */ +KERNEL_DATA_ARRAY(float, lookup_table) + +/* sobol */ +KERNEL_DATA_ARRAY(float, sample_pattern_lut) + +/* image textures */ +KERNEL_DATA_ARRAY(TextureInfo, texture_info) + +/* ies lights */ +KERNEL_DATA_ARRAY(float, ies) + +#undef KERNEL_DATA_ARRAY |