1
0
forked from mirrors/0ad

Ands new depth stencil format to support all combinations on Vulkan.

Tested By: hyperion, nwtour
Differential Revision: https://code.wildfiregames.com/D4878
This was SVN commit r27421.
This commit is contained in:
vladislavbelov
2023-01-12 06:32:52 +00:00
parent b573993000
commit ccda54a662
15 changed files with 121 additions and 89 deletions
+5 -5
View File
@@ -519,14 +519,14 @@ void ShadowMapInternals::CreateTexture()
const char* formatName;
Renderer::Backend::Format backendFormat = Renderer::Backend::Format::UNDEFINED;
#if CONFIG2_GLES
formatName = "Format::D24";
backendFormat = Renderer::Backend::Format::D24;
formatName = "Format::D24_UNORM";
backendFormat = Renderer::Backend::Format::D24_UNORM;
#else
switch (DepthTextureBits)
{
case 16: formatName = "Format::D16"; backendFormat = Renderer::Backend::Format::D16; break;
case 24: formatName = "Format::D24"; backendFormat = Renderer::Backend::Format::D24; break;
case 32: formatName = "Format::D32"; backendFormat = Renderer::Backend::Format::D32; break;
case 16: formatName = "Format::D16_UNORM"; backendFormat = Renderer::Backend::Format::D16_UNORM; break;
case 24: formatName = "Format::D24_UNORM"; backendFormat = Renderer::Backend::Format::D24_UNORM; break;
case 32: formatName = "Format::D32_SFLOAT"; backendFormat = Renderer::Backend::Format::D32_SFLOAT; break;
default:
formatName = "Default";
backendFormat = backendDevice->GetPreferredDepthStencilFormat(