microsoft / OpenCLOn12

The OpenCL-on-D3D12 mapping layer
MIT License
104 stars 13 forks source link

Refactoring to enable performance optimizations #57

Closed jenatali closed 3 months ago

jenatali commented 6 months ago

This PR removes the dependency on the D3D12TranslationLayer external library. Instead, the commits here import the library as-is, and then strip out the unneeded pieces. There are a lot of them...

The primary goal of this PR was b492fe6 ("Use root UAVs for descriptor space 1") to pair with this compiler change: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26803/diffs?commit_id=1677b86b895871e1b4d16fa2f0be443fe863e70d. Additional changes on top of that to enable more caching weren't planned, but do help with repeated runs of the same app.

Overall performance wins are small but probably worthwhile.

jenatali commented 3 months ago

I rebased, rearranged, and dropped the root UAVs change, since that's an unproven design change. The rest of this is relatively mechanical or straightforward. I've verified that this still works correctly against the CLOn12 compiler from Mesa main without the paired root UAV changes. I'll post the root UAV change as a separate PR.