Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2013-06-09 19:09:15 +0400
committerThomas Dinges <blender@dingto.org>2013-06-09 19:09:15 +0400
commit49115b4dd38443c77b18f0b627a97f60975ada1d (patch)
tree6d840d93b316667017576ef079dc1c91eaaf2ed3 /intern/cycles/kernel/svm
parentb2c81664ae6f2535ebb114e94fed6449d0697ec7 (diff)
Cycles:
* Use float_to_int() functions in a few more places.
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r--intern/cycles/kernel/svm/svm_convert.h2
-rw-r--r--intern/cycles/kernel/svm/svm_image.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/svm/svm_convert.h b/intern/cycles/kernel/svm/svm_convert.h
index 0050813e2c0..450344c79ff 100644
--- a/intern/cycles/kernel/svm/svm_convert.h
+++ b/intern/cycles/kernel/svm/svm_convert.h
@@ -25,7 +25,7 @@ __device void svm_node_convert(ShaderData *sd, float *stack, uint type, uint fro
switch(type) {
case NODE_CONVERT_FI: {
float f = stack_load_float(stack, from);
- stack_store_int(stack, to, (int)f);
+ stack_store_int(stack, to, float_to_int(f));
break;
}
case NODE_CONVERT_FV: {
diff --git a/intern/cycles/kernel/svm/svm_image.h b/intern/cycles/kernel/svm/svm_image.h
index c7551a72638..57adaa863f1 100644
--- a/intern/cycles/kernel/svm/svm_image.h
+++ b/intern/cycles/kernel/svm/svm_image.h
@@ -45,7 +45,7 @@ __device_inline int svm_image_texture_wrap_clamp(int x, int width)
__device_inline float svm_image_texture_frac(float x, int *ix)
{
- int i = (int)x - ((x < 0.0f)? 1: 0);
+ int i = float_to_int(x) - ((x < 0.0f)? 1: 0);
*ix = i;
return x - (float)i;
}