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:
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/device/cuda/device_cuda_impl.cpp9
-rw-r--r--intern/cycles/kernel/CMakeLists.txt9
-rw-r--r--intern/cycles/util/util_math_fast.h10
3 files changed, 17 insertions, 11 deletions
diff --git a/intern/cycles/device/cuda/device_cuda_impl.cpp b/intern/cycles/device/cuda/device_cuda_impl.cpp
index 5b62292ca55..cebe8ce631e 100644
--- a/intern/cycles/device/cuda/device_cuda_impl.cpp
+++ b/intern/cycles/device/cuda/device_cuda_impl.cpp
@@ -461,18 +461,19 @@ string CUDADevice::compile_kernel(const DeviceRequestedFeatures &requested_featu
const int nvcc_cuda_version = cuewCompilerVersion();
VLOG(1) << "Found nvcc " << nvcc << ", CUDA version " << nvcc_cuda_version << ".";
- if (nvcc_cuda_version < 80) {
+ if (nvcc_cuda_version < 101) {
printf(
"Unsupported CUDA version %d.%d detected, "
- "you need CUDA 8.0 or newer.\n",
+ "you need CUDA 10.1 or newer.\n",
nvcc_cuda_version / 10,
nvcc_cuda_version % 10);
return string();
}
- else if (!(nvcc_cuda_version == 101 || nvcc_cuda_version == 102)) {
+ else if (!(nvcc_cuda_version == 101 || nvcc_cuda_version == 102 || nvcc_cuda_version == 111 ||
+ nvcc_cuda_version == 112 || nvcc_cuda_version == 113 || nvcc_cuda_version == 114)) {
printf(
"CUDA version %d.%d detected, build may succeed but only "
- "CUDA 10.1 and 10.2 are officially supported.\n",
+ "CUDA 10.1 to 11.4 are officially supported.\n",
nvcc_cuda_version / 10,
nvcc_cuda_version % 10);
}
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index ea0f16c9233..db789d885f7 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -380,11 +380,16 @@ if(WITH_CYCLES_CUDA_BINARIES)
set(CUDA_VERSION "${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}")
# warn for other versions
- if((CUDA_VERSION MATCHES "101") OR (CUDA_VERSION MATCHES "102") OR (CUDA_VERSION MATCHES "111"))
+ if((CUDA_VERSION MATCHES "101") OR
+ (CUDA_VERSION MATCHES "102") OR
+ (CUDA_VERSION MATCHES "111") OR
+ (CUDA_VERSION MATCHES "112") OR
+ (CUDA_VERSION MATCHES "113") OR
+ (CUDA_VERSION MATCHES "114"))
else()
message(WARNING
"CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, "
- "build may succeed but only CUDA 10.1, 10.2 and 11.1 are officially supported")
+ "build may succeed but only CUDA 10.1 to 11.4 are officially supported")
endif()
# build for each arch
diff --git a/intern/cycles/util/util_math_fast.h b/intern/cycles/util/util_math_fast.h
index 1113ede0f2d..38afa163db5 100644
--- a/intern/cycles/util/util_math_fast.h
+++ b/intern/cycles/util/util_math_fast.h
@@ -103,7 +103,7 @@ ccl_device float fast_sinf(float x)
* 1.19209e-07 max error
*/
int q = fast_rint(x * M_1_PI_F);
- float qf = q;
+ float qf = (float)q;
x = madd(qf, -0.78515625f * 4, x);
x = madd(qf, -0.00024187564849853515625f * 4, x);
x = madd(qf, -3.7747668102383613586e-08f * 4, x);
@@ -132,7 +132,7 @@ ccl_device float fast_cosf(float x)
{
/* Same argument reduction as fast_sinf(). */
int q = fast_rint(x * M_1_PI_F);
- float qf = q;
+ float qf = (float)q;
x = madd(qf, -0.78515625f * 4, x);
x = madd(qf, -0.00024187564849853515625f * 4, x);
x = madd(qf, -3.7747668102383613586e-08f * 4, x);
@@ -160,7 +160,7 @@ ccl_device void fast_sincosf(float x, float *sine, float *cosine)
{
/* Same argument reduction as fast_sin. */
int q = fast_rint(x * M_1_PI_F);
- float qf = q;
+ float qf = (float)q;
x = madd(qf, -0.78515625f * 4, x);
x = madd(qf, -0.00024187564849853515625f * 4, x);
x = madd(qf, -3.7747668102383613586e-08f * 4, x);
@@ -207,7 +207,7 @@ ccl_device float fast_tanf(float x)
* we sometimes need to take the reciprocal of the polynomial
*/
int q = fast_rint(x * 2.0f * M_1_PI_F);
- float qf = q;
+ float qf = (float)q;
x = madd(qf, -0.78515625f * 2, x);
x = madd(qf, -0.00024187564849853515625f * 2, x);
x = madd(qf, -3.7747668102383613586e-08f * 2, x);
@@ -407,7 +407,7 @@ ccl_device float fast_logb(float x)
x = fabsf(x);
x = clamp(x, FLT_MIN, FLT_MAX);
unsigned bits = __float_as_uint(x);
- return (int)(bits >> 23) - 127;
+ return (float)((int)(bits >> 23) - 127);
}
ccl_device float fast_exp2f(float x)