Skip to content

Commit 06f9a32

Browse files
committed
Merge branch 'master' into refactor/tokenizer
2 parents 33b5edc + 8c1eb72 commit 06f9a32

File tree

164 files changed

+2439
-1903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+2439
-1903
lines changed

changes.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,21 @@ Changed Behaviour
5656
by directives (stuff that begins with `#`).
5757
- UV mapping of cylinder, cone and lemon primitives has been disabled again
5858
for now, due to their orientation being poorly defined.
59+
- An age-old bug in the inbuilt `f_enneper` isosurface function has been
60+
fixed; the function now results in the originally intended shape.
5961

6062
New Features
6163
------------
6264

6365
- The `ovus` primitive has been extended in multiple ways. See the
6466
documentation (currently being maintained on <http://wiki.povray.org>) for
6567
details.
68+
- Anti-aliasing now supports a new mode 3, which can actually serve as a
69+
generic oversampling mechanism not only suited to perform edge
70+
anti-aliasing, but also to successtully suppress moire patterns as well as
71+
reduce image noise from stochastic mechanisms (e.g. jittered area lights,
72+
subsurface light transport or micronormals). The mathematical background
73+
and parameterization is similar to that of adaptive focal blur.
6674

6775
Performance Improvements
6876
------------------------
@@ -99,6 +107,15 @@ Reported via the Newsgroups:
99107
Trying to `#declare Foo[A][B]=...` with `Foo` being an array of arrays and
100108
`Foo[A]` not yet initialized causes a hard crash instead of a parse error.
101109

110+
Reported by Coverity static code analysis:
111+
112+
- CID 986462,986463 (Wrapper object use after free)
113+
- CID 967358-967362 (Uninitialized scalar variable)
114+
- CID 1372542-1372544 (Result is not floating-point)
115+
- CID 1372618 (Uninitialized scalar variable)
116+
- CID 1372629 (Uninitialized pointer read)
117+
- CID 1372630-1372632 (Uninitialized scalar variable)
118+
102119
Miscellaneous:
103120

104121
- Fix `interior_texture` for text objects (as mentioned in GitHub issue #65)

distribution/include/functions.inc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,12 @@
163163
// 2. y scale (inverse)
164164
// 3. z scale (inverse)
165165

166-
#declare f_enneper = function { internal(18) }
166+
#if (Functions_Inc_Temp < 3.8)
167+
#declare deprecated once "f_enneper was broken prior to v3.8; results will most likely differ."
168+
f_enneper = function { internal(18) }
169+
#else
170+
#declare f_enneper = function { internal(18) }
171+
#end
167172
// Parameters: x, y, z
168173
// One extra parameter required:
169174
// 1. Field strength

platform/unix/syspovtimer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/// @parblock
1010
///
1111
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
12-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
12+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1313
///
1414
/// POV-Ray is free software: you can redistribute it and/or modify
1515
/// it under the terms of the GNU Affero General Public License as
@@ -76,7 +76,7 @@ void Delay(unsigned int msec)
7676
timespec ts;
7777
ts.tv_sec = msec / 1000;
7878
ts.tv_nsec = (POV_ULONG) (1000000) * (msec % 1000);
79-
nanosleep(&ts, NULL);
79+
nanosleep(&ts, nullptr);
8080
#elif defined(HAVE_USLEEP)
8181
POV_ASSERT(msec < 1000); // On some systems, usleep() does not support sleeping for 1 second or more.
8282
usleep (msec * (useconds_t)1000);
@@ -126,7 +126,7 @@ static inline bool GettimeofdayMillisec(POV_ULONG& result)
126126
{
127127
#if defined(HAVE_GETTIMEOFDAY)
128128
struct timeval tv; // seconds + microseconds since
129-
bool success = (gettimeofday(&tv, NULL) == 0);
129+
bool success = (gettimeofday(&tv, nullptr) == 0);
130130
if (success)
131131
result = static_cast<POV_ULONG>(tv.tv_sec) *1000
132132
+ static_cast<POV_ULONG>(tv.tv_usec) /1000;

platform/windows/syspovtimer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/// @parblock
1010
///
1111
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
12-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
12+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1313
///
1414
/// POV-Ray is free software: you can redistribute it and/or modify
1515
/// it under the terms of the GNU Affero General Public License as
@@ -65,7 +65,7 @@ Timer::Timer () :
6565
// TODO - sources on the internet indicate that GetThreadTimes() and GetProcessTimes() have been
6666
// around as early as NT 3.1. Is there a reason we're only making use of it in NT 4.0 and
6767
// later Windows versions?
68-
mThreadHandle (NULL),
68+
mThreadHandle (nullptr),
6969
mCPUTimeSupported (WindowsVersionDetector().IsNTVersion (4,0))
7070
{
7171
if (mCPUTimeSupported)
@@ -74,15 +74,15 @@ Timer::Timer () :
7474
&mThreadHandle, 0, TRUE, DUPLICATE_SAME_ACCESS))
7575
{
7676
POV_ASSERT (false);
77-
mThreadHandle = NULL;
77+
mThreadHandle = nullptr;
7878
}
7979
}
8080
Reset ();
8181
}
8282

8383
Timer::~Timer ()
8484
{
85-
if (mThreadHandle != NULL)
85+
if (mThreadHandle != nullptr)
8686
CloseHandle (mThreadHandle);
8787
}
8888

platform/x86/cpuid.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -159,7 +159,7 @@ CPUVendorInfo gCPUVendorInfo[] = {
159159
{ kCPUVendor_VM, "VMwareVMware" }, // VMWare
160160
{ kCPUVendor_VM, "XenVMMXenVMM" }, // Xen HVM
161161
// End of list.
162-
{ kCPUVendor_Unrecognized, NULL }
162+
{ kCPUVendor_Unrecognized, nullptr }
163163
};
164164

165165
struct CPUIDInfo
@@ -197,7 +197,7 @@ CPUIDInfo::CPUIDInfo() :
197197
std::memcpy(vendor + 4, &info[CPUID_EDX], 4);
198198
std::memcpy(vendor + 8, &info[CPUID_ECX], 4);
199199
vendor[12] = '\0';
200-
for (CPUVendorInfo* p = gCPUVendorInfo; p->cpuidString != NULL; ++p)
200+
for (CPUVendorInfo* p = gCPUVendorInfo; p->cpuidString != nullptr; ++p)
201201
{
202202
if (strcmp(vendor, p->cpuidString) == 0)
203203
{

platform/x86/optimizednoise.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/// @parblock
1010
///
1111
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
12-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
12+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1313
///
1414
/// POV-Ray is free software: you can redistribute it and/or modify
1515
/// it under the terms of the GNU Affero General Public License as
@@ -92,8 +92,8 @@ OptimizedNoiseInfo gaOptimizedNoiseInfo[] = {
9292
AVXFMA4DNoise, // dNoise,
9393
&kAVXFMA4NoiseEnabled, // enabled,
9494
AVXFMA4Supported, // supported,
95-
NULL, // recommended,
96-
NULL // init
95+
nullptr, // recommended,
96+
nullptr // init
9797
},
9898
#endif
9999
#ifdef TRY_OPTIMIZED_NOISE_AVX
@@ -116,12 +116,12 @@ OptimizedNoiseInfo gaOptimizedNoiseInfo[] = {
116116
AVXPortableDNoise, // dNoise,
117117
&kAVXPortableNoiseEnabled, // enabled,
118118
AVXSupported, // supported,
119-
NULL, // recommended,
120-
NULL // init
119+
nullptr, // recommended,
120+
nullptr // init
121121
},
122122
#endif
123123
// End-of-list entry.
124-
{ NULL }
124+
{ nullptr }
125125
};
126126

127127
}

revision.txt

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,113 @@ Notes:
3535
POV-Ray v3.8.0-???
3636
------------------------------------------------------------------------------
3737

38+
Commit 915abb22 on 2018-09-12 by Christoph Lipka
39+
40+
Fix uninitialized variables in photons code discovered by static code
41+
analysis (CID 1372618, CID 1372630-1372632).
42+
Also placate static code analysis about a few others in user function
43+
VM code (CID 967358-967362).
44+
45+
Commit 65bd3196 on 2018-09-12 by Christoph Lipka
46+
47+
Fix bug in OpenEXR file handling code found by static code analysis
48+
(CID 986462 and 986463).
49+
50+
Commit 7de830ce on 2018-09-12 by Christoph Lipka
51+
52+
Eliminate C-style memory allocation in parametric.
53+
54+
Commit 7fa6bb53 on 2018-09-12 by Christoph Lipka
55+
56+
Refactor flagging of opaque objects during parser post-processing.
57+
58+
Commit 6fdadbde on 2018-09-12 by Christoph Lipka
59+
60+
[windows] Fix error in recent commit 917a8763 that broke the build.
61+
62+
Commit 24700edb on 2018-09-12 by Christoph Lipka
63+
64+
Eliminate C-style memory allocation in polygon.
65+
66+
Commit 917a8763 on 2018-09-12 by Christoph Lipka
67+
68+
Get rid of C-style `NULL` throughout the code in favour of the less
69+
ambiguous C++11-style `nullptr`.
70+
71+
Commit 72cf1a73 on 2018-09-12 by Christoph Lipka
72+
73+
Replace more magic constants in POVMS.
74+
75+
Commit aa0b48d7 on 2018-09-12 by Christoph Lipka
76+
77+
Clean up use of boolean values in POVMS.
78+
79+
Commit 49873bf9 on 2018-09-12 by Christoph Lipka
80+
81+
Improve code clarity with regards to POVMS return values, fixing a few
82+
bugs along the way.
83+
84+
Commit dfda62b7 on 2018-09-12 by Christoph Lipka
85+
86+
Minor update to stack size configuration.
87+
88+
Commit 72862c76 on 2018-09-12 by Christoph Lipka
89+
90+
Minor code simplification in quadrics code.
91+
92+
Commit 7bde9196 on 2018-09-12 by Christoph Lipka
93+
94+
Update various comments and a few text strings.
95+
96+
Commit 344ed893 on 2018-09-11 by Christoph Lipka
97+
98+
Update to `.gitattribute`; most notably, prevent auto-merging of
99+
`source/base/version.h`.
100+
101+
Commit 8a43226e on 2018-09-11 by Christoph Lipka
102+
103+
Minor update to `source/base/build.h` and related docs.
104+
105+
Commit 96489d42 on 2018-09-09 by Christoph Lipka
106+
107+
[unix] Make `.configure` script `COMPILED_BY` parameter optional,
108+
defaulting to login name.
109+
110+
Commit 63580949 on 2018-09-09 by Christoph Lipka
111+
112+
Fix bug introduced with commit 1d120c90.
113+
114+
Commit 0984776b on 2018-09-09 by Christoph Lipka
115+
116+
Update git pre-commit hook. Please copy `tools/git/hooks/pre-commit`
117+
to `.git/hooks/`.
118+
119+
Commit 2843d762 on 2018-09-08 by Christoph Lipka
120+
121+
Fix blatant coding error in POVMS UCS2 string handling.
122+
123+
Commit 264fa229 on 2018-09-07 by Christoph Lipka
124+
125+
Fix clang build error introduced with previous commit, and silence a
126+
few more clang warnings.
127+
128+
Commit 1d120c90 on 2018-09-07 by Christoph Lipka
129+
130+
Silence some clang warnings.
131+
132+
Commit f09a7b4f on 2018-09-02 by Christoph Lipka
133+
134+
Disable new UV mappings of cylinder, cone and lemon primitives for now.
135+
136+
Commit d20c6d42 on 2018-08-27 by Christoph Lipka
137+
138+
Improve `#breakpoint` debugging aid.
139+
Also update changelog.
140+
141+
------------------------------------------------------------------------------
142+
POV-Ray v3.8.0-alpha.9811560
143+
------------------------------------------------------------------------------
144+
38145
Commit c42e14e7 on 2018-08-27 by Christoph Lipka
39146

40147
Fix hard crash in `#declare Foo[A][B]=...` if `Foo` is an array of

source/backend/bounding/boundingtask.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -137,8 +137,8 @@ class BSPProgress : public BSPTree::Progress
137137
BSPProgress();
138138
};
139139

140-
BoundingTask::BoundingTask(shared_ptr<BackendSceneData> sd, unsigned int bt) :
141-
SceneTask(new TraceThreadData(dynamic_pointer_cast<SceneData>(sd)), boost::bind(&BoundingTask::SendFatalError, this, _1), "Bounding", sd),
140+
BoundingTask::BoundingTask(shared_ptr<BackendSceneData> sd, unsigned int bt, size_t seed) :
141+
SceneTask(new TraceThreadData(dynamic_pointer_cast<SceneData>(sd), seed), boost::bind(&BoundingTask::SendFatalError, this, _1), "Bounding", sd),
142142
sceneData(sd),
143143
boundingThreshold(bt)
144144
{

source/backend/bounding/boundingtask.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -50,7 +50,7 @@ class TraceThreadData;
5050
class BoundingTask : public SceneTask
5151
{
5252
public:
53-
BoundingTask(shared_ptr<BackendSceneData> sd, unsigned int bt);
53+
BoundingTask(shared_ptr<BackendSceneData> sd, unsigned int bt, size_t seed);
5454
virtual ~BoundingTask();
5555

5656
virtual void Run();

source/backend/configbackend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ static_assert(
9999
///
100100
/// @param[in] ts Null-terminated byte sequence to convert.
101101
/// @param[out] as Number of UCS2 characters in result.
102-
/// @return Converted null-terminated UCS2 character sequence, or `NULL` if conversion is not supported.
102+
/// @return Converted null-terminated UCS2 character sequence, or `nullptr` if conversion is not supported.
103103
///
104104
#ifndef POV_CONVERT_TEXT_TO_UCS2
105-
#define POV_CONVERT_TEXT_TO_UCS2(ts, as) (NULL)
105+
#define POV_CONVERT_TEXT_TO_UCS2(ts, as) (nullptr)
106106
#endif
107107

108108
//******************************************************************************

0 commit comments

Comments
 (0)