Minor fixes

This commit is contained in:
Jérôme Leclercq
2021-10-29 13:29:49 +02:00
parent 0dbb77de10
commit 32c204e95f
10 changed files with 108 additions and 104 deletions

View File

@@ -781,7 +781,7 @@ namespace Nz
#ifdef NAZARA_DEBUG
if (interpolation < T(0.0) || interpolation > T(1.0))
{
NazaraError("Interpolation must be in range [0..1] (Got " + NumberToString(interpolation) + ')');
NazaraError("Interpolation must be in range [0..1] (Got " + std::to_string(interpolation) + ')');
return Zero();
}
#endif

View File

@@ -249,6 +249,9 @@ namespace Nz
{
switch (pixelFormat)
{
// TODO: Fill this switch
case PixelFormat::BGR8: return VK_FORMAT_B8G8R8_UNORM;
case PixelFormat::BGR8_SRGB: return VK_FORMAT_B8G8R8_SRGB;
case PixelFormat::BGRA8: return VK_FORMAT_B8G8R8A8_UNORM;
case PixelFormat::BGRA8_SRGB: return VK_FORMAT_B8G8R8A8_SRGB;
case PixelFormat::Depth16: return VK_FORMAT_D16_UNORM;
@@ -256,6 +259,8 @@ namespace Nz
case PixelFormat::Depth24Stencil8: return VK_FORMAT_D24_UNORM_S8_UINT;
case PixelFormat::Depth32F: return VK_FORMAT_D32_SFLOAT;
case PixelFormat::Depth32FStencil8: return VK_FORMAT_D32_SFLOAT_S8_UINT;
case PixelFormat::RGB8: return VK_FORMAT_R8G8B8_UNORM;
case PixelFormat::RGB8_SRGB: return VK_FORMAT_R8G8B8_SRGB;
case PixelFormat::RGBA8: return VK_FORMAT_R8G8B8A8_UNORM;
case PixelFormat::RGBA8_SRGB: return VK_FORMAT_R8G8B8A8_SRGB;
case PixelFormat::RGBA32F: return VK_FORMAT_R32G32B32A32_SFLOAT;

View File

@@ -59,8 +59,8 @@ namespace Nz
inline void CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, UInt32 width, UInt32 height, UInt32 depth = 1);
inline void CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, const VkImageSubresourceLayers& subresourceLayers, Int32 x, Int32 y, Int32 z, UInt32 width, UInt32 height, UInt32 depth);
inline void CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, const VkImageSubresourceLayers& subresourceLayers, UInt32 width, UInt32 height, UInt32 depth = 1);
inline void CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, const VkImageSubresourceLayers& subresourceLayers, const VkBufferImageCopy& region);
inline void CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, const VkImageSubresourceLayers& subresourceLayers, UInt32 regionCount, const VkBufferImageCopy* regions);
inline void CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, const VkBufferImageCopy& region);
inline void CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, UInt32 regionCount, const VkBufferImageCopy* regions);
inline void CopyImage(VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, const VkImageCopy& region);
inline void CopyImage(VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, UInt32 regionCount, const VkImageCopy* regions);

View File

@@ -251,7 +251,7 @@ namespace Nz
}
};
return CopyBufferToImage(source, target, targetLayout, subresourceLayers, region);
return CopyBufferToImage(source, target, targetLayout, region);
}
inline void CommandBuffer::CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, const VkImageSubresourceLayers& subresourceLayers, UInt32 width, UInt32 height, UInt32 depth)
@@ -269,15 +269,15 @@ namespace Nz
}
};
return CopyBufferToImage(source, target, targetLayout, subresourceLayers, region);
return CopyBufferToImage(source, target, targetLayout, region);
}
inline void CommandBuffer::CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, const VkImageSubresourceLayers& subresourceLayers, const VkBufferImageCopy& region)
inline void CommandBuffer::CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, const VkBufferImageCopy& region)
{
return CopyBufferToImage(source, target, targetLayout, subresourceLayers, 1, &region);
return CopyBufferToImage(source, target, targetLayout, 1, &region);
}
inline void CommandBuffer::CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, const VkImageSubresourceLayers& subresourceLayers, UInt32 regionCount, const VkBufferImageCopy* regions)
inline void CommandBuffer::CopyBufferToImage(VkBuffer source, VkImage target, VkImageLayout targetLayout, UInt32 regionCount, const VkBufferImageCopy* regions)
{
return m_pool->GetDevice()->vkCmdCopyBufferToImage(m_handle, source, target, targetLayout, regionCount, regions);
}