diff options
author | Patrick Mours <pmours@nvidia.com> | 2019-08-21 13:03:32 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-26 11:26:53 +0300 |
commit | edbb755dfe54f929c08aa6ec77c134462581fbfe (patch) | |
tree | 9328ae9818f7d55f7e9f5a19a74187bde941784c /intern/cycles/kernel/svm/svm_attribute.h | |
parent | b05e7ea7197ca4b66f74359a8e43e6a0b419de2d (diff) |
Cycles: tweaks for better GPU code generation
Uninitialized variables are harder to handle for the compiler.
Ref D5363
Diffstat (limited to 'intern/cycles/kernel/svm/svm_attribute.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_attribute.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/kernel/svm/svm_attribute.h b/intern/cycles/kernel/svm/svm_attribute.h index a67cfe91a30..341eaad28ee 100644 --- a/intern/cycles/kernel/svm/svm_attribute.h +++ b/intern/cycles/kernel/svm/svm_attribute.h @@ -46,8 +46,8 @@ ccl_device AttributeDescriptor svm_node_attr_init( ccl_device void svm_node_attr(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node) { - NodeAttributeType type; - uint out_offset; + NodeAttributeType type = NODE_ATTR_FLOAT; + uint out_offset = 0; AttributeDescriptor desc = svm_node_attr_init(kg, sd, node, &type, &out_offset); /* fetch and store attribute */ @@ -88,8 +88,8 @@ ccl_device_noinline void svm_node_attr_bump_dx(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node) { - NodeAttributeType type; - uint out_offset; + NodeAttributeType type = NODE_ATTR_FLOAT; + uint out_offset = 0; AttributeDescriptor desc = svm_node_attr_init(kg, sd, node, &type, &out_offset); /* fetch and store attribute */ @@ -133,8 +133,8 @@ ccl_device_noinline void svm_node_attr_bump_dy(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node) { - NodeAttributeType type; - uint out_offset; + NodeAttributeType type = NODE_ATTR_FLOAT; + uint out_offset = 0; AttributeDescriptor desc = svm_node_attr_init(kg, sd, node, &type, &out_offset); /* fetch and store attribute */ |