Fix WSI present on MacOS
As documented at https://developer.apple.com/documentation/quartzcore/cametallayer/1478168-framebufferonly:
"If the value is true (the default), the CAMetalLayer class allocates
its MTLTexture objects in ways that are optimized for display purposes.
However, you may not sample, read from, or write to those textures. To
support sampling and pixel read/write operations on the layer’s textures
(at a cost to performance), set this value to false."
Since we call replaceRegion in MacOSSurfaceMVK::present() to write pixels
from system memory, we need to set this flag to false explicitly.
Bug: b/137673628
Change-Id: I83e28a2940261d9eedf30d7c96427c23d85ac639
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/36608Tested-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Showing
Please
register
or
sign in
to comment