diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-13 16:32:44 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-13 16:32:44 +0400 |
commit | dd9c1b7fbf501ef58c9952150698fb5ce3c45903 (patch) | |
tree | f52d353e3dc36a33a3a8b6609fa8a2ffe39b2d4c /intern/cycles/kernel/svm/svm_attribute.h | |
parent | f9642926303ec89679e61076ca9e4b9f0be3afe9 (diff) |
Cycles: OpenCL image texture support, fix an attribute node issue and refactor
feature enabling #defines a bit.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_attribute.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_attribute.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/intern/cycles/kernel/svm/svm_attribute.h b/intern/cycles/kernel/svm/svm_attribute.h index 3a94f08d42f..ed70a6dc423 100644 --- a/intern/cycles/kernel/svm/svm_attribute.h +++ b/intern/cycles/kernel/svm/svm_attribute.h @@ -22,7 +22,7 @@ CCL_NAMESPACE_BEGIN __device void svm_node_attr_init(KernelGlobals *kg, ShaderData *sd, uint4 node, NodeAttributeType *type, - NodeAttributeType *mesh_type, AttributeElement *elem, uint *offset, uint *out_offset) + NodeAttributeType *mesh_type, AttributeElement *elem, int *offset, uint *out_offset) { if(sd->object != ~0) { /* find attribute by unique id */ @@ -35,7 +35,7 @@ __device void svm_node_attr_init(KernelGlobals *kg, ShaderData *sd, /* return result */ *elem = (AttributeElement)attr_map.y; - *offset = attr_map.z; + *offset = as_int(attr_map.z); *mesh_type = (NodeAttributeType)attr_map.w; } else { @@ -53,7 +53,8 @@ __device void svm_node_attr(KernelGlobals *kg, ShaderData *sd, float *stack, uin { NodeAttributeType type, mesh_type; AttributeElement elem; - uint offset, out_offset; + uint out_offset; + int offset; svm_node_attr_init(kg, sd, node, &type, &mesh_type, &elem, &offset, &out_offset); @@ -84,7 +85,8 @@ __device void svm_node_attr_bump_dx(KernelGlobals *kg, ShaderData *sd, float *st { NodeAttributeType type, mesh_type; AttributeElement elem; - uint offset, out_offset; + uint out_offset; + int offset; svm_node_attr_init(kg, sd, node, &type, &mesh_type, &elem, &offset, &out_offset); @@ -119,7 +121,8 @@ __device void svm_node_attr_bump_dy(KernelGlobals *kg, ShaderData *sd, float *st { NodeAttributeType type, mesh_type; AttributeElement elem; - uint offset, out_offset; + uint out_offset; + int offset; svm_node_attr_init(kg, sd, node, &type, &mesh_type, &elem, &offset, &out_offset); |