mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 19:01:24 +00:00
Implement recent vertex and texture formats on Vk.
Implement unorm_rgba8 and unorm_rg8 vertex formats and {uint8, unorm8} x {r, rg} texture formats on Vulkan backend.
This commit is contained in:
parent
1c24abc672
commit
ceec97978e
@ -41,6 +41,10 @@ namespace backend { namespace vulkan {
|
|||||||
return VK_FORMAT_R32G32_SFLOAT;
|
return VK_FORMAT_R32G32_SFLOAT;
|
||||||
case nxt::VertexFormat::FloatR32:
|
case nxt::VertexFormat::FloatR32:
|
||||||
return VK_FORMAT_R32_SFLOAT;
|
return VK_FORMAT_R32_SFLOAT;
|
||||||
|
case nxt::VertexFormat::UnormR8G8B8A8:
|
||||||
|
return VK_FORMAT_R8G8B8A8_UNORM;
|
||||||
|
case nxt::VertexFormat::UnormR8G8:
|
||||||
|
return VK_FORMAT_R8G8_UNORM;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
@ -188,8 +188,16 @@ namespace backend { namespace vulkan {
|
|||||||
switch (format) {
|
switch (format) {
|
||||||
case nxt::TextureFormat::R8G8B8A8Unorm:
|
case nxt::TextureFormat::R8G8B8A8Unorm:
|
||||||
return VK_FORMAT_R8G8B8A8_UNORM;
|
return VK_FORMAT_R8G8B8A8_UNORM;
|
||||||
|
case nxt::TextureFormat::R8G8Unorm:
|
||||||
|
return VK_FORMAT_R8G8_UNORM;
|
||||||
|
case nxt::TextureFormat::R8Unorm:
|
||||||
|
return VK_FORMAT_R8_UNORM;
|
||||||
case nxt::TextureFormat::R8G8B8A8Uint:
|
case nxt::TextureFormat::R8G8B8A8Uint:
|
||||||
return VK_FORMAT_R8G8B8A8_UINT;
|
return VK_FORMAT_R8G8B8A8_UINT;
|
||||||
|
case nxt::TextureFormat::R8G8Uint:
|
||||||
|
return VK_FORMAT_R8G8_UINT;
|
||||||
|
case nxt::TextureFormat::R8Uint:
|
||||||
|
return VK_FORMAT_R8_UINT;
|
||||||
case nxt::TextureFormat::B8G8R8A8Unorm:
|
case nxt::TextureFormat::B8G8R8A8Unorm:
|
||||||
return VK_FORMAT_B8G8R8A8_UNORM;
|
return VK_FORMAT_B8G8R8A8_UNORM;
|
||||||
case nxt::TextureFormat::D32FloatS8Uint:
|
case nxt::TextureFormat::D32FloatS8Uint:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user