Update Environment and Refactor
Release 0.15.1
Update CUDA
- Bump CUDA version to 11.7 minimum (main development is carried on 11.8). Remember to regenerate your build tree. Some features from CUDA beyond 11.3 that are going to be integrated shortly:
- 11.4: link time optimisation for NVRTC with NVVM interop.
- 11.6: NVRTC automatic includes directory where source file resides.
- 11.7: optix-ir output for NVCC.
- In general, a huge reduction on compilation time is observed.
- Add support to NVVM compiler.
STPDeviceRuntimeBinaryandSTPDeviceRuntimeProgramnow accept NVVM input.- Enable NVVM mode under Release build for
STPCommonCompiler; this change is experimental.
- Enable NVVM mode under Release build for
- Change cuRAND generator in
STPRandomTextureGeneratorto curandStatePhilox4_32_10_t because the previous one takes a massive number of register (somewhere around 250). This also reduces the binary size of SuperRealism+ significantly.
There isn't much to change really, CUDA is pretty good built for backward compatibility.
GLSL shader refactor (#49)
- Replace all
unsigned intwithuint. - Make sure the lod parameter in all use of
textureLodfunction is a float. - Remove space between
layoutand the open parenthesis. - Remove camera function selection because they are too redundant.
- Remove inappropriate
restrictqualifier to pointers. Qualify underlying value of pointer asconstwhenever applicable.
Biome generator refactor
The biome utilities have not been patched for years and there are a few bad programming practice I want to eliminate.
- Merge
STPLayerCacheintoSTPLayer. - Move all private static functions in
STPLayerCacheto the source file and assign them with internal linkage. - Remove 3D generation option for
STPBiomeFactory.
STPLayer
- Make constructor and destructor public.
- Add layer cache size at initialisation.
- Use
std::unique_ptrrather thanstd::vectorto store layer ascendant because the size is fixed. - Rename
STPLocalRNGtoSTPLocalSampler. - Refactor function visibilities for
STPLocalSampler. - Rename a few more functions.
Sorry for breaking the API completely...
STPLayerTree
- Rename
STPLayerManagertoSTPLayerTree. - Inline all definitions because they are too trivial.
- Layer cache size is now specified from function argument rather than non-type template parameter. Unfortunately this also breaks the API.
General fixes and improvement
- Add
Zc:lambdaflag to MSVC compiler to prevent spurious compilation error on lambda expression.- Change
STPThreadPoolto make use of the standard-conforming lambda. - Fix a compilation error on MSVC in
STPFile.inlby moving the lambda outside the conditional statement.
- Change
- Bump CMake project version to 0.15.0.
- Split the generate filename utility from
STPFileand put it into a new fileSTPStringUtility.h. - Replace all
size_tliteral from ull to u. - Simplify
STPEngineInitialiser. - Add
noexceptto certain functions around the engine. - Make recNeighbourChecking function in
STPWorldPipelinetemplate regarding recursion pass. - Remove option to toggle AVX instruction usage. The minimum CPU requirement in the README already guarantees availability of AVX, and I don't see the reason for not using it whenever applicable (and of course I don't want to maintain 2 different code paths).
- Fix a compiler error on some compilers when compiling
STPTestMain.cpp. - Change
[[nodiscard]]usage. Only add this attribute when discarding return value will cause serious problems such as memory leak, or hard-to-spot bug. - Move ID counters in
STPTextureDatabaseto the source file. - Fix some typos.