mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-02-01 10:30:08 -05:00
--Bug fixes
-Nvidia OpenCL compilation was broken for density filtering due to ambiguity in the arguments to min(). Fix it by casting. -Put Nvidia block size in DE back to 24 where it used to be. Nvidia fails when it's 32. -Fix misspelling of the word "Rendering" in failure messages in final render dialog. -Put FillSummary() back when loading an ember. -Properly disable add final xform button when a final xform is present.
This commit is contained in:
commit
fda1fdeee7
0
Builds/QtCreator/build_all.sh
Executable file → Normal file
0
Builds/QtCreator/build_all.sh
Executable file → Normal file
@ -550,13 +550,13 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernel(size_t ss)
|
||||
//Start and end values are the indices in the histogram read from
|
||||
//and written to in the accumulator. They are not the indices for the local block of data.
|
||||
//Before computing local offsets, compute the global offsets first to determine if any rows or cols fall outside of the bounds.
|
||||
" blockHistStartRow = min(botBound, topBound + (((BLOCK_ID_Y * chunkSizeH) + chunkH) * BLOCK_SIZE_Y));\n"//The first histogram row this block will process.
|
||||
" blockHistEndRow = min(botBound, blockHistStartRow + BLOCK_SIZE_Y);\n"//The last histogram row this block will process, clamped to the last row.
|
||||
" blockHistStartRow = min(botBound, (uint)(topBound + (((BLOCK_ID_Y * chunkSizeH) + chunkH) * BLOCK_SIZE_Y)));\n"//The first histogram row this block will process.
|
||||
" blockHistEndRow = min(botBound, (uint)(blockHistStartRow + BLOCK_SIZE_Y));\n"//The last histogram row this block will process, clamped to the last row.
|
||||
" boxReadStartRow = densityFilter->m_FilterWidth - min(densityFilter->m_FilterWidth, blockHistStartRow);\n"//The first row in the local box to read from when writing back to the final accumulator for this block.
|
||||
" boxReadEndRow = densityFilter->m_FilterWidth + min(densityFilter->m_FilterWidth + BLOCK_SIZE_Y, densityFilter->m_SuperRasH - blockHistStartRow);\n"//The last row in the local box to read from when writing back to the final accumulator for this block.
|
||||
" blockHistStartCol = min(rightBound, leftBound + (((BLOCK_ID_X * chunkSizeW) + chunkW) * BLOCK_SIZE_X));\n"//The first histogram column this block will process.
|
||||
" boxReadEndRow = densityFilter->m_FilterWidth + min((uint)(densityFilter->m_FilterWidth + BLOCK_SIZE_Y), densityFilter->m_SuperRasH - blockHistStartRow);\n"//The last row in the local box to read from when writing back to the final accumulator for this block.
|
||||
" blockHistStartCol = min(rightBound, leftBound + (uint)(((BLOCK_ID_X * chunkSizeW) + chunkW) * BLOCK_SIZE_X));\n"//The first histogram column this block will process.
|
||||
" boxReadStartCol = densityFilter->m_FilterWidth - min(densityFilter->m_FilterWidth, blockHistStartCol);\n"//The first box col this block will read from when copying to the accumulator.
|
||||
" boxReadEndCol = densityFilter->m_FilterWidth + min(densityFilter->m_FilterWidth + BLOCK_SIZE_X, densityFilter->m_SuperRasW - blockHistStartCol);\n"//The last box col this block will read from when copying to the accumulator.
|
||||
" boxReadEndCol = densityFilter->m_FilterWidth + min(densityFilter->m_FilterWidth + (uint)BLOCK_SIZE_X, densityFilter->m_SuperRasW - blockHistStartCol);\n"//The last box col this block will read from when copying to the accumulator.
|
||||
"\n"
|
||||
//Last, the indices in the global accumulator that the local bounds will be writing to.
|
||||
" accumWriteStartRow = blockHistStartRow - min(densityFilter->m_FilterWidth, blockHistStartRow);\n"//Will be fw - 0 except for boundary columns, it will be less.
|
||||
@ -788,10 +788,10 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernelNoLocalCache(size_t ss)
|
||||
"\n"
|
||||
//Start and end values are the indices in the histogram read from and written to in the accumulator.
|
||||
//Before computing local offsets, compute the global offsets first to determine if any rows or cols fall outside of the bounds.
|
||||
" uint blockHistStartRow = min(botBound, topBound + (((BLOCK_ID_Y * chunkSizeH) + chunkH) * BLOCK_SIZE_Y));\n"//The first histogram row this block will process.
|
||||
" uint blockHistStartRow = min(botBound, (uint)(topBound + (((BLOCK_ID_Y * chunkSizeH) + chunkH) * BLOCK_SIZE_Y)));\n"//The first histogram row this block will process.
|
||||
" uint threadHistRow = blockHistStartRow + THREAD_ID_Y;\n"//The histogram row this individual thread will be reading from.
|
||||
"\n"
|
||||
" uint blockHistStartCol = min(rightBound, leftBound + (((BLOCK_ID_X * chunkSizeW) + chunkW) * BLOCK_SIZE_X));\n"//The first histogram column this block will process.
|
||||
" uint blockHistStartCol = min(rightBound, leftBound + (uint)(((BLOCK_ID_X * chunkSizeW) + chunkW) * BLOCK_SIZE_X));\n"//The first histogram column this block will process.
|
||||
" uint threadHistCol = blockHistStartCol + THREAD_ID_X;\n"//The histogram column this individual thread will be reading from.
|
||||
"\n"
|
||||
" int i, j;\n"
|
||||
|
@ -116,8 +116,8 @@ bool RendererCL<T>::Init(uint platform, uint device, bool shared, GLuint outputT
|
||||
//Sadly, at the moment, Fermi runs out of resources at that block size because the DE filter function is so complex.
|
||||
//The next best block size seems to be 24x24.
|
||||
//AMD is further limited because of less local memory so these have to be 16 on AMD.
|
||||
m_MaxDEBlockSizeW = m_NVidia ? 32 : 16;//These *must* both be divisible by 16 or else pixels will go missing.
|
||||
m_MaxDEBlockSizeH = m_NVidia ? 32 : 16;
|
||||
m_MaxDEBlockSizeW = m_NVidia ? 24 : 16;//These *must* both be divisible by 16 or else pixels will go missing.
|
||||
m_MaxDEBlockSizeH = m_NVidia ? 24 : 16;
|
||||
m_Init = true;
|
||||
//t.Toc(loc);
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ FinalRenderEmberController<T>::FinalRenderEmberController(FractoriumFinalRenderD
|
||||
//Can't use strips render here. Run() must be called directly for animation.
|
||||
if (m_Renderer->Run(m_FinalImage[finalImageIndex], i) != RENDER_OK)
|
||||
{
|
||||
Output("Renderering failed.\n");
|
||||
Output("Rendering failed.\n");
|
||||
m_Fractorium->ErrorReportToQTextEdit(m_Renderer->ErrorReport(), m_FinalRenderDialog->ui.FinalRenderTextOutput, false);//Internally calls invoke.
|
||||
}
|
||||
else
|
||||
@ -269,7 +269,7 @@ FinalRenderEmberController<T>::FinalRenderEmberController(FractoriumFinalRenderD
|
||||
[&](size_t strip) { m_Stats += m_Renderer->Stats(); },//Post strip.
|
||||
[&](size_t strip)//Error.
|
||||
{
|
||||
Output("Renderering failed.\n");
|
||||
Output("Rendering failed.\n");
|
||||
m_Fractorium->ErrorReportToQTextEdit(m_Renderer->ErrorReport(), m_FinalRenderDialog->ui.FinalRenderTextOutput, false);//Internally calls invoke.
|
||||
},
|
||||
[&](Ember<T>& finalEmber) { RenderComplete(finalEmber); });//Final strip.
|
||||
@ -293,7 +293,7 @@ FinalRenderEmberController<T>::FinalRenderEmberController(FractoriumFinalRenderD
|
||||
[&](size_t strip) { m_Stats += m_Renderer->Stats(); },//Post strip.
|
||||
[&](size_t strip)//Error.
|
||||
{
|
||||
Output("Renderering failed.\n");
|
||||
Output("Rendering failed.\n");
|
||||
m_Fractorium->ErrorReportToQTextEdit(m_Renderer->ErrorReport(), m_FinalRenderDialog->ui.FinalRenderTextOutput, false);//Internally calls invoke.
|
||||
},
|
||||
[&](Ember<T>& finalEmber) { RenderComplete(finalEmber); });//Final strip.
|
||||
|
@ -357,7 +357,7 @@ void Fractorium::resizeEvent(QResizeEvent* e)
|
||||
/// <param name="e">The event</param>
|
||||
void Fractorium::showEvent(QShowEvent *e)
|
||||
{
|
||||
// tell Qt to refresh the native menubar from this widget
|
||||
//Tell Qt to refresh the native menubar from this widget.
|
||||
emit qGuiApp->focusWindowChanged(windowHandle());
|
||||
QMainWindow::showEvent(e);
|
||||
}
|
||||
|
@ -338,6 +338,7 @@ void FractoriumEmberController<T>::SetEmberPrivate(const Ember<U>& ember, bool v
|
||||
m_GLController->ResetMouseState();
|
||||
FillXforms();//Must do this first because the palette setup in FillParamTablesAndPalette() uses the xforms combo.
|
||||
FillParamTablesAndPalette();
|
||||
FillSummary();
|
||||
|
||||
//If a resize happened, this won't do anything because the new size is not reflected in the scroll area yet.
|
||||
//However, it will have been taken care of in SyncSizes() in that case, so it's ok.
|
||||
|
@ -88,7 +88,7 @@ void FractoriumEmberController<T>::CurrentXformComboChanged(int index)
|
||||
m_Fractorium->m_XformWeightSpin->setEnabled(enable);
|
||||
m_Fractorium->ui.SoloXformCheckBox->setEnabled(enable);
|
||||
m_Fractorium->ui.AddLinkedXformButton->setEnabled(enable);
|
||||
m_Fractorium->ui.AddFinalXformButton->setEnabled(enable);
|
||||
m_Fractorium->ui.AddFinalXformButton->setEnabled(!m_Ember.UseFinalXform());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user