Skip to content
Snippets Groups Projects
Commit df9f6d51 authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

[#106] Moved max motion tile size to AppConfig

parent 51330d76
No related branches found
No related tags found
1 merge request!89Resolve "Indirect Dispatch"
......@@ -201,8 +201,8 @@ void App::run() {
m_core.prepareImageForStorage(cmdStream, m_renderTargets.motionMax);
const uint32_t motionTileDispatchCounts[3] = {
(m_core.getImageWidth( m_renderTargets.motionMax) + 7) / 8,
(m_core.getImageHeight(m_renderTargets.motionMax) + 7) / 8,
(m_core.getImageWidth( m_renderTargets.motionMax) + AppConfig::maxMotionTileSize - 1) / AppConfig::maxMotionTileSize,
(m_core.getImageHeight(m_renderTargets.motionMax) + AppConfig::maxMotionTileSize - 1) / AppConfig::maxMotionTileSize,
1 };
m_core.recordComputeDispatchToCmdStream(
......
......@@ -7,4 +7,5 @@ namespace AppConfig{
const vk::Format depthBufferFormat = vk::Format::eD32Sfloat;
const vk::Format colorBufferFormat = vk::Format::eB10G11R11UfloatPack32;
const vk::Format motionBufferFormat = vk::Format::eR16G16Sfloat;
const uint32_t maxMotionTileSize = 8;
}
\ No newline at end of file
......@@ -269,10 +269,9 @@ RenderTargets createRenderTargets(vkcv::Core& core, const uint32_t width, const
false,
true).getHandle();
const uint32_t motionTileSize = 8;
// divide and ceil to int
const uint32_t motionMaxWidth = (width + (motionTileSize - 1)) / motionTileSize;
const uint32_t motionMaxheight = (height + (motionTileSize - 1)) / motionTileSize;
const uint32_t motionMaxWidth = (width + (AppConfig::maxMotionTileSize - 1)) / AppConfig::maxMotionTileSize;
const uint32_t motionMaxheight = (height + (AppConfig::maxMotionTileSize - 1)) / AppConfig::maxMotionTileSize;
targets.motionMax = core.createImage(
AppConfig::motionBufferFormat,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment