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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-12 22:43:40 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-12 22:45:47 +0300
commite568c1a9757a5d4f8a52822cbbe772d0ac4da78b (patch)
tree893da9749afdf2d61bfc9a2a040ef4f57c33a7a7 /intern/cycles/device/device_cuda.cpp
parentebcb88037581a28a776bca98618d780ea1997301 (diff)
Fix T53289: CUDA missing textures not showing pink, after recent changes.
Diffstat (limited to 'intern/cycles/device/device_cuda.cpp')
-rw-r--r--intern/cycles/device/device_cuda.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index a38340cb286..305e5e9f1af 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -908,7 +908,7 @@ public:
cmem->texobject = 0;
cmem->array = array_3d;
}
- else if(mem.data_height > 1) {
+ else if(mem.data_height > 0) {
/* 2D texture, using pitch aligned linear memory. */
int alignment = 0;
cuda_assert(cuDeviceGetAttribute(&alignment, CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT, cuDevice));
@@ -962,7 +962,7 @@ public:
resDesc.res.array.hArray = array_3d;
resDesc.flags = 0;
}
- else if(mem.data_height > 1) {
+ else if(mem.data_height > 0) {
resDesc.resType = CU_RESOURCE_TYPE_PITCH2D;
resDesc.res.pitch2D.devPtr = mem.device_pointer;
resDesc.res.pitch2D.format = format;
@@ -1012,7 +1012,7 @@ public:
if(array_3d) {
cuda_assert(cuTexRefSetArray(texref, array_3d, CU_TRSA_OVERRIDE_FORMAT));
}
- else if(mem.data_height > 1) {
+ else if(mem.data_height > 0) {
CUDA_ARRAY_DESCRIPTOR array_desc;
array_desc.Format = format;
array_desc.Height = mem.data_height;