#pragma once #define _USE_MATH_DEFINES #include #include #include #include #include #include // SSE 2 #include // SSE 4.1 #define WIN32_LEAN_AND_MEAN #define NOMINMAX // Setup Windows SDK to only enable features available since Windows 8.0 #include #define _WIN32_WINNT _WIN32_WINNT_WIN8 #define NTDDI_VERSION NTDDI_WIN8 #include #include #define _XM_SSE4_INTRINSICS_ #include #include #include #include "Utils/Logger.h" #include "Utils/miscUtils.h" // Build both legacy and DirectCompute implementations #define BUILD_BOTH_VERSIONS 0 // Build hybrid model which uses DirectCompute only for the encode step of the algorithm, and decodes on CPU, using AVX SIMD and the Windows' built-in thread pool. // Disabled because on all computers I have in this house that hybrid model performed worse than D3D11 GPGPU model #define BUILD_HYBRID_VERSION 0 // Enable debug traces. Should be disabled in production, the feature comes with a huge performance overhead. // When enabled, while computing things it streams gigabytes of data into that binary file. // See Tools / compareTraces project for a command-line app to compare these traces. #define SAVE_DEBUG_TRACE 0 // In addition to collecting total GPU times per compute shader, also collect and print performance data about individual invocations of some of the most expensive shaders // The feature is relatively cheap in terms of performance overhead, but pretty much useless in production, and clutters debug console with all these numbers #define PROFILER_COLLECT_TAGS 0