Bewerken

Delen via


D3D12DDI_MEASUREMENTS_ACTION_0062 enumeration (d3d12umddi.h)

Indicates what to do with the result of previous PGO (profile guided optimization) measurements.

Syntax

typedef enum D3D12DDI_MEASUREMENTS_ACTION_0062 {
  D3D12DDI_MEASUREMENTS_ACTION_0062_KEEP_ALL,
  D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS,
  D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS_HIGH_PRIORITY,
  D3D12DDI_MEASUREMENTS_ACTION_0062_DISCARD_PREVIOUS
} ;

Constants

 
D3D12DDI_MEASUREMENTS_ACTION_0062_KEEP_ALL
D3D12DDI_MEASUREMENTS_ACTION_0062_KEEP_ALL does not request any specific change of behavior. Previous results are still valid, and the driver may continue tracking whatever statistics are in the middle of being measured.
D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS
D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS hints that the workload seen so far represents the complete set of what is worth optimizing based on, for instance, that a scene flythrough has finished in a benchmarking tool, or playback of the single frame being analyzed has completed in PIX. The UMD should kick off any desired background processing based on what it has seen so far, as no different work will be incoming in the near future. After the UMD returns from a SetBackgroundProcessingMode call that specifies D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS, all currently queued background tasks will be considered part of the commit. Once that set of tasks finishes executing, the provided hEventToSignalOnCompletion will be signaled.

If the UMD has been gathering statistics about eg. commonly used constant values, and is waiting for some threshold amount of data to be recorded before acting on this information, the commit flag should scale up whatever frequency histograms have been recorded so far to give the same result as if the normal act-now threshold had been reached after a longer period of data collection. This is important to let PIX replay only one single frame capture, but then request a final set of optimized shaders matching that work, without having to waste time repeating a single frame many hundreds of times.

If the D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS or D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS_HIGH_PRIORITY modes are not used, hEventToSignalOnCompletion must be null.
D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS_HIGH_PRIORITY
D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS_HIGH_PRIORITY is a superset of the D3D12DDI_MEASUREMENTS_ACTION_0062_COMMIT_RESULTS mode which modifies the thread scheduling behavior. This mode indicates that getting background compiles done quickly is more important than avoiding glitches, so the D3D runtime will schedule more than one task simultaneously by using multiple threads, and execute these at higher than idle priority. This boost lasts until all tasks generated by the commit have finished executing.

The high priority mode is only valid when developer mode is enabled
D3D12DDI_MEASUREMENTS_ACTION_0062_DISCARD_PREVIOUS
D3D12DDI_MEASUREMENTS_ACTION_0062_DISCARD_PREVIOUS hints to the UMD that the workload has changed in a significant way, so any results of previous measurements are no longer meaningful.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1903
Header d3d12umddi.h