mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 13:10:04 -05:00
Update osx ambiguous-call fix to support the varying-precision mechanism
This commit is contained in:
parent
cf4f5d9899
commit
b222ed4cc3
@ -377,7 +377,7 @@ string FinalAccumOpenCLKernelCreator<T>::CreateGammaCorrectionFunctionString(boo
|
||||
|
||||
os <<
|
||||
"\n"
|
||||
" correctedChannels[rgbi] = (" << dataType << ")clamp(a, 0.0f, 255.0f);\n"
|
||||
" correctedChannels[rgbi] = (" << dataType << ")clamp(a, T(0.0), T(255.0));\n"
|
||||
" }\n"
|
||||
"\n";
|
||||
|
||||
|
@ -1221,10 +1221,13 @@ bool OpenCLWrapper::CreateSPK(const string& name, const string& program, const s
|
||||
{
|
||||
if (m_Init)
|
||||
{
|
||||
std::string precisionDef(doublePrecision ? "#define T(v) (double)(v)\n" : "#define T(v) (float)(v)\n");
|
||||
std::string p(precisionDef + program);
|
||||
|
||||
cl_int err;
|
||||
|
||||
spk.m_Name = name;
|
||||
spk.m_Source = cl::Program::Sources(1, std::make_pair(program.c_str(), program.length() + 1));
|
||||
spk.m_Source = cl::Program::Sources(1, std::make_pair(p.c_str(), p.length() + 1));
|
||||
spk.m_Program = cl::Program(m_Context, spk.m_Source);
|
||||
|
||||
if (doublePrecision)
|
||||
|
Loading…
Reference in New Issue
Block a user