mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 17:05:31 +00:00
Remove indirection for vertexStage
This is to match the work in progress webgpu.h header. Also contains a fix for the wire where it wouldn't GetExtraRequiredSize for structures that are by-value members of other structures. BUG=dawn:22 Change-Id: I3c706bf9cd7a550d40fd667877f032c860d0a032 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9382 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
d55bd7ad94
commit
c6c7a42e6e
@@ -630,7 +630,7 @@ class SetBindGroupValidationTest : public ValidationTest {
|
||||
})");
|
||||
|
||||
utils::ComboRenderPipelineDescriptor pipelineDescriptor(device);
|
||||
pipelineDescriptor.cVertexStage.module = vsModule;
|
||||
pipelineDescriptor.vertexStage.module = vsModule;
|
||||
pipelineDescriptor.cFragmentStage.module = fsModule;
|
||||
dawn::PipelineLayout pipelineLayout =
|
||||
utils::MakeBasicPipelineLayout(device, &mBindGroupLayout);
|
||||
|
||||
@@ -43,7 +43,7 @@ class DrawIndirectValidationTest : public ValidationTest {
|
||||
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.layout = pipelineLayout;
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
|
||||
pipeline = device.CreateRenderPipeline(&descriptor);
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace {
|
||||
|
||||
void InitializeRenderPipelineDescriptor(utils::ComboRenderPipelineDescriptor* descriptor) {
|
||||
descriptor->layout = pipelineLayout;
|
||||
descriptor->cVertexStage.module = vsModule;
|
||||
descriptor->vertexStage.module = vsModule;
|
||||
descriptor->cFragmentStage.module = fsModule;
|
||||
descriptor->cVertexInput.bufferCount = 1;
|
||||
descriptor->cVertexInput.cBuffers[0].stride = 2 * sizeof(float);
|
||||
|
||||
@@ -61,7 +61,7 @@ void main() {
|
||||
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.layout = pipelineLayout;
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
|
||||
dawn::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
|
||||
|
||||
@@ -45,7 +45,7 @@ class RenderPipelineValidationTest : public ValidationTest {
|
||||
TEST_F(RenderPipelineValidationTest, CreationSuccess) {
|
||||
{
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
|
||||
device.CreateRenderPipeline(&descriptor);
|
||||
@@ -53,7 +53,7 @@ TEST_F(RenderPipelineValidationTest, CreationSuccess) {
|
||||
{
|
||||
// Vertex input should be optional
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.vertexInput = nullptr;
|
||||
|
||||
@@ -62,10 +62,9 @@ TEST_F(RenderPipelineValidationTest, CreationSuccess) {
|
||||
{
|
||||
// Rasterization state should be optional
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.rasterizationState = nullptr;
|
||||
|
||||
device.CreateRenderPipeline(&descriptor);
|
||||
}
|
||||
}
|
||||
@@ -75,7 +74,7 @@ TEST_F(RenderPipelineValidationTest, ColorStateRequired) {
|
||||
{
|
||||
// This one succeeds because attachment 0 is the color attachment
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.colorStateCount = 1;
|
||||
|
||||
@@ -84,7 +83,7 @@ TEST_F(RenderPipelineValidationTest, ColorStateRequired) {
|
||||
|
||||
{ // Fail because lack of color states (and depth/stencil state)
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.colorStateCount = 0;
|
||||
|
||||
@@ -97,7 +96,7 @@ TEST_F(RenderPipelineValidationTest, NonRenderableFormat) {
|
||||
{
|
||||
// Succeeds because RGBA8Unorm is renderable
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.cColorStates[0]->format = dawn::TextureFormat::RGBA8Unorm;
|
||||
|
||||
@@ -107,7 +106,7 @@ TEST_F(RenderPipelineValidationTest, NonRenderableFormat) {
|
||||
{
|
||||
// Fails because RG11B10Float is non-renderable
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.cColorStates[0]->format = dawn::TextureFormat::RG11B10Float;
|
||||
|
||||
@@ -119,7 +118,7 @@ TEST_F(RenderPipelineValidationTest, NonRenderableFormat) {
|
||||
TEST_F(RenderPipelineValidationTest, SampleCount) {
|
||||
{
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.sampleCount = 4;
|
||||
|
||||
@@ -128,7 +127,7 @@ TEST_F(RenderPipelineValidationTest, SampleCount) {
|
||||
|
||||
{
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.sampleCount = 3;
|
||||
|
||||
@@ -154,7 +153,7 @@ TEST_F(RenderPipelineValidationTest, SampleCountCompatibilityWithRenderPass) {
|
||||
|
||||
utils::ComboRenderPipelineDescriptor nonMultisampledPipelineDescriptor(device);
|
||||
nonMultisampledPipelineDescriptor.sampleCount = 1;
|
||||
nonMultisampledPipelineDescriptor.cVertexStage.module = vsModule;
|
||||
nonMultisampledPipelineDescriptor.vertexStage.module = vsModule;
|
||||
nonMultisampledPipelineDescriptor.cFragmentStage.module = fsModule;
|
||||
dawn::RenderPipeline nonMultisampledPipeline =
|
||||
device.CreateRenderPipeline(&nonMultisampledPipelineDescriptor);
|
||||
@@ -167,7 +166,7 @@ TEST_F(RenderPipelineValidationTest, SampleCountCompatibilityWithRenderPass) {
|
||||
|
||||
utils::ComboRenderPipelineDescriptor multisampledPipelineDescriptor(device);
|
||||
multisampledPipelineDescriptor.sampleCount = kMultisampledCount;
|
||||
multisampledPipelineDescriptor.cVertexStage.module = vsModule;
|
||||
multisampledPipelineDescriptor.vertexStage.module = vsModule;
|
||||
multisampledPipelineDescriptor.cFragmentStage.module = fsModule;
|
||||
dawn::RenderPipeline multisampledPipeline =
|
||||
device.CreateRenderPipeline(&multisampledPipelineDescriptor);
|
||||
|
||||
@@ -71,7 +71,7 @@ class VertexBufferValidationTest : public ValidationTest {
|
||||
dawn::RenderPipeline MakeRenderPipeline(const dawn::ShaderModule& vsModule,
|
||||
unsigned int bufferCount) {
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
|
||||
for (unsigned int i = 0; i < bufferCount; ++i) {
|
||||
|
||||
@@ -34,7 +34,7 @@ class VertexInputTest : public ValidationTest {
|
||||
)");
|
||||
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.vertexInput = &state;
|
||||
descriptor.cColorStates[0]->format = dawn::TextureFormat::RGBA8Unorm;
|
||||
|
||||
Reference in New Issue
Block a user