Skip to content

Placed buffer on WoW64 is extremely slow on Tahoe #161

Description

@3Shain

Two 32-bit unity games Aokana Extra2 and Mahjong Soul suffer from this issue: being slideshows despite high fps is reported on Metal HUD.

There are 2 orthogonal issues:

  1. Metal expects all placed buffer allocation to be within one virtual memory region, which apparently isn't fulfilled by our current naive aligned_malloc implementation. This causes application to crash on frame capturing.
  2. DEP is not enabled for 32-bit processes by default, so Wine may force VPROT_EXEC on memory pages, and Metal on Tahoe doesn't like that at all, making the game almost freezed. And sometimes Insufficient Memory error is reported by command buffer . Adding NX_COMPAT flag in PE header is a hacky workaround. The correct solution is to enforce placed buffer memory allocated by DXMT non-executable (in the unix world) without changing DEP policy (because it has a permanent process-scope effect). It's still unclear how do-able it is if we allocate the memory through Wine (it's preferred because 32-bit addresses are mostly managed by Wine).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions