Src/GPUPerfAPIUnitTests/CounterSchedulerTests.cpp
/// Test the D3D11 QUERY counters (software counters) across different generations
Test the D3D11 QUERY counters (software counters) across different generations
Test the D3D11 QUERY counters ( software counters ) across different generations
TEST(CounterDLLTests, DX11D3DCounters)
{
    unsigned int dummyGpuTimeHWIndex  = 0;  
    unsigned int D3DCounterIndex      = 0;  
    unsigned int publicCounterCount   = 0;  
    unsigned int hardwareCounterCount = 0;  
    D3DCounterIndex      = 1;
    publicCounterCount  = DX11GFX6_PUBLIC_COUNTER_COUNT;
    hardwareCounterCount = GetNumberOfDX11HardwareCountersAndGPUTimeIndex(GPA_HW_GENERATION_GFX6, dummyGpuTimeHWIndex);
    TestD3D11QueryCounter(gDevIdSI, D3DCounterIndex, publicCounterCount, hardwareCounterCount);
    D3DCounterIndex      = 1;
    publicCounterCount  = DX11GFX7_PUBLIC_COUNTER_COUNT;
    hardwareCounterCount = GetNumberOfDX11HardwareCountersAndGPUTimeIndex(GPA_HW_GENERATION_GFX7, dummyGpuTimeHWIndex);
    TestD3D11QueryCounter(gDevIdCI, D3DCounterIndex, publicCounterCount, hardwareCounterCount);
    D3DCounterIndex      = 1;
    publicCounterCount  = DX11GFX8_PUBLIC_COUNTER_COUNT;
    hardwareCounterCount = GetNumberOfDX11HardwareCountersAndGPUTimeIndex(GPA_HW_GENERATION_GFX8, dummyGpuTimeHWIndex);
    TestD3D11QueryCounter(gDevIdVI, D3DCounterIndex, publicCounterCount, hardwareCounterCount);
}
TEST ( CounterDLLTests , DX11D3DCounters ) { unsigned int dummyGpuTimeHWIndex = 0 ; unsigned int D3DCounterIndex = 0 ; unsigned int publicCounterCount = 0 ; unsigned int hardwareCounterCount = 0 ; D3DCounterIndex = 1 ; publicCounterCount = DX11GFX6_PUBLIC_COUNTER_COUNT ; hardwareCounterCount = GetNumberOfDX11HardwareCountersAndGPUTimeIndex ( GPA_HW_GENERATION_GFX6 , dummyGpuTimeHWIndex ) ; TestD3D11QueryCounter ( gDevIdSI , D3DCounterIndex , publicCounterCount , hardwareCounterCount ) ; D3DCounterIndex = 1 ; publicCounterCount = DX11GFX7_PUBLIC_COUNTER_COUNT ; hardwareCounterCount = GetNumberOfDX11HardwareCountersAndGPUTimeIndex ( GPA_HW_GENERATION_GFX7 , dummyGpuTimeHWIndex ) ; TestD3D11QueryCounter ( gDevIdCI , D3DCounterIndex , publicCounterCount , hardwareCounterCount ) ; D3DCounterIndex = 1 ; publicCounterCount = DX11GFX8_PUBLIC_COUNTER_COUNT ; hardwareCounterCount = GetNumberOfDX11HardwareCountersAndGPUTimeIndex ( GPA_HW_GENERATION_GFX8 , dummyGpuTimeHWIndex ) ; TestD3D11QueryCounter ( gDevIdVI , D3DCounterIndex , publicCounterCount , hardwareCounterCount ) ; }
Test the D3D11 QUERY counters (software counters) across different generations
Test the D3D11 QUERY counters ( software counters ) across different generations
// this is the index of the GPUTime hw counter (i.e. GPUTime_Bottom_To_Bottom) // this is the index into the software counters of "OCCLUSION" - see GPASwCounterManager.h // this is the number of public counters exposed // this is the number of hardware counters exposed, which is used to offset the sw counter index // Gfx6 // Gfx7 // Gfx8