VkPhysicalDevice *pPhysicalDevices)
{
TU_FROM_HANDLE(tu_instance, instance, _instance);
- VK_OUTARRAY_MAKE(out, pPhysicalDevices, pPhysicalDeviceCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPhysicalDevice, out,
+ pPhysicalDevices, pPhysicalDeviceCount);
VkResult result;
}
for (uint32_t i = 0; i < instance->physical_device_count; ++i) {
- vk_outarray_append(&out, p)
+ vk_outarray_append_typed(VkPhysicalDevice, &out, p)
{
*p = tu_physical_device_to_handle(instance->physical_devices + i);
}
VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties)
{
TU_FROM_HANDLE(tu_instance, instance, _instance);
- VK_OUTARRAY_MAKE(out, pPhysicalDeviceGroupProperties,
- pPhysicalDeviceGroupCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPhysicalDeviceGroupProperties, out,
+ pPhysicalDeviceGroupProperties,
+ pPhysicalDeviceGroupCount);
VkResult result;
if (instance->physical_device_count < 0) {
}
for (uint32_t i = 0; i < instance->physical_device_count; ++i) {
- vk_outarray_append(&out, p)
+ vk_outarray_append_typed(VkPhysicalDeviceGroupProperties, &out, p)
{
p->physicalDeviceCount = 1;
p->physicalDevices[0] =
uint32_t *pQueueFamilyPropertyCount,
VkQueueFamilyProperties2 *pQueueFamilyProperties)
{
- VK_OUTARRAY_MAKE(out, pQueueFamilyProperties, pQueueFamilyPropertyCount);
+ VK_OUTARRAY_MAKE_TYPED(VkQueueFamilyProperties2, out,
+ pQueueFamilyProperties, pQueueFamilyPropertyCount);
- vk_outarray_append(&out, p)
+ vk_outarray_append_typed(VkQueueFamilyProperties2, &out, p)
{
p->queueFamilyProperties = tu_queue_family_properties;
}
{
TU_FROM_HANDLE(tu_device, dev, _device);
TU_FROM_HANDLE(tu_pipeline, pipeline, pPipelineInfo->pipeline);
- VK_OUTARRAY_MAKE(out, pProperties, pExecutableCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPipelineExecutablePropertiesKHR, out,
+ pProperties, pExecutableCount);
util_dynarray_foreach (&pipeline->executables, struct tu_pipeline_executable, exe) {
- vk_outarray_append(&out, props) {
+ vk_outarray_append_typed(VkPipelineExecutablePropertiesKHR, &out, props) {
gl_shader_stage stage = exe->stage;
props->stages = mesa_to_vk_shader_stage(stage);
VkPipelineExecutableStatisticKHR* pStatistics)
{
TU_FROM_HANDLE(tu_pipeline, pipeline, pExecutableInfo->pipeline);
- VK_OUTARRAY_MAKE(out, pStatistics, pStatisticCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPipelineExecutableStatisticKHR, out,
+ pStatistics, pStatisticCount);
const struct tu_pipeline_executable *exe =
tu_pipeline_get_executable(pipeline, pExecutableInfo->executableIndex);
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Max Waves Per Core");
WRITE_STR(stat->description,
"Maximum number of simultaneous waves per core.");
stat->value.u64 = exe->stats.max_waves;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Instruction Count");
WRITE_STR(stat->description,
"Total number of IR3 instructions in the final generated "
stat->value.u64 = exe->stats.instrs_count;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Code size");
WRITE_STR(stat->description,
"Total number of dwords in the final generated "
stat->value.u64 = exe->stats.sizedwords;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "NOPs Count");
WRITE_STR(stat->description,
"Number of NOP instructions in the final generated "
stat->value.u64 = exe->stats.nops_count;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "MOV Count");
WRITE_STR(stat->description,
"Number of MOV instructions in the final generated "
stat->value.u64 = exe->stats.mov_count;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "COV Count");
WRITE_STR(stat->description,
"Number of COV instructions in the final generated "
stat->value.u64 = exe->stats.cov_count;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Registers used");
WRITE_STR(stat->description,
"Number of registers used in the final generated "
stat->value.u64 = exe->stats.max_reg + 1;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Half-registers used");
WRITE_STR(stat->description,
"Number of half-registers used in the final generated "
stat->value.u64 = exe->stats.max_half_reg + 1;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Instructions with SS sync bit");
WRITE_STR(stat->description,
"SS bit is set for instructions which depend on a result "
stat->value.u64 = exe->stats.ss;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Instructions with SY sync bit");
WRITE_STR(stat->description,
"SY bit is set for instructions which depend on a result "
stat->value.u64 = exe->stats.sy;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Estimated cycles stalled on SS");
WRITE_STR(stat->description,
"A better metric to estimate the impact of SS syncs.");
stat->value.u64 = exe->stats.sstall;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Estimated cycles stalled on SY");
WRITE_STR(stat->description,
"A better metric to estimate the impact of SY syncs.");
}
for (int i = 0; i < ARRAY_SIZE(exe->stats.instrs_per_cat); i++) {
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "cat%d instructions", i);
WRITE_STR(stat->description,
"Number of cat%d instructions.", i);
}
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "STP Count");
WRITE_STR(stat->description,
"Number of STore Private instructions in the final generated "
stat->value.u64 = exe->stats.stp_count;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "LDP Count");
WRITE_STR(stat->description,
"Number of LoaD Private instructions in the final generated "
VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations)
{
TU_FROM_HANDLE(tu_pipeline, pipeline, pExecutableInfo->pipeline);
- VK_OUTARRAY_MAKE(out, pInternalRepresentations, pInternalRepresentationCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPipelineExecutableInternalRepresentationKHR, out,
+ pInternalRepresentations, pInternalRepresentationCount);
bool incomplete_text = false;
const struct tu_pipeline_executable *exe =
tu_pipeline_get_executable(pipeline, pExecutableInfo->executableIndex);
if (exe->nir_from_spirv) {
- vk_outarray_append(&out, ir) {
+ vk_outarray_append_typed(VkPipelineExecutableInternalRepresentationKHR, &out, ir) {
WRITE_STR(ir->name, "NIR from SPIRV");
WRITE_STR(ir->description,
"Initial NIR before any optimizations");
}
if (exe->nir_final) {
- vk_outarray_append(&out, ir) {
+ vk_outarray_append_typed(VkPipelineExecutableInternalRepresentationKHR, &out, ir) {
WRITE_STR(ir->name, "Final NIR");
WRITE_STR(ir->description,
"Final NIR before going into the back-end compiler");
}
if (exe->disasm) {
- vk_outarray_append(&out, ir) {
+ vk_outarray_append_typed(VkPipelineExecutableInternalRepresentationKHR, &out, ir) {
WRITE_STR(ir->name, "IR3 Assembly");
WRITE_STR(ir->description,
"Final IR3 assembly for the generated shader binary");