mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-22 05:30:06 -05:00
1dfbd4eff2
-Add new preset dimensions to the right click menu of the width and height fields in the editor. -Change QSS stylesheets to properly handle tabs. -Make tabs rectangular by default. For some reason, they had always been triangular. --Bug fixes -Incremental rendering times in the editor were wrong. --Code changes -Migrate to Qt6. There is probably more work to be done here. -Migrate to VS2022. -Migrate to Wix 4 installer. -Change installer to install to program files for all users. -Fix many VS2022 code analysis warnings. -No longer use byte typedef, because std::byte is now a type. Revert all back to unsigned char. -Upgrade OpenCL headers to version 3.0 and keep locally now rather than trying to look for system files. -No longer link to Nvidia or AMD specific OpenCL libraries. Use the generic installer located at OCL_ROOT too. -Add the ability to change OpenCL grid dimensions. This was attempted for investigating possible performance improvments, but made no difference. This has not been verified on Linux or Mac yet.
77 lines
2.6 KiB
C++
77 lines
2.6 KiB
C++
#pragma once
|
|
|
|
#include "EmberCLPch.h"
|
|
#include "EmberCLStructs.h"
|
|
#include "EmberCLFunctions.h"
|
|
|
|
/// <summary>
|
|
/// DEOpenCLKernelCreator class.
|
|
/// </summary>
|
|
|
|
namespace EmberCLns
|
|
{
|
|
/// <summary>
|
|
/// Kernel creator for density filtering.
|
|
/// This implements both basic log scale filtering
|
|
/// as well as the full flam3 density estimation filtering
|
|
/// in OpenCL.
|
|
/// Several conditionals are present in the CPU version. They
|
|
/// are stripped out of the kernels and instead a separate kernel
|
|
/// is created for every possible case.
|
|
/// If the filter width is 9 or less, then the entire process can be
|
|
/// done in shared memory which is very fast.
|
|
/// However, if the filter width is greater than 9, shared memory is not
|
|
/// used and all filtering is done directly with main global VRAM. This
|
|
/// ends up being not much faster than doing it on the CPU.
|
|
/// String members are kept for the program source and entry points
|
|
/// for each version of the program.
|
|
/// </summary>
|
|
class EMBERCL_API DEOpenCLKernelCreator
|
|
{
|
|
public:
|
|
DEOpenCLKernelCreator();
|
|
DEOpenCLKernelCreator(bool doublePrecision, bool nVidia);
|
|
|
|
//Accessors.
|
|
const string& LogScaleAssignDEKernel() const;
|
|
const string& LogScaleAssignDEEntryPoint() const;
|
|
const string& GaussianDEKernel(size_t ss, uint filterWidth) const;
|
|
const string& GaussianDEEntryPoint(size_t ss, uint filterWidth) const;
|
|
|
|
//Miscellaneous static functions.
|
|
static uint MaxDEFilterSize();
|
|
static double SolveMaxDERad(double desiredFilterSize, double ss);
|
|
static uint SolveMaxBoxSize(uint localMem);
|
|
|
|
private:
|
|
//Kernel creators.
|
|
string CreateLogScaleAssignDEKernelString();
|
|
string CreateGaussianDEKernel(size_t ss);
|
|
string CreateGaussianDEKernelNoLocalCache(size_t ss);
|
|
|
|
string m_LogScaleAssignDEKernel;
|
|
string m_LogScaleAssignDEEntryPoint = "LogScaleAssignDensityFilterKernel";
|
|
|
|
string m_GaussianDEWithoutSsKernel;
|
|
string m_GaussianDEWithoutSsEntryPoint = "GaussianDEWithoutSsKernel";
|
|
|
|
string m_GaussianDESsWithScfKernel;
|
|
string m_GaussianDESsWithScfEntryPoint = "GaussianDESsWithScfKernel";
|
|
|
|
string m_GaussianDESsWithoutScfKernel;
|
|
string m_GaussianDESsWithoutScfEntryPoint = "GaussianDESsWithoutScfKernel";
|
|
|
|
string m_GaussianDEWithoutSsNoCacheKernel;
|
|
string m_GaussianDEWithoutSsNoCacheEntryPoint = "GaussianDEWithoutSsNoCacheKernel";
|
|
|
|
string m_GaussianDESsWithScfNoCacheKernel;
|
|
string m_GaussianDESsWithScfNoCacheEntryPoint = "GaussianDESsWithScfNoCacheKernel";
|
|
|
|
string m_GaussianDESsWithoutScfNoCacheKernel;
|
|
string m_GaussianDESsWithoutScfNoCacheEntryPoint = "GaussianDESsWithoutScfNoCacheKernel";
|
|
|
|
bool m_DoublePrecision = false;
|
|
bool m_NVidia = false;
|
|
};
|
|
}
|