mesa/src/intel/vulkan
Lionel Landwerlin f2f6ac1c08 anv: Use corresponding type from the vector allocation
We didn't notice this issue much because the 2 struct share a similar
layout, expect for the additional fields...

We run into that issue in Anv :

==15236== Invalid write of size 8
==15236==    at 0x8CF3939C: anv_state_table_expand_range (anv_allocator.c:211)
==15236==    by 0x8CF394D5: anv_state_table_grow (anv_allocator.c:264)
==15236==    by 0x8CF3967E: anv_state_table_add (anv_allocator.c:312)
==15236==    by 0x8CF3B13C: anv_state_pool_alloc_no_vg (anv_allocator.c:1167)
==15236==    by 0x8CF3B2B0: anv_state_pool_alloc (anv_allocator.c:1190)
==15236==    by 0x8CF60871: alloc_surface_state (anv_image.c:1122)
==15236==    by 0x8CF61FF9: anv_CreateImageView (anv_image.c:1519)
==15236==    by 0x8BCBD2ED: vkCreateImageView (trampoline.c:1358)
==15236==  Address 0x8994ef10 is 0 bytes after a block of size 128 alloc'd
==15236==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15236==    by 0x8D2578E6: u_vector_init (u_vector.c:47)
==15236==    by 0x8CF3929A: anv_state_table_init (anv_allocator.c:168)
==15236==    by 0x8CF3A99A: anv_state_pool_init (anv_allocator.c:921)
==15236==    by 0x8CF56517: anv_CreateDevice (anv_device.c:1909)
==15236==    by 0x8BCB4FBA: terminator_CreateDevice (loader.c:6073)
==15236==    by 0x8DD2CB3D: ??? (in /home/djdeath/.steam/ubuntu12_64/libVkLayer_steam_fossilize.so)
==15236==    by 0x8DF4D241: vkCreateDevice (in /home/djdeath/.steam/ubuntu12_64/steamoverlayvulkanlayer.so)
==15236==    by 0x8BCB35C6: loader_create_device_chain (loader.c:5449)
==15236==    by 0x8BCBC230: vkCreateDevice (trampoline.c:838)

v2: Rename mmap_cleanups to avoid confusion (Caio)

v3: s/fail_mmap_cleanups/fail_cleanups/ (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110648
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2019-05-09 21:57:26 +01:00
..
tests delete autotools .gitignore files 2019-04-29 21:17:19 +00:00
anv_allocator.c anv: Use corresponding type from the vector allocation 2019-05-09 21:57:26 +01:00
anv_android.c anv: fix build on Nougat 2019-03-21 15:36:39 -07:00
anv_android.h anv/android: support creating images from external format 2018-12-19 09:38:41 +02:00
anv_android_stubs.c anv/android: support creating images from external format 2018-12-19 09:38:41 +02:00
anv_batch_chain.c anv: Make all VkDeviceMemory BOs resident permanently 2019-04-19 19:56:42 +00:00
anv_blorp.c anv/blorp: Delete a pointless assert 2019-02-14 16:04:42 -06:00
anv_cmd_buffer.c anv: fix crash when application does not provide push constants 2019-05-03 10:21:40 +01:00
anv_descriptor_set.c anv/descriptor_set: Don't fully destroy sets in pool destroy/reset 2019-04-26 05:40:28 +00:00
anv_device.c anv: fix use after free 2019-05-08 12:02:13 +01:00
anv_dump.c anv: drop unneeded KHR suffix 2019-01-08 18:47:56 +00:00
anv_entrypoints_gen.py anv: use the platform defines in vk.xml instead of hard-coding them 2019-03-05 11:57:10 +00:00
anv_extensions.py anv: add support for VK_EXT_memory_budget 2019-04-30 15:40:33 +00:00
anv_extensions_gen.py anv: Add EXT_acquire_xlib_display to anv driver [v3] 2018-06-19 14:17:46 -07:00
anv_formats.c drm-uapi: use local files, not system libdrm 2019-02-14 11:20:00 +00:00
anv_gem.c vulkan: Add VK_EXT_calibrated_timestamps extension (radv and anv) [v5] 2018-10-17 20:10:15 -07:00
anv_gem_stubs.c vulkan: Add VK_EXT_calibrated_timestamps extension (radv and anv) [v5] 2018-10-17 20:10:15 -07:00
anv_genX.h anv: Move mi_memcpy and mi_memset to gen_mi_builder 2019-04-11 18:04:09 +00:00
anv_icd.py anv: fix python whitespace warning 2018-07-25 20:55:35 +01:00
anv_image.c anv: implement VK_KHR_swapchain revision 70 2019-04-08 18:27:02 +01:00
anv_intel.c anv: drop unneeded KHR suffix 2019-01-08 18:47:56 +00:00
anv_nir.h anv/nir: Add a central helper for figuring out SSBO address formats 2019-04-19 19:56:42 +00:00
anv_nir_add_base_work_group_id.c anv: Implement vkCmdDispatchBase 2018-03-07 12:13:47 -08:00
anv_nir_apply_pipeline_layout.c anv/nir: Add a central helper for figuring out SSBO address formats 2019-04-19 19:56:42 +00:00
anv_nir_lower_input_attachments.c nir, glsl: move pixel_center_integer/origin_upper_left to shader_info.fs 2019-02-21 11:47:59 +01:00
anv_nir_lower_multiview.c nir/builder: Add a build_deref_array_imm helper 2019-03-07 21:20:30 +00:00
anv_nir_lower_push_constants.c spirv/i965/anv: Relax push constant offset assertions being 32-bit aligned 2018-02-28 21:37:40 -08:00
anv_nir_lower_ycbcr_textures.c nir: make nir_const_value scalar 2019-04-14 22:25:56 +02:00
anv_pass.c anv/pass: Flag the need for a RT flush for resolve attachments 2019-03-13 17:58:27 -05:00
anv_pipeline.c anv: fix alphaToCoverage when there is no color attachment 2019-05-07 09:35:47 +02:00
anv_pipeline_cache.c anv: Put image params in the descriptor set buffer on gen8 and earlier 2019-04-19 19:56:42 +00:00
anv_private.h anv: Use corresponding type from the vector allocation 2019-05-09 21:57:26 +01:00
anv_queue.c intel/decoders: handle decoding MI_BBS from ring 2019-03-07 15:08:31 +00:00
anv_util.c anv/util: Split a vk_errorv helper out of vk_errorf 2018-10-26 13:27:21 -05:00
anv_wsi.c vulkan/wsi: Add X11 adaptive sync support based on dri options. 2019-04-23 23:49:39 +00:00
anv_wsi_display.c anv,radv: Add support for VK_KHR_get_display_properties2 2018-07-09 17:09:41 -07:00
anv_wsi_wayland.c anv: drop unused includes 2018-10-24 18:15:05 +01:00
anv_wsi_x11.c vulkan: drop always-true param 2018-10-26 18:33:11 +01:00
gen7_cmd_buffer.c anv/cmd_buffer: check for NULL framebuffer 2019-02-12 19:19:13 +01:00
gen8_cmd_buffer.c anv: Remove state flush. 2019-01-17 15:08:22 -08:00
genX_blorp_exec.c Revert "anv: limit URB reconfigurations when using blorp" 2019-04-29 11:41:27 +00:00
genX_cmd_buffer.c anv: Use bindless textures and samplers 2019-04-19 19:56:42 +00:00
genX_gpu_memcpy.c anv: Move mi_memcpy and mi_memset to gen_mi_builder 2019-04-11 18:04:09 +00:00
genX_pipeline.c Revert "anv: limit URB reconfigurations when using blorp" 2019-04-29 11:41:27 +00:00
genX_query.c anv: rework queries writes to ensure ordering memory writes 2019-05-08 09:49:09 +00:00
genX_state.c anv: Use bindless textures and samplers 2019-04-19 19:56:42 +00:00
meson.build meson: Add dependency on genxml to anvil genfiles 2019-04-17 15:49:55 +02:00
TODO anv: Implement pipeline statistics queries 2017-03-17 12:12:50 -07:00
vk_format_info.h anv: fix build on Nougat 2019-03-21 15:36:39 -07:00