2014-07-08 03:11:14 -04:00
|
|
|
#pragma once
|
2014-12-05 21:30:46 -05:00
|
|
|
|
2014-07-08 03:11:14 -04:00
|
|
|
#include "EmberCLPch.h"
|
|
|
|
#include "EmberCLStructs.h"
|
|
|
|
#include "EmberCLFunctions.h"
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// FinalAccumOpenCLKernelCreator class.
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
namespace EmberCLns
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Class for creating the final accumulation code in OpenCL.
|
|
|
|
/// There are many conditionals in the CPU code to create the
|
|
|
|
/// final output image. This class creates many different kernels
|
|
|
|
/// with all conditionals and unnecessary calculations stripped out.
|
|
|
|
/// The conditionals are:
|
|
|
|
/// Early clip/late clip
|
|
|
|
/// </summary>
|
|
|
|
class EMBERCL_API FinalAccumOpenCLKernelCreator
|
|
|
|
{
|
|
|
|
public:
|
2015-08-10 23:10:23 -04:00
|
|
|
FinalAccumOpenCLKernelCreator(bool doublePrecision);
|
2014-12-05 21:30:46 -05:00
|
|
|
|
2015-08-12 21:51:07 -04:00
|
|
|
const string& FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumKernel() const;
|
|
|
|
const string& FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumEntryPoint() const;
|
|
|
|
const string& FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumKernel() const;
|
|
|
|
const string& FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumEntryPoint() const;
|
2017-07-22 16:43:35 -04:00
|
|
|
const string& GammaCorrectionEntryPoint() const;
|
|
|
|
const string& GammaCorrectionKernel() const;
|
|
|
|
const string& FinalAccumEntryPoint(bool earlyClip) const;
|
|
|
|
const string& FinalAccumKernel(bool earlyClip) const;
|
2014-07-08 03:11:14 -04:00
|
|
|
|
|
|
|
private:
|
2017-07-22 16:43:35 -04:00
|
|
|
string CreateFinalAccumKernelString(bool earlyClip);
|
|
|
|
string CreateGammaCorrectionKernelString();
|
2014-07-08 03:11:14 -04:00
|
|
|
|
2017-07-22 16:43:35 -04:00
|
|
|
string CreateGammaCorrectionFunctionString(bool globalBucket, bool finalOut);
|
2014-07-08 03:11:14 -04:00
|
|
|
string CreateCalcNewRgbFunctionString(bool globalBucket);
|
2015-08-12 21:51:07 -04:00
|
|
|
|
2014-07-08 03:11:14 -04:00
|
|
|
string m_GammaCorrectionWithoutAlphaCalcKernel;
|
2016-04-03 21:55:12 -04:00
|
|
|
string m_GammaCorrectionWithoutAlphaCalcEntryPoint = "GammaCorrectionWithoutAlphaCalcKernel";
|
2014-07-08 03:11:14 -04:00
|
|
|
|
2017-07-22 16:43:35 -04:00
|
|
|
string m_FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumKernel;
|
2016-04-03 21:55:12 -04:00
|
|
|
string m_FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumEntryPoint = "FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumKernel";
|
2014-07-08 03:11:14 -04:00
|
|
|
|
2017-07-22 16:43:35 -04:00
|
|
|
string m_FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumKernel;
|
2016-04-03 21:55:12 -04:00
|
|
|
string m_FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumEntryPoint = "FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumKernel";
|
2015-08-10 23:10:23 -04:00
|
|
|
|
2015-08-12 21:51:07 -04:00
|
|
|
string m_Empty;
|
2015-08-10 23:10:23 -04:00
|
|
|
bool m_DoublePrecision;
|
2014-07-08 03:11:14 -04:00
|
|
|
};
|
2014-12-05 21:30:46 -05:00
|
|
|
}
|