Skip to content

Commit

Permalink
better max resolutions detection on Vulkan
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenegff committed Sep 14, 2023
1 parent 2eb8af6 commit 07fb831
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,9 @@ namespace Ogre
}

const VkPhysicalDeviceLimits &deviceLimits = mDevice->mDeviceProperties.limits;
rsc->setMaximumResolutions( deviceLimits.maxImageDimension2D, deviceLimits.maxImageDimension3D,
deviceLimits.maxImageDimensionCube );
rsc->setMaximumResolutions( std::min( deviceLimits.maxImageDimension2D, 16384u ),
std::min( deviceLimits.maxImageDimension3D, 4096u ),
std::min( deviceLimits.maxImageDimensionCube, 16384u ) );
rsc->setMaxThreadsPerThreadgroupAxis( deviceLimits.maxComputeWorkGroupSize );
rsc->setMaxThreadsPerThreadgroup( deviceLimits.maxComputeWorkGroupInvocations );

Expand Down Expand Up @@ -673,7 +674,6 @@ namespace Ogre
rsc->setCapability( RSC_EXPLICIT_API );
rsc->setMaxPointSize( 256 );

rsc->setMaximumResolutions( 16384, 4096, 16384 );

rsc->setVertexProgramConstantFloatCount( 256u );
rsc->setVertexProgramConstantIntCount( 256u );
Expand Down

0 comments on commit 07fb831

Please sign in to comment.