Replace DepthStencilState builder via DepthStencilState descriptor.

This change also removes DepthStencilState object.

Bug=dawn:31

Change-Id: I7bb54ef4da527184bb2726c77d93d411d44c3956
Reviewed-on: https://dawn-review.googlesource.com/c/3541
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
Yunchao He
2019-01-04 04:28:37 +00:00
committed by Commit Bot service account
parent 0b364067d0
commit ea56333c1e
47 changed files with 678 additions and 1235 deletions

View File

@@ -282,11 +282,6 @@ namespace {
dawn::BindingType::SampledTexture},
});
auto depthStencilState = device.CreateDepthStencilStateBuilder()
.SetDepthCompareFunction(dawn::CompareFunction::Less)
.SetDepthWriteEnabled(true)
.GetResult();
auto pipelineLayout = utils::MakeBasicPipelineLayout(device, &bindGroupLayout);
utils::ComboRenderPipelineDescriptor descriptor(device);
@@ -299,7 +294,8 @@ namespace {
descriptor.cDepthStencilAttachment.format = dawn::TextureFormat::D32FloatS8Uint;
descriptor.cColorAttachments[0].format =
GetPreferredSwapChainTextureFormat();
descriptor.depthStencilState = depthStencilState;
descriptor.cDepthStencilState.depthWriteEnabled = true;
descriptor.cDepthStencilState.depthCompare = dawn::CompareFunction::Less;
dawn::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);