File tree Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,10 @@ bool ImGui_ImplImpeller_Init(
9494 auto desc = impeller::PipelineBuilder<impeller::ImguiRasterVertexShader,
9595 impeller::ImguiRasterFragmentShader>::
9696 MakeDefaultPipelineDescriptor (*context);
97- auto stencil = desc->GetFrontStencilAttachmentDescriptor ();
98- if (stencil.has_value ()) {
99- stencil->stencil_compare = impeller::CompareFunction::kAlways ;
100- stencil->depth_stencil_pass = impeller::StencilOperation::kKeep ;
101- desc->SetStencilAttachmentDescriptors (stencil.value ());
102- }
97+ desc->SetStencilPixelFormat (impeller::PixelFormat::kUnknown );
98+ desc->SetStencilAttachmentDescriptors (std::nullopt );
99+ desc->SetDepthPixelFormat (impeller::PixelFormat::kUnknown );
100+ desc->SetDepthStencilAttachmentDescriptor (std::nullopt );
103101
104102 bd->pipeline =
105103 context->GetPipelineLibrary ()->GetPipeline (std::move (desc)).Get ();
Original file line number Diff line number Diff line change @@ -135,19 +135,19 @@ PipelineDescriptor& PipelineDescriptor::SetStencilPixelFormat(
135135}
136136
137137PipelineDescriptor& PipelineDescriptor::SetDepthStencilAttachmentDescriptor (
138- DepthAttachmentDescriptor desc) {
138+ std::optional< DepthAttachmentDescriptor> desc) {
139139 depth_attachment_descriptor_ = desc;
140140 return *this ;
141141}
142142
143143PipelineDescriptor& PipelineDescriptor::SetStencilAttachmentDescriptors (
144- StencilAttachmentDescriptor front_and_back) {
144+ std::optional< StencilAttachmentDescriptor> front_and_back) {
145145 return SetStencilAttachmentDescriptors (front_and_back, front_and_back);
146146}
147147
148148PipelineDescriptor& PipelineDescriptor::SetStencilAttachmentDescriptors (
149- StencilAttachmentDescriptor front,
150- StencilAttachmentDescriptor back) {
149+ std::optional< StencilAttachmentDescriptor> front,
150+ std::optional< StencilAttachmentDescriptor> back) {
151151 front_stencil_attachment_descriptor_ = front;
152152 back_stencil_attachment_descriptor_ = back;
153153 return *this ;
Original file line number Diff line number Diff line change @@ -71,17 +71,17 @@ class PipelineDescriptor final : public Comparable<PipelineDescriptor> {
7171 const ColorAttachmentDescriptor* GetLegacyCompatibleColorAttachment () const ;
7272
7373 PipelineDescriptor& SetDepthStencilAttachmentDescriptor (
74- DepthAttachmentDescriptor desc);
74+ std::optional< DepthAttachmentDescriptor> desc);
7575
7676 std::optional<DepthAttachmentDescriptor> GetDepthStencilAttachmentDescriptor ()
7777 const ;
7878
7979 PipelineDescriptor& SetStencilAttachmentDescriptors (
80- StencilAttachmentDescriptor front_and_back);
80+ std::optional< StencilAttachmentDescriptor> front_and_back);
8181
8282 PipelineDescriptor& SetStencilAttachmentDescriptors (
83- StencilAttachmentDescriptor front,
84- StencilAttachmentDescriptor back);
83+ std::optional< StencilAttachmentDescriptor> front,
84+ std::optional< StencilAttachmentDescriptor> back);
8585
8686 std::optional<StencilAttachmentDescriptor>
8787 GetFrontStencilAttachmentDescriptor () const ;
You can’t perform that action at this time.
0 commit comments