mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Implement unorm_rgba8 and unorm_rg8 vertex formats.
Backend support implemented in GL, Metal and D3D12. Support for unorm values in the GL backend requires a utility function to indicate if the format's components are normalized. Note that unorm_r8 is only supported on more recent MacOS SDKs (10.13), so it's omitted for now.
This commit is contained in:
committed by
Corentin Wallez
parent
33dfd0a78f
commit
8d742d1375
@@ -44,10 +44,12 @@ class InputStateTest : public NXTTest {
|
||||
EXPECT_TRUE(component >= 0 && component < 4);
|
||||
switch (format) {
|
||||
case VertexFormat::FloatR32G32B32A32:
|
||||
case VertexFormat::UnormR8G8B8A8:
|
||||
return component >= 4;
|
||||
case VertexFormat::FloatR32G32B32:
|
||||
return component >= 3;
|
||||
case VertexFormat::FloatR32G32:
|
||||
case VertexFormat::UnormR8G8:
|
||||
return component >= 2;
|
||||
case VertexFormat::FloatR32:
|
||||
return component >= 1;
|
||||
|
||||
Reference in New Issue
Block a user