This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,10 @@ InlinePassContext::RenderPassResult InlinePassContext::GetRenderPass(
100
100
101
101
RenderPassResult result;
102
102
103
- if (pass_count_ > 0 ) {
103
+ if (pass_count_ > 0 && pass_target_.GetRenderTarget ()
104
+ .GetColorAttachments ()
105
+ .find (0 )
106
+ ->second .resolve_texture ) {
104
107
result.backdrop_texture =
105
108
pass_target_.Flip (*context_->GetResourceAllocator ());
106
109
if (!result.backdrop_texture ) {
@@ -111,8 +114,12 @@ InlinePassContext::RenderPassResult InlinePassContext::GetRenderPass(
111
114
auto color0 =
112
115
pass_target_.GetRenderTarget ().GetColorAttachments ().find (0 )->second ;
113
116
114
- color0.load_action =
115
- pass_count_ > 0 ? LoadAction::kDontCare : LoadAction::kClear ;
117
+ if (pass_count_ > 0 ) {
118
+ color0.load_action =
119
+ color0.resolve_texture ? LoadAction::kDontCare : LoadAction::kLoad ;
120
+ } else {
121
+ color0.load_action = LoadAction::kClear ;
122
+ }
116
123
117
124
color0.store_action = color0.resolve_texture
118
125
? StoreAction::kMultisampleResolve
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class InlinePassContext {
15
15
public:
16
16
struct RenderPassResult {
17
17
std::shared_ptr<RenderPass> pass;
18
+
18
19
std::shared_ptr<Texture> backdrop_texture;
19
20
};
20
21
You can’t perform that action at this time.
0 commit comments