diff options
Diffstat (limited to 'intern/cycles/kernel/geom/geom_subd_triangle.h')
-rw-r--r-- | intern/cycles/kernel/geom/geom_subd_triangle.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/intern/cycles/kernel/geom/geom_subd_triangle.h b/intern/cycles/kernel/geom/geom_subd_triangle.h index 927d630fe91..8a9a3f71231 100644 --- a/intern/cycles/kernel/geom/geom_subd_triangle.h +++ b/intern/cycles/kernel/geom/geom_subd_triangle.h @@ -22,15 +22,14 @@ CCL_NAMESPACE_BEGIN /* Patch index for triangle, -1 if not subdivision triangle */ -ccl_device_inline uint subd_triangle_patch(ccl_global const KernelGlobals *kg, - ccl_private const ShaderData *sd) +ccl_device_inline uint subd_triangle_patch(KernelGlobals kg, ccl_private const ShaderData *sd) { return (sd->prim != PRIM_NONE) ? kernel_tex_fetch(__tri_patch, sd->prim) : ~0; } /* UV coords of triangle within patch */ -ccl_device_inline void subd_triangle_patch_uv(ccl_global const KernelGlobals *kg, +ccl_device_inline void subd_triangle_patch_uv(KernelGlobals kg, ccl_private const ShaderData *sd, float2 uv[3]) { @@ -43,7 +42,7 @@ ccl_device_inline void subd_triangle_patch_uv(ccl_global const KernelGlobals *kg /* Vertex indices of patch */ -ccl_device_inline uint4 subd_triangle_patch_indices(ccl_global const KernelGlobals *kg, int patch) +ccl_device_inline uint4 subd_triangle_patch_indices(KernelGlobals kg, int patch) { uint4 indices; @@ -57,24 +56,21 @@ ccl_device_inline uint4 subd_triangle_patch_indices(ccl_global const KernelGloba /* Originating face for patch */ -ccl_device_inline uint subd_triangle_patch_face(ccl_global const KernelGlobals *kg, int patch) +ccl_device_inline uint subd_triangle_patch_face(KernelGlobals kg, int patch) { return kernel_tex_fetch(__patches, patch + 4); } /* Number of corners on originating face */ -ccl_device_inline uint subd_triangle_patch_num_corners(ccl_global const KernelGlobals *kg, - int patch) +ccl_device_inline uint subd_triangle_patch_num_corners(KernelGlobals kg, int patch) { return kernel_tex_fetch(__patches, patch + 5) & 0xffff; } /* Indices of the four corners that are used by the patch */ -ccl_device_inline void subd_triangle_patch_corners(ccl_global const KernelGlobals *kg, - int patch, - int corners[4]) +ccl_device_inline void subd_triangle_patch_corners(KernelGlobals kg, int patch, int corners[4]) { uint4 data; @@ -105,7 +101,7 @@ ccl_device_inline void subd_triangle_patch_corners(ccl_global const KernelGlobal /* Reading attributes on various subdivision triangle elements */ -ccl_device_noinline float subd_triangle_attribute_float(ccl_global const KernelGlobals *kg, +ccl_device_noinline float subd_triangle_attribute_float(KernelGlobals kg, ccl_private const ShaderData *sd, const AttributeDescriptor desc, ccl_private float *dx, @@ -244,7 +240,7 @@ ccl_device_noinline float subd_triangle_attribute_float(ccl_global const KernelG } } -ccl_device_noinline float2 subd_triangle_attribute_float2(ccl_global const KernelGlobals *kg, +ccl_device_noinline float2 subd_triangle_attribute_float2(KernelGlobals kg, ccl_private const ShaderData *sd, const AttributeDescriptor desc, ccl_private float2 *dx, @@ -387,7 +383,7 @@ ccl_device_noinline float2 subd_triangle_attribute_float2(ccl_global const Kerne } } -ccl_device_noinline float3 subd_triangle_attribute_float3(ccl_global const KernelGlobals *kg, +ccl_device_noinline float3 subd_triangle_attribute_float3(KernelGlobals kg, ccl_private const ShaderData *sd, const AttributeDescriptor desc, ccl_private float3 *dx, @@ -529,7 +525,7 @@ ccl_device_noinline float3 subd_triangle_attribute_float3(ccl_global const Kerne } } -ccl_device_noinline float4 subd_triangle_attribute_float4(ccl_global const KernelGlobals *kg, +ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals kg, ccl_private const ShaderData *sd, const AttributeDescriptor desc, ccl_private float4 *dx, |