Minor: Account for macro namespacing.
This commit is contained in:
@@ -33,9 +33,8 @@ impeller_component("entity") {
|
||||
"entity_pass_delegate.h",
|
||||
]
|
||||
|
||||
deps = [ ":entity_shaders" ]
|
||||
|
||||
public_deps = [
|
||||
":entity_shaders",
|
||||
"../archivist",
|
||||
"../image",
|
||||
"../renderer",
|
||||
|
||||
@@ -15,7 +15,7 @@ bool Allocator::RequiresExplicitHostSynchronization(StorageMode mode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if OS_IOS
|
||||
#if FML_OS_IOS
|
||||
// StorageMode::kHostVisible is MTLStorageModeShared already.
|
||||
return false;
|
||||
#else // OS_IOS
|
||||
|
||||
@@ -32,7 +32,7 @@ bool AllocatorMTL::IsValid() const {
|
||||
static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
|
||||
switch (type) {
|
||||
case StorageMode::kHostVisible:
|
||||
#if OS_IOS
|
||||
#if FML_OS_IOS
|
||||
return MTLResourceStorageModeShared;
|
||||
#else
|
||||
return MTLResourceStorageModeManaged;
|
||||
@@ -40,7 +40,7 @@ static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
|
||||
case StorageMode::kDevicePrivate:
|
||||
return MTLResourceStorageModePrivate;
|
||||
case StorageMode::kDeviceTransient:
|
||||
#if OS_IOS
|
||||
#if FML_OS_IOS
|
||||
if (@available(iOS 10.0, *)) {
|
||||
return MTLResourceStorageModeMemoryless;
|
||||
} else {
|
||||
@@ -57,7 +57,7 @@ static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
|
||||
static MTLStorageMode ToMTLStorageMode(StorageMode mode) {
|
||||
switch (mode) {
|
||||
case StorageMode::kHostVisible:
|
||||
#if OS_IOS
|
||||
#if FML_OS_IOS
|
||||
return MTLStorageModeShared;
|
||||
#else
|
||||
return MTLStorageModeManaged;
|
||||
@@ -65,7 +65,7 @@ static MTLStorageMode ToMTLStorageMode(StorageMode mode) {
|
||||
case StorageMode::kDevicePrivate:
|
||||
return MTLStorageModePrivate;
|
||||
case StorageMode::kDeviceTransient:
|
||||
#if OS_IOS
|
||||
#if FML_OS_IOS
|
||||
if (@available(iOS 10.0, *)) {
|
||||
return MTLStorageModeMemoryless;
|
||||
} else {
|
||||
|
||||
@@ -275,9 +275,9 @@ constexpr MTLClearColor ToMTLClearColor(const Color& color) {
|
||||
|
||||
constexpr MTLTextureType ToMTLTextureType(TextureType type) {
|
||||
switch (type) {
|
||||
case TextureType::k2D:
|
||||
case TextureType::kTexture2D:
|
||||
return MTLTextureType2D;
|
||||
case TextureType::k2DMultisample:
|
||||
case TextureType::kTexture2DMultisample:
|
||||
return MTLTextureType2DMultisample;
|
||||
}
|
||||
return MTLTextureType2D;
|
||||
|
||||
@@ -37,7 +37,7 @@ std::unique_ptr<Surface> SurfaceMTL::WrapCurrentMetalLayerDrawable(
|
||||
}
|
||||
|
||||
TextureDescriptor color0_tex_desc;
|
||||
color0_tex_desc.type = TextureType::k2DMultisample;
|
||||
color0_tex_desc.type = TextureType::kTexture2DMultisample;
|
||||
color0_tex_desc.sample_count = SampleCount::kCount4;
|
||||
color0_tex_desc.format = color_format;
|
||||
color0_tex_desc.size = {
|
||||
@@ -69,7 +69,7 @@ std::unique_ptr<Surface> SurfaceMTL::WrapCurrentMetalLayerDrawable(
|
||||
color0_resolve_tex_desc, current_drawable.texture);
|
||||
|
||||
TextureDescriptor stencil0_tex;
|
||||
stencil0_tex.type = TextureType::k2DMultisample;
|
||||
stencil0_tex.type = TextureType::kTexture2DMultisample;
|
||||
stencil0_tex.sample_count = SampleCount::kCount4;
|
||||
stencil0_tex.format = PixelFormat::kDefaultStencil;
|
||||
stencil0_tex.size = color0_tex_desc.size;
|
||||
|
||||
@@ -25,7 +25,14 @@ class RenderTarget;
|
||||
/// `RenderPass` describes the configuration of the various
|
||||
/// attachments when the command is submitted.
|
||||
///
|
||||
/// A command buffer is only meant to be used on a single thread.
|
||||
/// A command buffer is only meant to be used on a single thread. If
|
||||
/// a frame workload needs to be encoded from multiple threads,
|
||||
/// setup and record into multiple command buffers. The order of
|
||||
/// submission of commands encoded in multiple command buffers can
|
||||
/// be controlled via either the order in which the command buffers
|
||||
/// were created, or, using the `ReserveSpotInQueue` command which
|
||||
/// allows for encoding commands for submission in an order that is
|
||||
/// different from the encoding order.
|
||||
///
|
||||
class CommandBuffer {
|
||||
public:
|
||||
|
||||
@@ -100,15 +100,15 @@ enum class StoreAction {
|
||||
};
|
||||
|
||||
enum class TextureType {
|
||||
k2D,
|
||||
k2DMultisample,
|
||||
kTexture2D,
|
||||
kTexture2DMultisample,
|
||||
};
|
||||
|
||||
constexpr bool IsMultisampleCapable(TextureType type) {
|
||||
switch (type) {
|
||||
case TextureType::k2D:
|
||||
case TextureType::kTexture2D:
|
||||
return false;
|
||||
case TextureType::k2DMultisample:
|
||||
case TextureType::kTexture2DMultisample:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
namespace impeller {
|
||||
|
||||
constexpr size_t DefaultUniformAlignment() {
|
||||
#if OS_IOS
|
||||
#if FML_OS_IOS
|
||||
return 16u;
|
||||
#elif OS_MACOSX
|
||||
#elif FML_OS_MACOSX
|
||||
return 256u;
|
||||
#else
|
||||
#error "Unsupported platform".
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
namespace impeller {
|
||||
|
||||
struct TextureDescriptor {
|
||||
TextureType type = TextureType::k2D;
|
||||
TextureType type = TextureType::kTexture2D;
|
||||
PixelFormat format = PixelFormat::kUnknown;
|
||||
ISize size;
|
||||
size_t mip_count = 1u; // Size::MipCount is usually appropriate.
|
||||
|
||||
Reference in New Issue
Block a user