mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
Updated VertexFormat enums
Shifts the older enum values up by 30, but if anyone was using values rather than the enums themselves they'd land on the right formats anyway. Bug: dawn:695 Change-Id: I92a177b427fb1bb14b60d9280f89d030c5941a38 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42561 Commit-Queue: Brandon Jones <bajones@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Auto-Submit: Brandon Jones <bajones@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
87649ff09d
commit
e3f10e3d8e
@@ -106,7 +106,7 @@ namespace {
|
||||
descriptor->cVertexState.vertexBufferCount = 1;
|
||||
descriptor->cVertexState.cVertexBuffers[0].arrayStride = 2 * sizeof(float);
|
||||
descriptor->cVertexState.cVertexBuffers[0].attributeCount = 1;
|
||||
descriptor->cVertexState.cAttributes[0].format = wgpu::VertexFormat::Float2;
|
||||
descriptor->cVertexState.cAttributes[0].format = wgpu::VertexFormat::Float32x2;
|
||||
descriptor->cVertexState.cAttributes[0].shaderLocation = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -646,7 +646,7 @@ TEST_F(RenderPipelineValidationTest, VertexAttribCorrectEntryPoint) {
|
||||
descriptor.cVertexState.vertexBufferCount = 1;
|
||||
descriptor.cVertexState.cVertexBuffers[0].attributeCount = 1;
|
||||
descriptor.cVertexState.cVertexBuffers[0].arrayStride = 16;
|
||||
descriptor.cVertexState.cAttributes[0].format = wgpu::VertexFormat::Float4;
|
||||
descriptor.cVertexState.cAttributes[0].format = wgpu::VertexFormat::Float32x4;
|
||||
descriptor.cVertexState.cAttributes[0].offset = 0;
|
||||
|
||||
// Success cases, the attribute used by the entryPoint is declared in the pipeline.
|
||||
|
||||
@@ -73,7 +73,7 @@ class VertexBufferValidationTest : public ValidationTest {
|
||||
descriptor.cVertexState.cVertexBuffers[i].attributes =
|
||||
&descriptor.cVertexState.cAttributes[i];
|
||||
descriptor.cVertexState.cAttributes[i].shaderLocation = i;
|
||||
descriptor.cVertexState.cAttributes[i].format = wgpu::VertexFormat::Float3;
|
||||
descriptor.cVertexState.cAttributes[i].format = wgpu::VertexFormat::Float32x3;
|
||||
}
|
||||
descriptor.cVertexState.vertexBufferCount = bufferCount;
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ TEST_F(VertexStateTest, SetAttributeOffsetOutOfBounds) {
|
||||
utils::ComboVertexStateDescriptor state;
|
||||
state.vertexBufferCount = 1;
|
||||
state.cVertexBuffers[0].attributeCount = 1;
|
||||
state.cAttributes[0].offset = kMaxVertexBufferStride - sizeof(wgpu::VertexFormat::Float);
|
||||
state.cAttributes[0].offset = kMaxVertexBufferStride - sizeof(wgpu::VertexFormat::Float32);
|
||||
CreatePipeline(true, state, kDummyVertexShader);
|
||||
|
||||
// Test attribute offset out of bounds
|
||||
@@ -321,6 +321,6 @@ TEST_F(VertexStateTest, VertexFormatLargerThanNonZeroStride) {
|
||||
state.vertexBufferCount = 1;
|
||||
state.cVertexBuffers[0].arrayStride = 4;
|
||||
state.cVertexBuffers[0].attributeCount = 1;
|
||||
state.cAttributes[0].format = wgpu::VertexFormat::Float4;
|
||||
state.cAttributes[0].format = wgpu::VertexFormat::Float32x4;
|
||||
CreatePipeline(false, state, kDummyVertexShader);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user