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:
parent
90a5595bbe
commit
0b82671047
|
@ -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},
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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 {};
|
||||
}
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
|
||||
namespace dawn_native {
|
||||
|
||||
MaybeError ValidatePipelineStageDescriptor(const DeviceBase* device,
|
||||
const PipelineStageDescriptor* descriptor,
|
||||
const PipelineLayoutBase* layout,
|
||||
SingleShaderStage stage) {
|
||||
MaybeError ValidateProgrammableStageDescriptor(const DeviceBase* device,
|
||||
const ProgrammableStageDescriptor* descriptor,
|
||||
const PipelineLayoutBase* layout,
|
||||
SingleShaderStage stage) {
|
||||
DAWN_TRY(device->ValidateObject(descriptor->module));
|
||||
|
||||
if (descriptor->entryPoint != std::string("main")) {
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
|
||||
namespace dawn_native {
|
||||
|
||||
MaybeError ValidatePipelineStageDescriptor(const DeviceBase* device,
|
||||
const PipelineStageDescriptor* descriptor,
|
||||
const PipelineLayoutBase* layout,
|
||||
SingleShaderStage stage);
|
||||
MaybeError ValidateProgrammableStageDescriptor(const DeviceBase* device,
|
||||
const ProgrammableStageDescriptor* descriptor,
|
||||
const PipelineLayoutBase* layout,
|
||||
SingleShaderStage stage);
|
||||
|
||||
class PipelineBase : public ObjectBase {
|
||||
public:
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace utils {
|
|||
ComboRenderPipelineDescriptor(ComboRenderPipelineDescriptor&&) = delete;
|
||||
ComboRenderPipelineDescriptor& operator=(ComboRenderPipelineDescriptor&&) = delete;
|
||||
|
||||
dawn::PipelineStageDescriptor cFragmentStage;
|
||||
dawn::ProgrammableStageDescriptor cFragmentStage;
|
||||
|
||||
ComboVertexInputDescriptor cVertexInput;
|
||||
dawn::RasterizationStateDescriptor cRasterizationState;
|
||||
|
|
Loading…
Reference in New Issue