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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-07-28 14:51:10 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-28 15:14:24 +0300
commit3fba620858fa5bf44bec3124c61f6cc2e40356b0 (patch)
tree41aaddb8ad9fdd6b964a62b85129a703d626d5f8 /intern/cycles/device/device_cuda.cpp
parent29ebb56f4d8b99ca3038c7a3d0ed794ef77ee7f9 (diff)
Cycles: Prepare for more image extension types support
Basically just replace boolean periodic flag with extension type enum in the device API.
Diffstat (limited to 'intern/cycles/device/device_cuda.cpp')
-rw-r--r--intern/cycles/device/device_cuda.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 4a9c27f5429..9703b786289 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -416,7 +416,10 @@ public:
cuda_pop_context();
}
- void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool periodic)
+ void tex_alloc(const char *name,
+ device_memory& mem,
+ InterpolationType interpolation,
+ ExtensionType extension)
{
/* todo: support 3D textures, only CPU for now */
VLOG(1) << "Texture allocate: " << name << ", " << mem.memory_size() << " bytes.";
@@ -510,7 +513,7 @@ public:
cuda_assert(cuTexRefSetFlags(texref, CU_TRSF_READ_AS_INTEGER));
}
- if(periodic) {
+ if(extension == EXTENSION_REPEAT) {
cuda_assert(cuTexRefSetAddressMode(texref, 0, CU_TR_ADDRESS_MODE_WRAP));
cuda_assert(cuTexRefSetAddressMode(texref, 1, CU_TR_ADDRESS_MODE_WRAP));
}