mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Impeller] Set resourceOptions/storageMode on MTLTextures created from MTLBuffers. (flutter/engine#37073)
This commit is contained in:
parent
b767b7b9a9
commit
248aca72c6
@ -40,6 +40,10 @@ std::shared_ptr<Texture> DeviceBufferMTL::AsTexture(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (@available(iOS 13.0, macos 10.15, *)) {
|
||||
mtl_texture_desc.resourceOptions = buffer_.resourceOptions;
|
||||
}
|
||||
|
||||
auto texture = [buffer_ newTextureWithDescriptor:mtl_texture_desc
|
||||
offset:0
|
||||
bytesPerRow:row_bytes];
|
||||
|
||||
@ -427,7 +427,18 @@ def RunCCTests(build_dir, filter, coverage, capture_core_dump):
|
||||
'impeller_unittests',
|
||||
filter,
|
||||
shuffle_flags,
|
||||
coverage=coverage
|
||||
coverage=coverage,
|
||||
extra_env={
|
||||
# See https://developer.apple.com/documentation/metal/diagnosing_metal_programming_issues_early?language=objc
|
||||
'MTL_SHADER_VALIDATION':
|
||||
'1', # Enables all shader validation tests.
|
||||
'MTL_SHADER_VALIDATION_GLOBAL_MEMORY':
|
||||
'1', # Validates accesses to device and constant memory.
|
||||
'MTL_SHADER_VALIDATION_THREADGROUP_MEMORY':
|
||||
'1', # Validates accesses to threadgroup memory.
|
||||
'MTL_SHADER_VALIDATION_TEXTURE_USAGE':
|
||||
'1', # Validates that texture references are not nil.
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user