VkPhysicalDevice* pPhysicalDevices)
{
ANV_FROM_HANDLE(anv_instance, instance, _instance);
- VK_OUTARRAY_MAKE(out, pPhysicalDevices, pPhysicalDeviceCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPhysicalDevice, out,
+ pPhysicalDevices, pPhysicalDeviceCount);
VkResult result = anv_enumerate_physical_devices(instance);
if (result != VK_SUCCESS)
list_for_each_entry(struct anv_physical_device, pdevice,
&instance->physical_devices, link) {
- vk_outarray_append(&out, i) {
+ vk_outarray_append_typed(VkPhysicalDevice, &out, i) {
*i = anv_physical_device_to_handle(pdevice);
}
}
VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties)
{
ANV_FROM_HANDLE(anv_instance, instance, _instance);
- VK_OUTARRAY_MAKE(out, pPhysicalDeviceGroupProperties,
- pPhysicalDeviceGroupCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPhysicalDeviceGroupProperties, out,
+ pPhysicalDeviceGroupProperties,
+ pPhysicalDeviceGroupCount);
VkResult result = anv_enumerate_physical_devices(instance);
if (result != VK_SUCCESS)
list_for_each_entry(struct anv_physical_device, pdevice,
&instance->physical_devices, link) {
- vk_outarray_append(&out, p) {
+ vk_outarray_append_typed(VkPhysicalDeviceGroupProperties, &out, p) {
p->physicalDeviceCount = 1;
memset(p->physicalDevices, 0, sizeof(p->physicalDevices));
p->physicalDevices[0] = anv_physical_device_to_handle(pdevice);
VkQueueFamilyProperties2* pQueueFamilyProperties)
{
ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
- VK_OUTARRAY_MAKE(out, pQueueFamilyProperties, pQueueFamilyPropertyCount);
+ VK_OUTARRAY_MAKE_TYPED(VkQueueFamilyProperties2, out,
+ pQueueFamilyProperties, pQueueFamilyPropertyCount);
for (uint32_t i = 0; i < pdevice->queue.family_count; i++) {
struct anv_queue_family *queue_family = &pdevice->queue.families[i];
- vk_outarray_append(&out, p) {
+ vk_outarray_append_typed(VkQueueFamilyProperties2, &out, p) {
p->queueFamilyProperties = anv_queue_family_properties_template;
p->queueFamilyProperties.queueFlags = queue_family->queueFlags;
p->queueFamilyProperties.queueCount = queue_family->queueCount;
VkTimeDomainEXT *pTimeDomains)
{
int d;
- VK_OUTARRAY_MAKE(out, pTimeDomains, pTimeDomainCount);
+ VK_OUTARRAY_MAKE_TYPED(VkTimeDomainEXT, out, pTimeDomains, pTimeDomainCount);
for (d = 0; d < ARRAY_SIZE(anv_time_domains); d++) {
- vk_outarray_append(&out, i) {
+ vk_outarray_append_typed(VkTimeDomainEXT, &out, i) {
*i = anv_time_domains[d];
}
}
VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates)
{
ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice);
- VK_OUTARRAY_MAKE(out, pFragmentShadingRates, pFragmentShadingRateCount);
-
-#define append_rate(_samples, _width, _height) \
- do { \
- vk_outarray_append(&out, __r) { \
- __r->sampleCounts = _samples; \
- __r->fragmentSize = (VkExtent2D) { \
- .width = _width, \
- .height = _height, \
- }; \
- } \
+ VK_OUTARRAY_MAKE_TYPED(VkPhysicalDeviceFragmentShadingRateKHR, out,
+ pFragmentShadingRates, pFragmentShadingRateCount);
+
+#define append_rate(_samples, _width, _height) \
+ do { \
+ vk_outarray_append_typed(VkPhysicalDeviceFragmentShadingRateKHR, &out, __r) { \
+ __r->sampleCounts = _samples; \
+ __r->fragmentSize = (VkExtent2D) { \
+ .width = _width, \
+ .height = _height, \
+ }; \
+ } \
} while (0)
VkSampleCountFlags sample_counts =
const struct intel_device_info *devinfo = &physical_device->info;
const struct anv_format *anv_format = anv_get_format(vk_format);
- VK_OUTARRAY_MAKE(out, list->pDrmFormatModifierProperties,
- &list->drmFormatModifierCount);
+ VK_OUTARRAY_MAKE_TYPED(VkDrmFormatModifierPropertiesEXT, out,
+ list->pDrmFormatModifierProperties,
+ &list->drmFormatModifierCount);
isl_drm_modifier_info_for_each(isl_mod_info) {
VkFormatFeatureFlags2KHR features2 =
if (isl_mod_info->aux_usage != ISL_AUX_USAGE_NONE)
++planes;
- vk_outarray_append(&out, out_props) {
+ vk_outarray_append_typed(VkDrmFormatModifierPropertiesEXT, &out, out_props) {
*out_props = (VkDrmFormatModifierPropertiesEXT) {
.drmFormatModifier = isl_mod_info->modifier,
.drmFormatModifierPlaneCount = planes,
const struct intel_device_info *devinfo = &physical_device->info;
const struct anv_format *anv_format = anv_get_format(vk_format);
- VK_OUTARRAY_MAKE(out, list->pDrmFormatModifierProperties,
- &list->drmFormatModifierCount);
+ VK_OUTARRAY_MAKE_TYPED(VkDrmFormatModifierProperties2EXT, out,
+ list->pDrmFormatModifierProperties,
+ &list->drmFormatModifierCount);
isl_drm_modifier_info_for_each(isl_mod_info) {
VkFormatFeatureFlags2KHR features2 =
if (isl_mod_info->aux_usage != ISL_AUX_USAGE_NONE)
++planes;
- vk_outarray_append(&out, out_props) {
+ vk_outarray_append_typed(VkDrmFormatModifierProperties2EXT, &out, out_props) {
*out_props = (VkDrmFormatModifierProperties2EXT) {
.drmFormatModifier = isl_mod_info->modifier,
.drmFormatModifierPlaneCount = planes,
uint32_t desc_count = *pCounterCount;
- VK_OUTARRAY_MAKE(out, pCounters, pCounterCount);
- VK_OUTARRAY_MAKE(out_desc, pCounterDescriptions, &desc_count);
+ VK_OUTARRAY_MAKE_TYPED(VkPerformanceCounterKHR, out, pCounters, pCounterCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPerformanceCounterDescriptionKHR, out_desc,
+ pCounterDescriptions, &desc_count);
for (int c = 0; c < (perf ? perf->n_counters : 0); c++) {
const struct intel_perf_query_counter *intel_counter = perf->counter_infos[c].counter;
- vk_outarray_append(&out, counter) {
+ vk_outarray_append_typed(VkPerformanceCounterKHR, &out, counter) {
counter->unit = intel_perf_counter_unit_to_vk_unit[intel_counter->units];
counter->scope = VK_QUERY_SCOPE_COMMAND_KHR;
counter->storage = intel_perf_counter_data_type_to_vk_storage[intel_counter->data_type];
memcpy(counter->uuid, sha1_result, sizeof(counter->uuid));
}
- vk_outarray_append(&out_desc, desc) {
+ vk_outarray_append_typed(VkPerformanceCounterDescriptionKHR, &out_desc, desc) {
desc->flags = 0; /* None so far. */
snprintf(desc->name, sizeof(desc->name), "%s", intel_counter->name);
snprintf(desc->category, sizeof(desc->category), "%s", intel_counter->category);
VkPipelineExecutablePropertiesKHR* pProperties)
{
ANV_FROM_HANDLE(anv_pipeline, pipeline, pPipelineInfo->pipeline);
- VK_OUTARRAY_MAKE(out, pProperties, pExecutableCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPipelineExecutablePropertiesKHR, out,
+ pProperties, pExecutableCount);
util_dynarray_foreach (&pipeline->executables, struct anv_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)
{
ANV_FROM_HANDLE(anv_pipeline, pipeline, pExecutableInfo->pipeline);
- VK_OUTARRAY_MAKE(out, pStatistics, pStatisticCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPipelineExecutableStatisticKHR, out,
+ pStatistics, pStatisticCount);
const struct anv_pipeline_executable *exe =
anv_pipeline_get_executable(pipeline, pExecutableInfo->executableIndex);
unreachable("invalid pipeline type");
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Instruction Count");
WRITE_STR(stat->description,
"Number of GEN instructions in the final generated "
stat->value.u64 = exe->stats.instructions;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "SEND Count");
WRITE_STR(stat->description,
"Number of instructions in the final generated shader "
stat->value.u64 = exe->stats.sends;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Loop Count");
WRITE_STR(stat->description,
"Number of loops (not unrolled) in the final generated "
stat->value.u64 = exe->stats.loops;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Cycle Count");
WRITE_STR(stat->description,
"Estimate of the number of EU cycles required to execute "
stat->value.u64 = exe->stats.cycles;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Spill Count");
WRITE_STR(stat->description,
"Number of scratch spill operations. This gives a rough "
stat->value.u64 = exe->stats.spills;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Fill Count");
WRITE_STR(stat->description,
"Number of scratch fill operations. This gives a rough "
stat->value.u64 = exe->stats.fills;
}
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Scratch Memory Size");
WRITE_STR(stat->description,
"Number of bytes of scratch memory required by the "
}
if (gl_shader_stage_uses_workgroup(exe->stage)) {
- vk_outarray_append(&out, stat) {
+ vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Workgroup Memory Size");
WRITE_STR(stat->description,
"Number of bytes of workgroup shared memory used by this "
VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations)
{
ANV_FROM_HANDLE(anv_pipeline, pipeline, pExecutableInfo->pipeline);
- VK_OUTARRAY_MAKE(out, pInternalRepresentations,
- pInternalRepresentationCount);
+ VK_OUTARRAY_MAKE_TYPED(VkPipelineExecutableInternalRepresentationKHR, out,
+ pInternalRepresentations, pInternalRepresentationCount);
bool incomplete_text = false;
const struct anv_pipeline_executable *exe =
anv_pipeline_get_executable(pipeline, pExecutableInfo->executableIndex);
if (exe->nir) {
- 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, "GEN Assembly");
WRITE_STR(ir->description,
"Final GEN assembly for the generated shader binary");