Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht>2021-10-17 17:10:10 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-18 20:02:10 +0300
commit1df3b51988852fa8ee6b530a64aa23346db9acd4 (patch)
treedd79dba4c8ff8bb8474cc399e9d1b308d845e0cb /intern/cycles/kernel/geom/geom_primitive.h
parent44c3bb729be42d6d67eaf8918d7cbcb2ff0b315d (diff)
Cycles: replace integrator state argument macros
* Rename struct KernelGlobals to struct KernelGlobalsCPU * Add KernelGlobals, IntegratorState and ConstIntegratorState typedefs that every device can define in its own way. * Remove INTEGRATOR_STATE_ARGS and INTEGRATOR_STATE_PASS macros and replace with these new typedefs. * Add explicit state argument to INTEGRATOR_STATE and similar macros In preparation for decoupling main and shadow paths. Differential Revision: https://developer.blender.org/D12888
Diffstat (limited to 'intern/cycles/kernel/geom/geom_primitive.h')
-rw-r--r--intern/cycles/kernel/geom/geom_primitive.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/intern/cycles/kernel/geom/geom_primitive.h b/intern/cycles/kernel/geom/geom_primitive.h
index 869b911f76f..91b29c7f990 100644
--- a/intern/cycles/kernel/geom/geom_primitive.h
+++ b/intern/cycles/kernel/geom/geom_primitive.h
@@ -31,7 +31,7 @@ CCL_NAMESPACE_BEGIN
* attributes for performance, mainly for GPU performance to avoid bringing in
* heavy volume interpolation code. */
-ccl_device_inline float primitive_surface_attribute_float(ccl_global const KernelGlobals *kg,
+ccl_device_inline float primitive_surface_attribute_float(KernelGlobals kg,
ccl_private const ShaderData *sd,
const AttributeDescriptor desc,
ccl_private float *dx,
@@ -57,7 +57,7 @@ ccl_device_inline float primitive_surface_attribute_float(ccl_global const Kerne
}
}
-ccl_device_inline float2 primitive_surface_attribute_float2(ccl_global const KernelGlobals *kg,
+ccl_device_inline float2 primitive_surface_attribute_float2(KernelGlobals kg,
ccl_private const ShaderData *sd,
const AttributeDescriptor desc,
ccl_private float2 *dx,
@@ -83,7 +83,7 @@ ccl_device_inline float2 primitive_surface_attribute_float2(ccl_global const Ker
}
}
-ccl_device_inline float3 primitive_surface_attribute_float3(ccl_global const KernelGlobals *kg,
+ccl_device_inline float3 primitive_surface_attribute_float3(KernelGlobals kg,
ccl_private const ShaderData *sd,
const AttributeDescriptor desc,
ccl_private float3 *dx,
@@ -109,12 +109,11 @@ ccl_device_inline float3 primitive_surface_attribute_float3(ccl_global const Ker
}
}
-ccl_device_forceinline float4
-primitive_surface_attribute_float4(ccl_global const KernelGlobals *kg,
- ccl_private const ShaderData *sd,
- const AttributeDescriptor desc,
- ccl_private float4 *dx,
- ccl_private float4 *dy)
+ccl_device_forceinline float4 primitive_surface_attribute_float4(KernelGlobals kg,
+ ccl_private const ShaderData *sd,
+ const AttributeDescriptor desc,
+ ccl_private float4 *dx,
+ ccl_private float4 *dy)
{
if (sd->type & PRIMITIVE_ALL_TRIANGLE) {
if (subd_triangle_patch(kg, sd) == ~0)
@@ -149,7 +148,7 @@ ccl_device_inline bool primitive_is_volume_attribute(ccl_private const ShaderDat
return sd->type == PRIMITIVE_VOLUME;
}
-ccl_device_inline float primitive_volume_attribute_float(ccl_global const KernelGlobals *kg,
+ccl_device_inline float primitive_volume_attribute_float(KernelGlobals kg,
ccl_private const ShaderData *sd,
const AttributeDescriptor desc)
{
@@ -161,7 +160,7 @@ ccl_device_inline float primitive_volume_attribute_float(ccl_global const Kernel
}
}
-ccl_device_inline float3 primitive_volume_attribute_float3(ccl_global const KernelGlobals *kg,
+ccl_device_inline float3 primitive_volume_attribute_float3(KernelGlobals kg,
ccl_private const ShaderData *sd,
const AttributeDescriptor desc)
{
@@ -173,7 +172,7 @@ ccl_device_inline float3 primitive_volume_attribute_float3(ccl_global const Kern
}
}
-ccl_device_inline float4 primitive_volume_attribute_float4(ccl_global const KernelGlobals *kg,
+ccl_device_inline float4 primitive_volume_attribute_float4(KernelGlobals kg,
ccl_private const ShaderData *sd,
const AttributeDescriptor desc)
{
@@ -188,8 +187,7 @@ ccl_device_inline float4 primitive_volume_attribute_float4(ccl_global const Kern
/* Default UV coordinate */
-ccl_device_inline float3 primitive_uv(ccl_global const KernelGlobals *kg,
- ccl_private const ShaderData *sd)
+ccl_device_inline float3 primitive_uv(KernelGlobals kg, ccl_private const ShaderData *sd)
{
const AttributeDescriptor desc = find_attribute(kg, sd, ATTR_STD_UV);
@@ -202,7 +200,7 @@ ccl_device_inline float3 primitive_uv(ccl_global const KernelGlobals *kg,
/* Ptex coordinates */
-ccl_device bool primitive_ptex(ccl_global const KernelGlobals *kg,
+ccl_device bool primitive_ptex(KernelGlobals kg,
ccl_private ShaderData *sd,
ccl_private float2 *uv,
ccl_private int *face_id)
@@ -225,7 +223,7 @@ ccl_device bool primitive_ptex(ccl_global const KernelGlobals *kg,
/* Surface tangent */
-ccl_device float3 primitive_tangent(ccl_global const KernelGlobals *kg, ccl_private ShaderData *sd)
+ccl_device float3 primitive_tangent(KernelGlobals kg, ccl_private ShaderData *sd)
{
#ifdef __HAIR__
if (sd->type & PRIMITIVE_ALL_CURVE)
@@ -257,7 +255,7 @@ ccl_device float3 primitive_tangent(ccl_global const KernelGlobals *kg, ccl_priv
/* Motion vector for motion pass */
-ccl_device_inline float4 primitive_motion_vector(ccl_global const KernelGlobals *kg,
+ccl_device_inline float4 primitive_motion_vector(KernelGlobals kg,
ccl_private const ShaderData *sd)
{
/* center position */