DirectX 12/Mantle/Vulkan and HSA
Asked Answered
T

1

6

With the rise of lower-level graphics APIs such as DirectX 12, Mantle and Vulkan, I'm wondering how these interact (if at all) with a Heterogeneous System Architecture (HSA)?

As I understand it, supporting HSA has required some developer involvement, but I'm curious whether any of the low-level graphics APIs now handle this themselves, or if the burden remains on the developer to fully take advantage it?

HSA is particularly interesting for features like simplified sharing of data between system memory and video memory, particularly when these are both sharing the same physical RAM.

Since this question is likely specific to the current state of affairs I'm fine with that kind of overview (though information about future roadmaps would be nice), and I'll accept an answer that only covers a single graphics API (since I doubt many, if any, people are familiar with all three plus HSA). Also if I've completely misunderstood how it works, then feel free to point that out too; I'm not super familiar with either technology, but would like to know how they currently interact all the same.

Thorne answered 3/11, 2015 at 11:40 Comment(0)
B
7

Looking at the diagrams on the wiki page the low level APIs are closer to what they call a non-HSA system.

enter image description here

Every operation (memory copy, starting a job,...) has to be dispatched explicitly by the application. Though the application can group the sequential operations in a command buffer and dispatch the entire buffer in one go and continue with something else while the commands are being executed asynchronously.

The traditional openGL/DirectX9 on the other hand is closer to a HSA by hiding all the dispatching and copying. However this introduces overhead in verification and trying to predict what the application will do next to minimize latency. Not to mention there is very little option to check if the operations are complete with the api having synchronous roots. This means that if you happen to call a method that needs the result of an operation the (HSA) driver will block until that operation is done.

enter image description here

That the new low-level APIs give more control to the application programmer and stop hiding the nitty-gritty is in fact a major selling point.

Bucksaw answered 3/11, 2015 at 12:18 Comment(2)
Great answer, but how do you think this applies to other features of HSA, like being able to share the same memory between a CPU and iGPU? Are DirectX 12 etc. able to do the same thing without having to copy things like textures that are already loaded in main memory (on the CPU side)?Thorne
@Thorne that depends on how the hardware is laid out, integrated GPUs often don't have dedicated memory so it will use the physical RAM. And that can be accessed as is by the CPU. Though caching means that the accesses need to be synchronized and guarded.Bucksaw

© 2022 - 2024 — McMap. All rights reserved.