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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-04-28 15:10:21 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-04-28 15:10:21 +0300
commit06034b147aab1c80ad959d88a69b493cd5891e9c (patch)
tree1b22358776adafaa132775b473d3a518ae83a2e8 /intern
parent8f4166ee495531fa38b676b0a5ef4c482e89f9a5 (diff)
Cycles: Cleanup, spelling and braces
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_image_opencl.h23
-rw-r--r--intern/cycles/render/image.cpp2
2 files changed, 16 insertions, 9 deletions
diff --git a/intern/cycles/kernel/kernel_image_opencl.h b/intern/cycles/kernel/kernel_image_opencl.h
index c1ac39e7f1e..a5c5a73ddb0 100644
--- a/intern/cycles/kernel/kernel_image_opencl.h
+++ b/intern/cycles/kernel/kernel_image_opencl.h
@@ -75,12 +75,15 @@ ccl_device float4 kernel_tex_image_interp(KernelGlobals *kg, int id, float x, fl
/* Image Options */
uint interpolation = (info.w & (1 << 0)) ? INTERPOLATION_CLOSEST : INTERPOLATION_LINEAR;
uint extension;
- if(info.w & (1 << 1))
+ if(info.w & (1 << 1)) {
extension = EXTENSION_REPEAT;
- else if(info.w & (1 << 2))
+ }
+ else if(info.w & (1 << 2)) {
extension = EXTENSION_EXTEND;
- else
+ }
+ else {
extension = EXTENSION_CLIP;
+ }
float4 r;
int ix, iy, nix, niy;
@@ -151,12 +154,15 @@ ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float x,
/* Image Options */
uint interpolation = (info.w & (1 << 0)) ? INTERPOLATION_CLOSEST : INTERPOLATION_LINEAR;
uint extension;
- if(info.w & (1 << 1))
+ if(info.w & (1 << 1)) {
extension = EXTENSION_REPEAT;
- else if(info.w & (1 << 2))
+ }
+ else if(info.w & (1 << 2)) {
extension = EXTENSION_EXTEND;
- else
+ }
+ else {
extension = EXTENSION_CLIP;
+ }
float4 r;
int ix, iy, iz, nix, niy, niz;
@@ -174,7 +180,7 @@ ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float x,
if(extension == EXTENSION_CLIP) {
if(x < 0.0f || y < 0.0f || z < 0.0f ||
x > 1.0f || y > 1.0f || z > 1.0f)
- {
+ {
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
}
}
@@ -201,12 +207,13 @@ ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float x,
niz = svm_image_texture_wrap_periodic(iz+1, depth);
}
else {
- if(extension == EXTENSION_CLIP)
+ if(extension == EXTENSION_CLIP) {
if(x < 0.0f || y < 0.0f || z < 0.0f ||
x > 1.0f || y > 1.0f || z > 1.0f)
{
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
}
+ }
/* Fall through. */
/* EXTENSION_EXTEND */
nix = svm_image_texture_wrap_clamp(ix+1, width);
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index e0bb8a16949..60d1f5f44f9 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -201,7 +201,7 @@ ImageDataType ImageManager::get_image_metadata(const string& filename,
* to device ones and vice versa.
*
* There are special cases for CUDA Fermi, since there we have only 90 image texture
- * slots available and shold keep the flattended numbers in the 0-89 range.
+ * slots available and should keep the flattended numbers in the 0-89 range.
*/
int ImageManager::type_index_to_flattened_slot(int slot, ImageDataType type)
{