Cycles: Tweaks to support CUDA 8 toolkit

All the changes are mainly giving explicit tips on inlining functions,
so they match how inlining worked with previous toolkit.

This make kernel compiled by CUDA 8 render in average with same speed
as previous kernels. Some scenes are somewhat faster, some of them are
somewhat slower. But slowdown is within 1% so far.

On a positive side it allows us to enable newer generation cards on
buildbots (so GTX 10x0 will be officially supported soon).
This commit is contained in:
Sergey Sharybin
2016-08-01 15:40:46 +02:00
parent 7065022f7a
commit 6353ecb996
29 changed files with 250 additions and 126 deletions

View File

@@ -18,7 +18,11 @@ CCL_NAMESPACE_BEGIN
/* Geometry Node */
ccl_device void svm_node_geometry(KernelGlobals *kg, ShaderData *sd, float *stack, uint type, uint out_offset)
ccl_device_inline void svm_node_geometry(KernelGlobals *kg,
ShaderData *sd,
float *stack,
uint type,
uint out_offset)
{
float3 data;
@@ -94,7 +98,11 @@ ccl_device void svm_node_object_info(KernelGlobals *kg, ShaderData *sd, float *s
/* Particle Info */
ccl_device void svm_node_particle_info(KernelGlobals *kg, ShaderData *sd, float *stack, uint type, uint out_offset)
ccl_device void svm_node_particle_info(KernelGlobals *kg,
ShaderData *sd,
float *stack,
uint type,
uint out_offset)
{
switch(type) {
case NODE_INFO_PAR_INDEX: {
@@ -146,7 +154,11 @@ ccl_device void svm_node_particle_info(KernelGlobals *kg, ShaderData *sd, float
/* Hair Info */
ccl_device void svm_node_hair_info(KernelGlobals *kg, ShaderData *sd, float *stack, uint type, uint out_offset)
ccl_device void svm_node_hair_info(KernelGlobals *kg,
ShaderData *sd,
float *stack,
uint type,
uint out_offset)
{
float data;
float3 data3;