VkGpaSampleBeginInfoAMD
The VkGpaSampleBeginInfoAMD structure is defined as:
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;
VkPipelineStageFlags timingPreSample;
VkPipelineStageFlags timingPostSample;
} VkGpaSampleBeginInfoAMD;
pub struct GpaSampleBeginInfoAMD {
s_type: vk::StructureType,
p_next: *const c_void,
sample_type: vk::GpaSampleTypeAMD,
sample_internal_operations: vk::Bool32,
cache_flush_on_counter_collection: vk::Bool32,
sq_shader_mask_enable: vk::Bool32,
sq_shader_mask: vk::GpaSqShaderStageFlagsAMD,
perf_counter_count: u32,
p_perf_counters: *const vk::GpaPerfCounterAMD,
streaming_perf_trace_sample_interval: u32,
perf_counter_device_memory_limit: vk::DeviceSize,
sq_thread_trace_enable: vk::Bool32,
sq_thread_trace_suppress_instruction_tokens: vk::Bool32,
sq_thread_trace_device_memory_limit: vk::DeviceSize,
timing_pre_sample: vk::PipelineStageFlags,
timing_post_sample: vk::PipelineStageFlags,
}
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.sampleTypeis a VkGpaSampleTypeAMD value specifying the type of sample.sampleInternalOperationsis a boolean indicating whether internal driver operations are included in the results.cacheFlushOnCounterCollectionis a boolean indicating whether the driver should insert cache flush and invalidate events before and after every sample.sqShaderMaskEnableis a boolean indicating whethersqShaderMaskspecifies the shader stages to sample. IfVK_FALSE, all shader stages are sampled.sqShaderMaskis a bitmask of VkGpaSqShaderStageFlagBitsAMD values specifying which shader stages to sample. Shader stage bits that are not relevant to the specific device are ignored.perfCounterCountis the number of counters in thepPerfCountersarraypPerfCountersis a pointer to an array of VkGpaPerfCounterAMD structures specifying the counters to be sampled. IfsampleTypeisVK_GPA_SAMPLE_TYPE_CUMULATIVE_AMDpPerfCountersspecifies the counters that are sampled at the beginning and at end of the sample period. IfsampleTypeisVK_GPA_SAMPLE_TYPE_TRACE_AMDthen the SPM data will be added to the samples RGP data blob.streamingPerfTraceSampleIntervalis a value specifying the period for SPM samples in cycles, and is ignored ifsampleTypeis notVK_GPA_SAMPLE_TYPE_TRACE_AMD.perfCounterDeviceMemoryLimitis a value specifying the maximum amount of GPU memory that this sample can allocate for SPM data. IfsampleTypeis notVK_GPA_SAMPLE_TYPE_TRACE_AMDthis value is ignored.sqThreadTraceEnableis a boolean specifying whether SQTT data should be included. IfsampleTypeis notVK_GPA_SAMPLE_TYPE_TRACE_AMDthis value is ignored.sqThreadTraceSuppressInstructionTokensis a boolean specifying whether instruction-level SQTT tokens should be captured. IfVK_FALSE, the amount of sample data is significantly reduced. IfsampleTypeis notVK_GPA_SAMPLE_TYPE_TRACE_AMDthis value is ignored.sqThreadTraceDeviceMemoryLimitis a value specifying the maximum amount of GPU memory in bytes that this sample can allocate for the SQTT buffer. If0, the maximum size to prevent dropping tokens towards the end of the sample is allocated. IfsampleTypeis notVK_GPA_SAMPLE_TYPE_TRACE_AMDthis value is ignored.timingPreSampleis a VkPipelineStageFlags2 mask of pipeline stages specifying where the begin timestamp should take place. IfsampleTypeis notVK_GPA_SAMPLE_TYPE_TIMING_AMDthis value is ignored.timingPostSampleis a VkPipelineStageFlags2 mask of pipeline stages specifying where the end timestamp should take place. IfsampleTypeis notVK_GPA_SAMPLE_TYPE_TIMING_AMDthis value is ignored.
Valid Usage
VUID-VkGpaSampleBeginInfoAMD-sampleType-12412
If sampleType is VK_GPA_SAMPLE_TYPE_CUMULATIVE_AMD, the
VkPhysicalDeviceGpaFeaturesAMD::perfCounters feature must
be enabled
VUID-VkGpaSampleBeginInfoAMD-sampleType-12413
If sampleType is VK_GPA_SAMPLE_TYPE_TRACE_AMD, at least one
of the VkPhysicalDeviceGpaFeaturesAMD::streamingPerfCounters or
VkPhysicalDeviceGpaFeaturesAMD::sqThreadTracing features
must be enabled
VUID-VkGpaSampleBeginInfoAMD-sqThreadTraceEnable-12414
If sqThreadTraceEnable is VK_TRUE, the
VkPhysicalDeviceGpaFeaturesAMD::sqThreadTracing feature
must be enabled
Valid Usage (Implicit)
VUID-VkGpaSampleBeginInfoAMD-sType-sType
sType must be VK_STRUCTURE_TYPE_GPA_SAMPLE_BEGIN_INFO_AMD
VUID-VkGpaSampleBeginInfoAMD-pNext-pNext
pNext must be NULL
VUID-VkGpaSampleBeginInfoAMD-sampleType-parameter
sampleType must be a valid VkGpaSampleTypeAMD value
VUID-VkGpaSampleBeginInfoAMD-sqShaderMask-parameter
sqShaderMask must be a valid combination of VkGpaSqShaderStageFlagBitsAMD values
VUID-VkGpaSampleBeginInfoAMD-sqShaderMask-requiredbitmask
sqShaderMask must not be 0
VUID-VkGpaSampleBeginInfoAMD-pPerfCounters-parameter
pPerfCounters must be a valid pointer to an array of perfCounterCount valid VkGpaPerfCounterAMD structures
VUID-VkGpaSampleBeginInfoAMD-timingPreSample-parameter
timingPreSample must be a valid combination of VkPipelineStageFlagBits values
VUID-VkGpaSampleBeginInfoAMD-timingPreSample-requiredbitmask
timingPreSample must not be 0
VUID-VkGpaSampleBeginInfoAMD-timingPostSample-parameter
timingPostSample must be a valid combination of VkPipelineStageFlagBits values
VUID-VkGpaSampleBeginInfoAMD-timingPostSample-requiredbitmask
timingPostSample must not be 0
VUID-VkGpaSampleBeginInfoAMD-perfCounterCount-arraylength
perfCounterCount must be greater than 0