Rename PipelineStageDescriptor to ProgrammableStageDescriptor

This is to match the WebGPU's WebIDL[1].

[1] https://github.com/gpuweb/gpuweb/pull/359

Bug: dawn:22
Change-Id: Id0cf0a7a6605ea7ec474d0f0885685ed21875dce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11883
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Jinho Bang 2019-10-07 12:23:09 +00:00 committed by Commit Bot service account
parent 90a5595bbe
commit 0b82671047
10 changed files with 23 additions and 23 deletions

View File

@ -428,7 +428,7 @@
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "layout", "type": "pipeline layout"},
{"name": "compute stage", "type": "pipeline stage descriptor"}
{"name": "compute stage", "type": "programmable stage descriptor"}
]
},
"cull mode": {
@ -751,7 +751,7 @@
{"name": "bind group layouts", "type": "bind group layout", "annotation": "const*", "length": "bind group layout count"}
]
},
"pipeline stage descriptor": {
"programmable stage descriptor": {
"category": "structure",
"extensible": true,
"members": [
@ -1094,8 +1094,8 @@
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "layout", "type": "pipeline layout"},
{"name": "vertex stage", "type": "pipeline stage descriptor"},
{"name": "fragment stage", "type": "pipeline stage descriptor", "annotation": "const*", "optional": true},
{"name": "vertex stage", "type": "programmable stage descriptor"},
{"name": "fragment stage", "type": "programmable stage descriptor", "annotation": "const*", "optional": true},
{"name": "vertex input", "type": "vertex input descriptor", "annotation": "const*", "optional": true},
{"name": "primitive topology", "type": "primitive topology"},
{"name": "rasterization state", "type": "rasterization state descriptor", "annotation": "const*", "optional": true},

View File

@ -67,7 +67,7 @@ void init() {
descriptor.vertexStage.module = vsModule;
descriptor.vertexStage.entryPoint = "main";
DawnPipelineStageDescriptor fragmentStage;
DawnProgrammableStageDescriptor fragmentStage;
fragmentStage.nextInChain = nullptr;
fragmentStage.module = fsModule;
fragmentStage.entryPoint = "main";

View File

@ -26,8 +26,8 @@ namespace dawn_native {
}
DAWN_TRY(device->ValidateObject(descriptor->layout));
DAWN_TRY(ValidatePipelineStageDescriptor(device, &descriptor->computeStage,
descriptor->layout, SingleShaderStage::Compute));
DAWN_TRY(ValidateProgrammableStageDescriptor(
device, &descriptor->computeStage, descriptor->layout, SingleShaderStage::Compute));
return {};
}

View File

@ -20,8 +20,8 @@
namespace dawn_native {
MaybeError ValidatePipelineStageDescriptor(const DeviceBase* device,
const PipelineStageDescriptor* descriptor,
MaybeError ValidateProgrammableStageDescriptor(const DeviceBase* device,
const ProgrammableStageDescriptor* descriptor,
const PipelineLayoutBase* layout,
SingleShaderStage stage) {
DAWN_TRY(device->ValidateObject(descriptor->module));

View File

@ -28,8 +28,8 @@
namespace dawn_native {
MaybeError ValidatePipelineStageDescriptor(const DeviceBase* device,
const PipelineStageDescriptor* descriptor,
MaybeError ValidateProgrammableStageDescriptor(const DeviceBase* device,
const ProgrammableStageDescriptor* descriptor,
const PipelineLayoutBase* layout,
SingleShaderStage stage);

View File

@ -289,10 +289,10 @@ namespace dawn_native {
}
DAWN_TRY(ValidatePrimitiveTopology(descriptor->primitiveTopology));
DAWN_TRY(ValidatePipelineStageDescriptor(device, &descriptor->vertexStage,
descriptor->layout, SingleShaderStage::Vertex));
DAWN_TRY(ValidatePipelineStageDescriptor(device, descriptor->fragmentStage,
descriptor->layout, SingleShaderStage::Fragment));
DAWN_TRY(ValidateProgrammableStageDescriptor(
device, &descriptor->vertexStage, descriptor->layout, SingleShaderStage::Vertex));
DAWN_TRY(ValidateProgrammableStageDescriptor(
device, descriptor->fragmentStage, descriptor->layout, SingleShaderStage::Fragment));
if (descriptor->rasterizationState) {
DAWN_TRY(ValidateRasterizationStateDescriptor(descriptor->rasterizationState));

View File

@ -517,7 +517,7 @@ TEST_P(TextureZeroInitTest, ComputePassSampledTextureClear) {
// Create compute pipeline
dawn::ComputePipelineDescriptor computePipelineDescriptor;
computePipelineDescriptor.layout = utils::MakeBasicPipelineLayout(device, &bindGroupLayout);
dawn::PipelineStageDescriptor computeStage;
dawn::ProgrammableStageDescriptor computeStage;
const char* cs =
R"(#version 450
layout(binding = 0) uniform texture2D sampleTex;

View File

@ -166,7 +166,7 @@ TEST_F(WireArgumentTests, CStringArgument) {
pipelineDescriptor.vertexStage.module = vsModule;
pipelineDescriptor.vertexStage.entryPoint = "main";
DawnPipelineStageDescriptor fragmentStage;
DawnProgrammableStageDescriptor fragmentStage;
fragmentStage.nextInChain = nullptr;
fragmentStage.module = vsModule;
fragmentStage.entryPoint = "main";

View File

@ -141,7 +141,7 @@ TEST_F(WireOptionalTests, OptionalStructPointer) {
pipelineDescriptor.vertexStage.module = vsModule;
pipelineDescriptor.vertexStage.entryPoint = "main";
DawnPipelineStageDescriptor fragmentStage;
DawnProgrammableStageDescriptor fragmentStage;
fragmentStage.nextInChain = nullptr;
fragmentStage.module = vsModule;
fragmentStage.entryPoint = "main";

View File

@ -40,7 +40,7 @@ namespace utils {
ComboRenderPipelineDescriptor(ComboRenderPipelineDescriptor&&) = delete;
ComboRenderPipelineDescriptor& operator=(ComboRenderPipelineDescriptor&&) = delete;
dawn::PipelineStageDescriptor cFragmentStage;
dawn::ProgrammableStageDescriptor cFragmentStage;
ComboVertexInputDescriptor cVertexInput;
dawn::RasterizationStateDescriptor cRasterizationState;