Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
S
swiftshader
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • swiftshader
  • Repository

Switch branch/tag
  • swiftshader
  • BUILD.gn
Find file
BlameHistoryPermalink
  • Nicolas Capens's avatar
    Target macOS 10.14 on ARM64 to enable C++17 · 3fe96b78
    Nicolas Capens authored Jan 22, 2021
    The first devices with M1 'Apple Silicon' AArch64 processors were
    launched with macOS 11.0, so it's safe to increase the target OS beyond
    the 10.11 support level needed by Chrome.
    
    This helps enable C++17 by addressing the lack of aligned heap
    allocation support in previous macOS versions:
    
    third_party/marl/include/marl/pool.h:236:27: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
    src/Vulkan/VkPipeline.hpp:83:10: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
    
    C++17 invokes aligned new/delete because of our use of alignas(16) for
    types like sw::float4, which is used for member fields in
    sw::DrawCall::BatchData and vk::GraphicsState. While this could be
    addressed by using custom new/delete operators for these classes (and
    classes which in turn use them as members), misalignment is just a minor
    performance issue, so we can leave things as-is and work around it with
    a build flag (note 16-byte alignment is needed for some vectors accessed
    in Reactor code, but that's handled for those individual cases).
    
    Bug: b/174843857
    Change-Id: Iaa40a3ac6aa7d12c088bf93a55803d8146bd289c
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52068Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
    Commit-Queue: Nicolas Capens <nicolascapens@google.com>
    Kokoro-Result: kokoro <noreply+kokoro@google.com>
    3fe96b78
BUILD.gn 5.86 KB
EditWeb IDE
×

Replace BUILD.gn

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.