@@ -32,31 +32,38 @@ class RenderTarget {
32
32
StoreAction store_action;
33
33
};
34
34
35
- static constexpr AttachmentConfig kDefaultAttachmentConfig = {
35
+ static constexpr AttachmentConfig kDefaultColorAttachmentConfig = {
36
36
.storage_mode = StorageMode::kDevicePrivate ,
37
37
.load_action = LoadAction::kClear ,
38
38
.store_action = StoreAction::kStore };
39
39
40
- static constexpr AttachmentConfigMSAA kDefaultAttachmentConfigMSAA = {
40
+ static constexpr AttachmentConfigMSAA kDefaultColorAttachmentConfigMSAA = {
41
41
.storage_mode = StorageMode::kDeviceTransient ,
42
42
.resolve_storage_mode = StorageMode::kDevicePrivate ,
43
43
.load_action = LoadAction::kClear ,
44
44
.store_action = StoreAction::kMultisampleResolve };
45
45
46
+ static constexpr AttachmentConfig kDefaultStencilAttachmentConfig = {
47
+ .storage_mode = StorageMode::kDeviceTransient ,
48
+ .load_action = LoadAction::kClear ,
49
+ .store_action = StoreAction::kDontCare };
50
+
46
51
static RenderTarget CreateOffscreen (
47
52
const Context& context,
48
53
ISize size,
49
54
const std::string& label = " Offscreen" ,
50
- AttachmentConfig color_attachment_config = kDefaultAttachmentConfig ,
51
- std::optional<AttachmentConfig> stencil_attachment_config = std::nullopt);
55
+ AttachmentConfig color_attachment_config = kDefaultColorAttachmentConfig ,
56
+ std::optional<AttachmentConfig> stencil_attachment_config =
57
+ kDefaultStencilAttachmentConfig );
52
58
53
59
static RenderTarget CreateOffscreenMSAA (
54
60
const Context& context,
55
61
ISize size,
56
62
const std::string& label = " Offscreen MSAA" ,
57
63
AttachmentConfigMSAA color_attachment_config =
58
- kDefaultAttachmentConfigMSAA ,
59
- std::optional<AttachmentConfig> stencil_attachment_config = std::nullopt);
64
+ kDefaultColorAttachmentConfigMSAA ,
65
+ std::optional<AttachmentConfig> stencil_attachment_config =
66
+ kDefaultStencilAttachmentConfig );
60
67
61
68
RenderTarget ();
62
69
0 commit comments