anv: VK_INTEL_performance_query interaction with VK_EXT_private_data

All objects are expected to have the base internal object for private
data storage.

This also fixes a memory leak of a gen_perf_registers structure.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 51c6bc13ce ("anv,vulkan: Implement VK_EXT_private_data")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6255>
This commit is contained in:
Lionel Landwerlin
2020-08-10 10:27:57 +03:00
committed by Marge Bot
parent 5d52c26e78
commit b6a013ccab
2 changed files with 44 additions and 15 deletions

View File

@@ -4456,6 +4456,14 @@ anv_get_subpass_id(const struct anv_cmd_state * const cmd_state)
return subpass_id;
}
struct anv_performance_configuration_intel {
struct vk_object_base base;
struct gen_perf_registers *register_config;
uint64_t config_id;
};
struct gen_perf_config *anv_get_perf(const struct gen_device_info *devinfo, int fd);
void anv_device_perf_init(struct anv_device *device);
void anv_perf_write_pass_results(struct gen_perf_config *perf,
@@ -4518,6 +4526,9 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(anv_shader_module, base, VkShaderModule,
VK_DEFINE_NONDISP_HANDLE_CASTS(anv_ycbcr_conversion, base,
VkSamplerYcbcrConversion,
VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION)
VK_DEFINE_NONDISP_HANDLE_CASTS(anv_performance_configuration_intel, base,
VkPerformanceConfigurationINTEL,
VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL)
/* Gen-specific function declarations */
#ifdef genX