File tree 9 files changed +25
-19
lines changed
9 files changed +25
-19
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,8 @@ impeller_component("entity") {
33
33
" entity_pass_delegate.h" ,
34
34
]
35
35
36
- deps = [ " :entity_shaders" ]
37
-
38
36
public_deps = [
37
+ " :entity_shaders" ,
39
38
" ../archivist" ,
40
39
" ../image" ,
41
40
" ../renderer" ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ bool Allocator::RequiresExplicitHostSynchronization(StorageMode mode) {
15
15
return false ;
16
16
}
17
17
18
- #if OS_IOS
18
+ #if FML_OS_IOS
19
19
// StorageMode::kHostVisible is MTLStorageModeShared already.
20
20
return false ;
21
21
#else // OS_IOS
Original file line number Diff line number Diff line change 32
32
static MTLResourceOptions ToMTLResourceOptions (StorageMode type) {
33
33
switch (type) {
34
34
case StorageMode::kHostVisible :
35
- #if OS_IOS
35
+ #if FML_OS_IOS
36
36
return MTLResourceStorageModeShared ;
37
37
#else
38
38
return MTLResourceStorageModeManaged ;
39
39
#endif
40
40
case StorageMode::kDevicePrivate :
41
41
return MTLResourceStorageModePrivate ;
42
42
case StorageMode::kDeviceTransient :
43
- #if OS_IOS
43
+ #if FML_OS_IOS
44
44
if (@available (iOS 10.0 , *)) {
45
45
return MTLResourceStorageModeMemoryless;
46
46
} else {
@@ -57,15 +57,15 @@ static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
57
57
static MTLStorageMode ToMTLStorageMode (StorageMode mode) {
58
58
switch (mode) {
59
59
case StorageMode::kHostVisible :
60
- #if OS_IOS
60
+ #if FML_OS_IOS
61
61
return MTLStorageModeShared ;
62
62
#else
63
63
return MTLStorageModeManaged ;
64
64
#endif
65
65
case StorageMode::kDevicePrivate :
66
66
return MTLStorageModePrivate ;
67
67
case StorageMode::kDeviceTransient :
68
- #if OS_IOS
68
+ #if FML_OS_IOS
69
69
if (@available (iOS 10.0 , *)) {
70
70
return MTLStorageModeMemoryless;
71
71
} else {
Original file line number Diff line number Diff line change @@ -275,9 +275,9 @@ constexpr MTLClearColor ToMTLClearColor(const Color& color) {
275
275
276
276
constexpr MTLTextureType ToMTLTextureType (TextureType type) {
277
277
switch (type) {
278
- case TextureType::k2D :
278
+ case TextureType::kTexture2D :
279
279
return MTLTextureType2D;
280
- case TextureType::k2DMultisample :
280
+ case TextureType::kTexture2DMultisample :
281
281
return MTLTextureType2DMultisample;
282
282
}
283
283
return MTLTextureType2D;
Original file line number Diff line number Diff line change 37
37
}
38
38
39
39
TextureDescriptor color0_tex_desc;
40
- color0_tex_desc.type = TextureType::k2DMultisample ;
40
+ color0_tex_desc.type = TextureType::kTexture2DMultisample ;
41
41
color0_tex_desc.sample_count = SampleCount::kCount4 ;
42
42
color0_tex_desc.format = color_format;
43
43
color0_tex_desc.size = {
69
69
color0_resolve_tex_desc, current_drawable.texture );
70
70
71
71
TextureDescriptor stencil0_tex;
72
- stencil0_tex.type = TextureType::k2DMultisample ;
72
+ stencil0_tex.type = TextureType::kTexture2DMultisample ;
73
73
stencil0_tex.sample_count = SampleCount::kCount4 ;
74
74
stencil0_tex.format = PixelFormat::kDefaultStencil ;
75
75
stencil0_tex.size = color0_tex_desc.size ;
Original file line number Diff line number Diff line change @@ -25,7 +25,14 @@ class RenderTarget;
25
25
// / `RenderPass` describes the configuration of the various
26
26
// / attachments when the command is submitted.
27
27
// /
28
- // / A command buffer is only meant to be used on a single thread.
28
+ // / A command buffer is only meant to be used on a single thread. If
29
+ // / a frame workload needs to be encoded from multiple threads,
30
+ // / setup and record into multiple command buffers. The order of
31
+ // / submission of commands encoded in multiple command buffers can
32
+ // / be controlled via either the order in which the command buffers
33
+ // / were created, or, using the `ReserveSpotInQueue` command which
34
+ // / allows for encoding commands for submission in an order that is
35
+ // / different from the encoding order.
29
36
// /
30
37
class CommandBuffer {
31
38
public:
Original file line number Diff line number Diff line change @@ -100,15 +100,15 @@ enum class StoreAction {
100
100
};
101
101
102
102
enum class TextureType {
103
- k2D ,
104
- k2DMultisample ,
103
+ kTexture2D ,
104
+ kTexture2DMultisample ,
105
105
};
106
106
107
107
constexpr bool IsMultisampleCapable (TextureType type) {
108
108
switch (type) {
109
- case TextureType::k2D :
109
+ case TextureType::kTexture2D :
110
110
return false ;
111
- case TextureType::k2DMultisample :
111
+ case TextureType::kTexture2DMultisample :
112
112
return true ;
113
113
}
114
114
return false ;
Original file line number Diff line number Diff line change 12
12
namespace impeller {
13
13
14
14
constexpr size_t DefaultUniformAlignment () {
15
- #if OS_IOS
15
+ #if FML_OS_IOS
16
16
return 16u ;
17
- #elif OS_MACOSX
17
+ #elif FML_OS_MACOSX
18
18
return 256u ;
19
19
#else
20
20
#error "Unsupported platform".
Original file line number Diff line number Diff line change 13
13
namespace impeller {
14
14
15
15
struct TextureDescriptor {
16
- TextureType type = TextureType::k2D ;
16
+ TextureType type = TextureType::kTexture2D ;
17
17
PixelFormat format = PixelFormat::kUnknown ;
18
18
ISize size;
19
19
size_t mip_count = 1u ; // Size::MipCount is usually appropriate.
You can’t perform that action at this time.
0 commit comments