Evaluating Direct3D 12 GPU Resource Synchronization on Performance and Cache Operations

University essay from Blekinge Tekniska Högskola/Fakulteten för datavetenskaper

Abstract: Background. Lower-level graphics programming interfaces such as Direct3D 12 re-quire synchronization and data hazards between dependent workloads to be resolvedmanually. A barrier is a primitive used to resolve synchronization and data hazardsin a manner to achieve correct behavior by allowing developers to define waits be-tween workloads. However, due to its coarse-grained interface, workloads may beredundantly blocked, and data hazards resolved conservatively leading to excessiveGPU cache flushes even with correct usage. Objectives. To evaluate if the novel and more fine-grained enhanced barriers APIin Direct3D 12 can provide any improvements over Direct3D 12 resource (legacy)barriers in AMD FidelityFX applications using Direct3D 12. Methods. An experiment as a research method was carried out to investigate theeffects of enhanced barriers in existing Direct3D 12 applications. Frame time and thenumber of GPU cache flushes and invalidations occurring per frame were the primarymetrics measured. This was carried out by replacing legacy barriers with enhancedbarriers in three of AMD’s open-source, state-of-the-art image quality toolkits; Fideli-tyFX Super Resolution (FSR), FidelityFX Super Resolution 2 (FSR2), and Stochas-tic Screen Space Reflections (SSSR). Results. The use of enhanced barriers in FSR, FSR2, and SSSR showed that nosignificant differences were found in terms of frame time and the number of cacheflushes and invalidations occurring within a frame when compared to using resourcebarriers. Configurations of enhanced barriers that may reduce pipeline stall times re-main theoretical and could not be verified due to minuscule differences. These includecompute-only workload synchronization and non-blocking barrier layout transitions. Conclusions. Replacing legacy barriers with enhanced barriers in FSR, FSR2, andSSSR proved to be feasible, but lacks performance benefits for it to be desirable.However, the use of barriers can vary depending on the application, therefore, differ-ent results can arise given other synchronization scenarios. For existing Direct3D 12applications using resource barriers, it may be advisable to not upgrade to enhancedbarriers.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)