mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Add support for R16G16B16A16 ushort.
Also implement both new formats in Vulkan.
This commit is contained in:
committed by
Corentin Wallez
parent
0b1fbd9322
commit
ee66f25c4f
@@ -49,6 +49,7 @@ namespace backend { namespace opengl {
|
||||
case nxt::VertexFormat::FloatR32G32:
|
||||
case nxt::VertexFormat::FloatR32:
|
||||
return GL_FLOAT;
|
||||
case nxt::VertexFormat::UshortR16G16B16A16:
|
||||
case nxt::VertexFormat::UshortR16G16:
|
||||
return GL_UNSIGNED_SHORT;
|
||||
case nxt::VertexFormat::UnormR8G8B8A8:
|
||||
@@ -61,17 +62,11 @@ namespace backend { namespace opengl {
|
||||
|
||||
GLboolean VertexFormatIsNormalized(nxt::VertexFormat format) {
|
||||
switch (format) {
|
||||
case nxt::VertexFormat::FloatR32G32B32A32:
|
||||
case nxt::VertexFormat::FloatR32G32B32:
|
||||
case nxt::VertexFormat::FloatR32G32:
|
||||
case nxt::VertexFormat::FloatR32:
|
||||
case nxt::VertexFormat::UshortR16G16:
|
||||
return GL_FALSE;
|
||||
case nxt::VertexFormat::UnormR8G8B8A8:
|
||||
case nxt::VertexFormat::UnormR8G8:
|
||||
return GL_TRUE;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user