mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
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:
committed by
Commit Bot service account
parent
0b364067d0
commit
ea56333c1e
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user