diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-28 14:51:10 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-28 15:14:24 +0300 |
commit | 3fba620858fa5bf44bec3124c61f6cc2e40356b0 (patch) | |
tree | 41aaddb8ad9fdd6b964a62b85129a703d626d5f8 /intern/cycles/device/device_cuda.cpp | |
parent | 29ebb56f4d8b99ca3038c7a3d0ed794ef77ee7f9 (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.cpp | 7 |
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)); } |