Durante la GDC 2016, conferencia de desarrolladores de juegos, los lideres de programacion de Hitman hablaron sobre las diferencias de usar D3D12 y D3D11, explicando los pros y contras de usar uno u otro. Dentro de eto mencionan que es preferible realizar el motor para usar D3D12 directamente y no una adaptacion de un motor D3D11 y adaptarlo a D3D12. Hablan de que para algunas tareas es mejor el trabajo que hace el hardware de AMD, siendo el computo asincrono lo mas destacable.
El parche que sacaron era mas para optimizar y sacar algo mas de rendimiento al CPU+GPU, sin ser una adaptacion completa a D3D12, y tanmbien hacen incapie en lo dificil que fue relizar este parche, ya que si buscaban 'optimizar' demasiado perdian rendimiento, por lo que aun falta mucho aprender del uso de D3D12.
http://www.dualshockers.com/2016/03/15/ ... showcased/Giuseppe Nelva, dualshockers.com escribió:
Hitman Developers Compare DirectX 12 Against DirectX 11; Advanced Visual Effects Showcased
IO Interactive hosted a panel at GDC in San Francisco, that DualShockers attended: During the presentation Lead Render Programmer Jonas Meyer explained the pros and cons of using DirectX 12 in the studio’s latest game Hitman, comparing the performance of Microsoft’s new API with DirectX 11.
Meyer also showcased the advanced visual effects applied to each frame in the game, and you can see them in the gallery at the bottom of the post, alongside the full slide presentation. Below you can also read some of the most interesting points he made.
Hitman‘s dynamic time of day actually freezes when a level start because the game is so heavily scripted that it wouldn’t make sense to have variable light during the same mission.
Probes are used for reflections and ambient light, and are also generated at the start of a level.
In the frame showcased below there are 3,500 draw calls (commands to draw an asset or effect) and 8,000 instances. You can also see all the advanced effects added to the frame one by one.
The primary focus of using DirectX 12 was to improve the performance of both the CPU and GPU.
The developers still wanted to support DirectX 12, since it still has a huge userbase that is still on Windows 7.
DirectX 12 requires a lot of temporary resources, requiring a fast multithreaded allocator. The developer used one very similar to the one presented at Last Year’s GDC by Naughty Dog’s Christian Gyrling.
The interface of the game is still based on DirectX 11. Programmers still prefer it, as it’s significantly easier to implement.
Asynchronous compute on the GPU was used for screen space anti aliasing, screen space ambient occlusion and the calculations for the light tiles.
Asynchronous compute granted a gain of 5-10% in performance on AMD cards, and unfortunately no gain on Nvidia cards, but the studio is working with the manufacturer to fix that. They’ll keep on trying.
The downside of using asynchronous compute is that it’s “super-hard to tune,” and putting too much workload on it can cause a loss in performance.
The developers were surprised by how much they needed to be careful about the memory budget on DirectX 12
Priorities can’t be set for resources in DirectX 12 (meaning that developers can’t decide what should always remain in GPU memory and never be pushed to system memory if there’s more data than what the GPU memory can hold) besides what is determined by the driver. That is normally enough, but not always. Hopefully that will change in the future.
The official guide lines Microsoft provided the developers with instructed to use the MakeResident and Evict commands to ensure that the assets always remained within the memory budget.
The Evict command makes a resource unusable, but the memory budget is updated instantly, and that’s a pro. MakeResident makes an evicted resource usable, and the time it uses to execute is proportional to the size of the resource.
The problem with this is that it’s complicated, hard to get right and easy to get wrong making the game run worse. The developers spent a really long time to get it right. Unfortunately it also uses a lot of memory (about 1 gigabyte).
In the gallery you can see performance comparisons between DirectX 11 and DirectX 12 on two different GPUs (unfortunately the models weren’t mentioned). The bars represent the frame time (milliseconds required to render each frame), with a nearly 20% gain at 720p where the game is mostly CPU-bound, but there’s actually a small loss in 4k, where the game is almost completely reliant on the GPU. The second GPU examined offers a 30% gain at 720p, and more than a 10% gain in 4K.
Meyer actually mentioned that he did not know precisely the reason why the first video card is slower in DirectX 12 at 4K resolution, but he clarified that there was a time in which it was much slower, and getting up to par with DirectX 11 required a lot of work. For a few months during development DirectX 12 was 10-20% slower in those conditions.
.