Adds usage flags to backend textures.

This was SVN commit r27152.
This commit is contained in:
vladislavbelov
2022-10-12 23:19:27 +00:00
parent d3f0395d2a
commit 64bd81ae6b
24 changed files with 123 additions and 40 deletions
+8 -2
View File
@@ -260,6 +260,8 @@ void CLOSTexture::ConstructTexture(Renderer::Backend::IDeviceCommandContext* dev
}
m_Texture = backendDevice->CreateTexture2D("LOSTexture",
Renderer::Backend::ITexture::Usage::TRANSFER_DST |
Renderer::Backend::ITexture::Usage::SAMPLED,
m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
// Initialise texture with SoD color, for the areas we don't
@@ -270,10 +272,14 @@ void CLOSTexture::ConstructTexture(Renderer::Backend::IDeviceCommandContext* dev
if (CRenderer::IsInitialised() && g_RenderingOptions.GetSmoothLOS())
{
const uint32_t usage =
Renderer::Backend::ITexture::Usage::TRANSFER_DST |
Renderer::Backend::ITexture::Usage::SAMPLED |
Renderer::Backend::ITexture::Usage::COLOR_ATTACHMENT;
m_SmoothTextures[0] = backendDevice->CreateTexture2D("LOSSmoothTexture0",
m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
usage, m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
m_SmoothTextures[1] = backendDevice->CreateTexture2D("LOSSmoothTexture1",
m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
usage, m_TextureFormat, textureSize, textureSize, defaultSamplerDesc);
m_SmoothFramebuffers[0] = backendDevice->CreateFramebuffer(
"LOSSmoothFramebuffer0", m_SmoothTextures[0].get(), nullptr);