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:
authorCampbell Barton <ideasman42@gmail.com>2018-02-18 14:33:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-18 14:33:05 +0300
commit2bc952fdb6e1474e9e568224a37bcf5cff874aaf (patch)
tree8d7c3a99896415392035ba350a606d350b6d5e37 /intern/cycles/render
parent5d3f679013bbbb9f0c7aae47b5653c54266cf7ca (diff)
parent7ff3cd26932cbc93068eea4dc7438442216e4ee1 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/render')
-rw-r--r--intern/cycles/render/image.cpp41
-rw-r--r--intern/cycles/render/image.h1
2 files changed, 10 insertions, 32 deletions
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index feaa17148ee..dbe15a67b9e 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -49,7 +49,6 @@ ImageManager::ImageManager(const DeviceInfo& info)
/* Set image limits */
max_num_images = TEX_NUM_MAX;
has_half_images = info.has_half_images;
- cuda_fermi_limits = info.has_fermi_limits;
for(size_t type = 0; type < IMAGE_DATA_NUM_TYPES; type++) {
tex_num_images[type] = 0;
@@ -255,7 +254,7 @@ int ImageManager::add_image(const string& filename,
/* Check whether it's a float texture. */
is_float = (type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4);
- /* No single channel and half textures on CUDA (Fermi) and no half on OpenCL, use available slots */
+ /* No half textures on OpenCL, use full float instead. */
if(!has_half_images) {
if(type == IMAGE_DATA_TYPE_HALF4) {
type = IMAGE_DATA_TYPE_FLOAT4;
@@ -265,15 +264,6 @@ int ImageManager::add_image(const string& filename,
}
}
- if(cuda_fermi_limits) {
- if(type == IMAGE_DATA_TYPE_FLOAT) {
- type = IMAGE_DATA_TYPE_FLOAT4;
- }
- else if(type == IMAGE_DATA_TYPE_BYTE) {
- type = IMAGE_DATA_TYPE_BYTE4;
- }
- }
-
/* Fnd existing image. */
for(slot = 0; slot < images[type].size(); slot++) {
img = images[type][slot];
@@ -303,27 +293,16 @@ int ImageManager::add_image(const string& filename,
break;
}
- /* Count if we're over the limit */
- if(cuda_fermi_limits) {
- if(tex_num_images[IMAGE_DATA_TYPE_BYTE4] == TEX_NUM_BYTE4_CUDA
- || tex_num_images[IMAGE_DATA_TYPE_FLOAT4] == TEX_NUM_FLOAT4_CUDA)
- {
- printf("ImageManager::add_image: Reached %s image limit (%d), skipping '%s'\n",
- name_from_type(type).c_str(), tex_num_images[type], filename.c_str());
- return -1;
- }
+ /* Count if we're over the limit.
+ * Very unlikely, since max_num_images is insanely big. But better safe than sorry. */
+ int tex_count = 0;
+ for(int type = 0; type < IMAGE_DATA_NUM_TYPES; type++) {
+ tex_count += tex_num_images[type];
}
- else {
- /* Very unlikely, since max_num_images is insanely big. But better safe than sorry. */
- int tex_count = 0;
- for(int type = 0; type < IMAGE_DATA_NUM_TYPES; type++) {
- tex_count += tex_num_images[type];
- }
- if(tex_count > max_num_images) {
- printf("ImageManager::add_image: Reached image limit (%d), skipping '%s'\n",
- max_num_images, filename.c_str());
- return -1;
- }
+ if(tex_count > max_num_images) {
+ printf("ImageManager::add_image: Reached image limit (%d), skipping '%s'\n",
+ max_num_images, filename.c_str());
+ return -1;
}
if(slot == images[type].size()) {
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h
index 3519a67bc05..6fca3ca20d3 100644
--- a/intern/cycles/render/image.h
+++ b/intern/cycles/render/image.h
@@ -121,7 +121,6 @@ private:
int tex_num_images[IMAGE_DATA_NUM_TYPES];
int max_num_images;
bool has_half_images;
- bool cuda_fermi_limits;
thread_mutex device_mutex;
int animation_frame;