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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-03-24 00:01:32 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-03-24 00:01:32 +0300
commitd84b4becd3bce34b75385155535b17d77f68578a (patch)
treeea4d6e2d99f664bf2cf4f7b11a50dc77ac2e920e /intern
parent945dfd200b1fc58c63fd01c264d50911f26773a2 (diff)
Fix compile error on GCC
Explicit template specialization has to happen outside of class definition (some compilers are more lenient). Since it is not possible to specialize the method without also specializing the enclosing class for all of its possible types, the method is moved outside of the class, and specialized there.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/device/cpu/image.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/intern/cycles/kernel/device/cpu/image.h b/intern/cycles/kernel/device/cpu/image.h
index 94eeaed7698..ebddc1989bd 100644
--- a/intern/cycles/kernel/device/cpu/image.h
+++ b/intern/cycles/kernel/device/cpu/image.h
@@ -31,18 +31,19 @@ ccl_device_inline float frac(float x, int *ix)
return x - (float)i;
}
-template<typename TexT, typename OutT = float4> struct TextureInterpolator {
- template<typename ZeroT> static ccl_always_inline ZeroT zero();
+template<typename ZeroT> ccl_always_inline ZeroT zero();
- template<> static ccl_always_inline float zero()
- {
- return 0.0f;
- }
+template<> ccl_always_inline float zero<float>()
+{
+ return 0.0f;
+}
- template<> static ccl_always_inline float4 zero()
- {
- return zero_float4();
- }
+template<> ccl_always_inline float4 zero<float4>()
+{
+ return zero_float4();
+}
+
+template<typename TexT, typename OutT = float4> struct TextureInterpolator {
static ccl_always_inline float4 read(float4 r)
{