Skip to content

Update Environment and Refactor

Choose a tag to compare

@stephen-hqxu stephen-hqxu released this 04 Nov 16:35
6c11882

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. STPDeviceRuntimeBinary and STPDeviceRuntimeProgram now accept NVVM input.
    • Enable NVVM mode under Release build for STPCommonCompiler; this change is experimental.
  • Change cuRAND generator in STPRandomTextureGenerator to 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 int with uint.
  • Make sure the lod parameter in all use of textureLod function is a float.
  • Remove space between layout and the open parenthesis.
  • Remove camera function selection because they are too redundant.
  • Remove inappropriate restrict qualifier to pointers. Qualify underlying value of pointer as const whenever 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 STPLayerCache into STPLayer.
  • Move all private static functions in STPLayerCache to 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_ptr rather than std::vector to store layer ascendant because the size is fixed.
  • Rename STPLocalRNG to STPLocalSampler.
  • Refactor function visibilities for STPLocalSampler.
  • Rename a few more functions.

Sorry for breaking the API completely...

STPLayerTree

  • Rename STPLayerManager to STPLayerTree.
  • 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:lambda flag to MSVC compiler to prevent spurious compilation error on lambda expression.
    • Change STPThreadPool to make use of the standard-conforming lambda.
    • Fix a compilation error on MSVC in STPFile.inl by moving the lambda outside the conditional statement.
  • Bump CMake project version to 0.15.0.
  • Split the generate filename utility from STPFile and put it into a new file STPStringUtility.h.
  • Replace all size_t literal from ull to u.
  • Simplify STPEngineInitialiser.
  • Add noexcept to certain functions around the engine.
  • Make recNeighbourChecking function in STPWorldPipeline template 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 STPTextureDatabase to the source file.
  • Fix some typos.