-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Hello there,
Calling GpaGetSupportedSampleTypes
on my GPU (RX 7600 XT) with Vulkan only returns kGpaContextSampleTypeDiscreteCounter
but not kGpaContextSampleTypeStreamingCounter
, so I'm not able to access streaming counters like WaveOccupancyPct
.
Is there anything special to deploy or to tweak in order to access such counters?
Edit: Looking at the code, it is indeed hardcoded to only support discrete:
supported_sample_types_ = kGpaContextSampleTypeDiscreteCounter; |
Seems removed here:
gpu_performance_api/source/public_counter_compiler/CounterCompiler.cs
Lines 1150 to 1161 in a0852bc
if ("dx12" != api.ToLower()) | |
{ | |
// Non-DX12 only supports discrete counters. Enforce this. | |
// Remove SPM-only counters if they happen to exist. | |
publicCounterDerivedList.RemoveAll(x => (x.IsSpmCounter && !x.IsDiscreteCounter)); | |
// Force the counters to not indicate they are SPM counters. This simplifies a lot of logic later. | |
foreach (var counter in publicCounterDerivedList) | |
{ | |
counter.IsSpmCounter = false; | |
} | |
} |
While the VK extensions seem to have a few stuffs related to spm:
gpu_performance_api/source/third_party/AmdVkExt/vk_amd_gpa_interface.h
Lines 137 to 146 in a0852bc
typedef struct VkPhysicalDeviceGpaFeaturesAMD | |
{ | |
VkStructureType sType; | |
const void* pNext; | |
VkBool32 perfCounters; | |
VkBool32 streamingPerfCounters; | |
VkBool32 sqThreadTracing; | |
VkBool32 clockModes; | |
} VkPhysicalDeviceGpaFeaturesAMD; |
gpu_performance_api/source/third_party/AmdVkExt/vk_amd_gpa_interface.h
Lines 190 to 214 in a0852bc
typedef struct VkGpaSampleBeginInfoAMD | |
{ | |
VkStructureType sType; | |
const void* pNext; | |
VkGpaSampleTypeAMD sampleType; | |
VkBool32 sampleInternalOperations; | |
VkBool32 cacheFlushOnCounterCollection; | |
VkBool32 sqShaderMaskEnable; | |
VkGpaSqShaderStageFlagsAMD sqShaderMask; | |
uint32_t perfCounterCount; | |
const VkGpaPerfCounterAMD* pPerfCounters; | |
uint32_t streamingPerfTraceSampleInterval; | |
VkDeviceSize perfCounterDeviceMemoryLimit; | |
VkBool32 sqThreadTraceEnable; | |
VkBool32 sqThreadTraceSuppressInstructionTokens; | |
VkDeviceSize sqThreadTraceDeviceMemoryLimit; | |
VkPipelineStageFlagBits timingPreSample; | |
VkPipelineStageFlagBits timingPostSample; | |
} VkGpaSampleBeginInfoAMD; |
So, what needs to be done to support streaming? Is it possible with the internal codebase by replicating what is done for d3d12 to Vulkan or it requires internal changes to some AMD drivers?