diff options
author | Xavier Hallade <xavier.hallade@intel.com> | 2022-06-23 19:30:49 +0300 |
---|---|---|
committer | Xavier Hallade <xavier.hallade@intel.com> | 2022-06-23 19:36:48 +0300 |
commit | 633c2f07da2926e42f5bb5d43d16dd23767c498c (patch) | |
tree | 099e4f11c5e65acdc563aa62a4e466bfbde044e0 /intern/cycles/kernel/geom/primitive.h | |
parent | 2eba15d3e862fdf112edda6b26b7e1535f0fdb07 (diff) |
Cyles: switch primitive.h inline hints to forceinline
This change helps decrease Intel GPU binaries compile time by 5-10
minutes without impacting other backends.
Reviewed By: sergey, brecht
Differential Revision: http://developer.blender.org/D15273
Diffstat (limited to 'intern/cycles/kernel/geom/primitive.h')
-rw-r--r-- | intern/cycles/kernel/geom/primitive.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/intern/cycles/kernel/geom/primitive.h b/intern/cycles/kernel/geom/primitive.h index 9b4b61fbd84..0f1a3fc11bc 100644 --- a/intern/cycles/kernel/geom/primitive.h +++ b/intern/cycles/kernel/geom/primitive.h @@ -18,11 +18,11 @@ 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(KernelGlobals kg, - ccl_private const ShaderData *sd, - const AttributeDescriptor desc, - ccl_private float *dx, - ccl_private float *dy) +ccl_device_forceinline float primitive_surface_attribute_float(KernelGlobals kg, + ccl_private const ShaderData *sd, + const AttributeDescriptor desc, + ccl_private float *dx, + ccl_private float *dy) { if (sd->type & PRIMITIVE_TRIANGLE) { if (subd_triangle_patch(kg, sd) == ~0) @@ -49,11 +49,11 @@ ccl_device_inline float primitive_surface_attribute_float(KernelGlobals kg, } } -ccl_device_inline float2 primitive_surface_attribute_float2(KernelGlobals kg, - ccl_private const ShaderData *sd, - const AttributeDescriptor desc, - ccl_private float2 *dx, - ccl_private float2 *dy) +ccl_device_forceinline float2 primitive_surface_attribute_float2(KernelGlobals kg, + ccl_private const ShaderData *sd, + const AttributeDescriptor desc, + ccl_private float2 *dx, + ccl_private float2 *dy) { if (sd->type & PRIMITIVE_TRIANGLE) { if (subd_triangle_patch(kg, sd) == ~0) @@ -80,11 +80,11 @@ ccl_device_inline float2 primitive_surface_attribute_float2(KernelGlobals kg, } } -ccl_device_inline float3 primitive_surface_attribute_float3(KernelGlobals kg, - ccl_private const ShaderData *sd, - const AttributeDescriptor desc, - ccl_private float3 *dx, - ccl_private float3 *dy) +ccl_device_forceinline float3 primitive_surface_attribute_float3(KernelGlobals kg, + ccl_private const ShaderData *sd, + const AttributeDescriptor desc, + ccl_private float3 *dx, + ccl_private float3 *dy) { if (sd->type & PRIMITIVE_TRIANGLE) { if (subd_triangle_patch(kg, sd) == ~0) @@ -149,15 +149,15 @@ ccl_device_forceinline float4 primitive_surface_attribute_float4(KernelGlobals k * attributes for performance, mainly for GPU performance to avoid bringing in * heavy volume interpolation code. */ -ccl_device_inline bool primitive_is_volume_attribute(ccl_private const ShaderData *sd, - const AttributeDescriptor desc) +ccl_device_forceinline bool primitive_is_volume_attribute(ccl_private const ShaderData *sd, + const AttributeDescriptor desc) { return sd->type == PRIMITIVE_VOLUME; } -ccl_device_inline float primitive_volume_attribute_float(KernelGlobals kg, - ccl_private const ShaderData *sd, - const AttributeDescriptor desc) +ccl_device_forceinline float primitive_volume_attribute_float(KernelGlobals kg, + ccl_private const ShaderData *sd, + const AttributeDescriptor desc) { if (primitive_is_volume_attribute(sd, desc)) { return volume_attribute_value_to_float(volume_attribute_float4(kg, sd, desc)); @@ -167,9 +167,9 @@ ccl_device_inline float primitive_volume_attribute_float(KernelGlobals kg, } } -ccl_device_inline float3 primitive_volume_attribute_float3(KernelGlobals kg, - ccl_private const ShaderData *sd, - const AttributeDescriptor desc) +ccl_device_forceinline float3 primitive_volume_attribute_float3(KernelGlobals kg, + ccl_private const ShaderData *sd, + const AttributeDescriptor desc) { if (primitive_is_volume_attribute(sd, desc)) { return volume_attribute_value_to_float3(volume_attribute_float4(kg, sd, desc)); @@ -179,9 +179,9 @@ ccl_device_inline float3 primitive_volume_attribute_float3(KernelGlobals kg, } } -ccl_device_inline float4 primitive_volume_attribute_float4(KernelGlobals kg, - ccl_private const ShaderData *sd, - const AttributeDescriptor desc) +ccl_device_forceinline float4 primitive_volume_attribute_float4(KernelGlobals kg, + ccl_private const ShaderData *sd, + const AttributeDescriptor desc) { if (primitive_is_volume_attribute(sd, desc)) { return volume_attribute_float4(kg, sd, desc); @@ -194,7 +194,7 @@ ccl_device_inline float4 primitive_volume_attribute_float4(KernelGlobals kg, /* Default UV coordinate */ -ccl_device_inline float3 primitive_uv(KernelGlobals kg, ccl_private const ShaderData *sd) +ccl_device_forceinline float3 primitive_uv(KernelGlobals kg, ccl_private const ShaderData *sd) { const AttributeDescriptor desc = find_attribute(kg, sd, ATTR_STD_UV); @@ -262,8 +262,8 @@ ccl_device float3 primitive_tangent(KernelGlobals kg, ccl_private ShaderData *sd /* Motion vector for motion pass */ -ccl_device_inline float4 primitive_motion_vector(KernelGlobals kg, - ccl_private const ShaderData *sd) +ccl_device_forceinline float4 primitive_motion_vector(KernelGlobals kg, + ccl_private const ShaderData *sd) { /* center position */ float3 center; |