mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-02-23 13:31:31 -05:00
Bug fixes:
--Cleaner exit on some failures. --Better reporting of OpenCL errors.
This commit is contained in:
parent
4749a7aec4
commit
5da944f589
@ -446,7 +446,13 @@ eRenderStatus Renderer<T, bucketT>::Run(vector<v4F>& finalImage, double time, si
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!resume)
|
if (!resume)
|
||||||
ResetBuckets(true, false);//Only reset hist here and do accum when needed later on.
|
{
|
||||||
|
if (!ResetBuckets(true, false))//Only reset hist here and do accum when needed later on.
|
||||||
|
{
|
||||||
|
success = eRenderStatus::RENDER_ERROR;
|
||||||
|
goto Finish;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
deTime = T(time) + *m_TemporalFilter->Deltas();
|
deTime = T(time) + *m_TemporalFilter->Deltas();
|
||||||
|
|
||||||
@ -587,7 +593,12 @@ FilterAndAccum:
|
|||||||
else
|
else
|
||||||
m_K2 = bucketT((Supersample() * Supersample()) / (area * m_ScaledQuality * m_TemporalFilter->SumFilt()));
|
m_K2 = bucketT((Supersample() * Supersample()) / (area * m_ScaledQuality * m_TemporalFilter->SumFilt()));
|
||||||
|
|
||||||
ResetBuckets(false, true);//Only the histogram was reset above, now reset the density filtering buffer.
|
if (!ResetBuckets(false, true))//Only the histogram was reset above, now reset the density filtering buffer.
|
||||||
|
{
|
||||||
|
success = eRenderStatus::RENDER_ERROR;
|
||||||
|
goto Finish;
|
||||||
|
}
|
||||||
|
|
||||||
//t.Tic();
|
//t.Tic();
|
||||||
//Make sure a density filter was created with the latest values.
|
//Make sure a density filter was created with the latest values.
|
||||||
ClampGteRef<T>(m_Ember.m_MinRadDE, 0);
|
ClampGteRef<T>(m_Ember.m_MinRadDE, 0);
|
||||||
@ -616,8 +627,11 @@ FilterAndAccum:
|
|||||||
//Take special action if filtering exited prematurely.
|
//Take special action if filtering exited prematurely.
|
||||||
if (fullRun != eRenderStatus::RENDER_OK)
|
if (fullRun != eRenderStatus::RENDER_OK)
|
||||||
{
|
{
|
||||||
ResetBuckets(false, true);//Reset the accumulator, come back and try again on the next call.
|
if (!ResetBuckets(false, true))//Reset the accumulator, come back and try again on the next call.
|
||||||
success = fullRun;
|
success = eRenderStatus::RENDER_ERROR;
|
||||||
|
else
|
||||||
|
success = fullRun;
|
||||||
|
|
||||||
goto Finish;
|
goto Finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -985,6 +985,39 @@ size_t OpenCLWrapper::LocalMemSize() const { return m_LocalMemSize; }
|
|||||||
size_t OpenCLWrapper::GlobalMemSize() const { return m_GlobalMemSize; }
|
size_t OpenCLWrapper::GlobalMemSize() const { return m_GlobalMemSize; }
|
||||||
size_t OpenCLWrapper::MaxAllocSize() const { return m_MaxAllocSize; }
|
size_t OpenCLWrapper::MaxAllocSize() const { return m_MaxAllocSize; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clear the error report for this class as well as the global OpenCLInfo instance.
|
||||||
|
/// </summary>
|
||||||
|
void OpenCLWrapper::ClearErrorReport()
|
||||||
|
{
|
||||||
|
EmberReport::ClearErrorReport();
|
||||||
|
m_Info->ClearErrorReport();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Concatenate and return the error report for this class and the
|
||||||
|
/// global OpenCLInfo instance as a single string.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The concatenated error report string</returns>
|
||||||
|
string OpenCLWrapper::ErrorReportString()
|
||||||
|
{
|
||||||
|
auto s = EmberReport::ErrorReportString();
|
||||||
|
return s + m_Info->ErrorReportString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Concatenate and return the error report for this class and the
|
||||||
|
/// global OpenCLInfo instance as a vector of strings.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The concatenated error report vector of strings</returns>
|
||||||
|
vector<string> OpenCLWrapper::ErrorReport()
|
||||||
|
{
|
||||||
|
auto ours = EmberReport::ErrorReport();
|
||||||
|
auto s = m_Info->ErrorReport();
|
||||||
|
ours.insert(ours.end(), s.begin(), s.end());
|
||||||
|
return ours;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make even grid dimensions.
|
/// Make even grid dimensions.
|
||||||
/// The size of the blocks in terms of threads must divide evenly into the total number of threads in the grid.
|
/// The size of the blocks in terms of threads must divide evenly into the total number of threads in the grid.
|
||||||
|
@ -179,6 +179,11 @@ public:
|
|||||||
size_t GlobalMemSize() const;
|
size_t GlobalMemSize() const;
|
||||||
size_t MaxAllocSize() const;
|
size_t MaxAllocSize() const;
|
||||||
|
|
||||||
|
//Public virtual functions overridden from base classes.
|
||||||
|
virtual void ClearErrorReport() override;
|
||||||
|
virtual string ErrorReportString() override;
|
||||||
|
virtual vector<string> ErrorReport() override;
|
||||||
|
|
||||||
static void MakeEvenGridDims(size_t blockW, size_t blockH, size_t& gridW, size_t& gridH);
|
static void MakeEvenGridDims(size_t blockW, size_t blockH, size_t& gridW, size_t& gridH);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user