mesa/src/intel/vulkan
Chad Versace 146f41e608 anv/image: Refactor iteration over modifiers
Refactor in get_wsi_format_modifier_properties_list().

Instead of iterating over a function-local hard-coded list, iterate over
all modifiers in isl_drm.c.

This will improve agreement in behavior between
VkDrmFormatModifierPropertiesListEXT
VkPhysicalDeviceImageDrmFormatModifierInfoEXT.

The future disagreement this patch attempts to prevent is the
combination of:
    a. VkDrmFormatModifierPropertiesListEXT neglects to return a valid
       modifier because its hard-coded list of modifiers drifts
       out-of-sync with hard-coded lists elsewhere in the code. (Already
       today, the list in get_wsi_format_modifier_properties_list() does
       not match the list in isl_drm.c; though, this has produced no bug
       yet).
    b. vkGetPhysicalDeviceImageFormatProperties2 accepts, via
       VkPhysicalDeviceImageDrmFormatModifierInfoEXT, the modifier
       overlooked in (a), because it does not use the same hard-coded
       list in get_wsi_format_modifier_properties_list(). (Recall that
       the spec requires vkGetPhysicalDeviceImageFormatProperties2 to
       correctly accept/reject any int that the app provides, even when
       the int is an invalid modifier).
    c. The Bug. The driver told the app in (b) that it can legally
       create an image with format+modifier, but the app cannot query
       the VkFormatFeatureFlags of the format+modifier due to (a).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2020-11-17 10:36:45 -08:00
..
tests anv/tests: Silence unused parameter warnings in main 2020-05-14 16:47:08 +00:00
anv_allocator.c anv/allocator: Compare to start_offset in state_pool_free_no_vg 2020-06-09 22:52:26 +00:00
anv_android.c anv/image: Teach anv_get_image_format_features() about modifiers (v3) 2020-11-17 10:36:44 -08:00
anv_android.h anv: Drop unneeded struct keywords 2020-01-03 11:32:34 -06:00
anv_android_stubs.c anv: Drop unneeded struct keywords 2020-01-03 11:32:34 -06:00
anv_batch_chain.c anv: drop likely/unlikely around INTEL_DEBUG 2020-10-06 18:43:07 +00:00
anv_blorp.c anv: Get aux usage from plane while clearing stencil buffer 2020-10-22 21:42:36 +00:00
anv_cmd_buffer.c anv: remove dead code from anv_create_cmd_buffer 2020-11-05 12:07:51 +00:00
anv_descriptor_set.c isl, anv, iris: Add a centralized helper to select MOCS based on usage 2020-10-19 19:18:11 +00:00
anv_device.c anv: restrict number of subgroups per group 2020-11-05 10:43:06 -08:00
anv_dump.c tree-wide: replace MAYBE_UNUSED with ASSERTED 2019-07-31 09:41:05 +01:00
anv_entrypoints_gen.py anv: Don't generate Gen10-specific functions 2020-10-15 09:29:54 -07:00
anv_extensions.py anv: report latest extension spec versions 2020-10-25 19:12:35 +02:00
anv_extensions_gen.py anv: use the common code for generating extensions and dispatch tables 2020-05-13 08:45:28 +02:00
anv_formats.c anv/image: Refactor iteration over modifiers 2020-11-17 10:36:45 -08:00
anv_gem.c anv: always annotate memory returned from anv_gem_mmap 2020-11-02 19:52:11 +00:00
anv_gem_stubs.c anv: add new gem/drm helpers 2020-09-01 16:40:11 +00:00
anv_genX.h anv: fix up dynamic clip emission 2020-08-11 10:07:08 +03:00
anv_icd.py anv: fix typo 2019-06-29 22:41:06 +01:00
anv_image.c anv/image: Use isl_drm_modifier_get_score() 2020-11-17 10:36:44 -08:00
anv_intel.c vulkan,anv: Add a common base object type for VkDevice 2020-05-04 14:06:27 +00:00
anv_nir.h anv/gen12: Lower VK_KHR_multiview using Primitive Replication 2020-04-07 17:16:09 +00:00
anv_nir_add_base_work_group_id.c anv: Rework push constant handling 2019-11-18 18:35:14 +00:00
anv_nir_apply_pipeline_layout.c nir: Add and use some deref mode helpers 2020-11-03 22:18:28 +00:00
anv_nir_compute_push_layout.c anv: fix robust buffer access 2020-08-31 19:24:42 +00:00
anv_nir_lower_multiview.c anv: Use nir_lower_multiview pass 2020-09-29 10:31:59 +00:00
anv_nir_lower_ycbcr_textures.c anv: use common nir_convert_ycbcr 2020-04-20 22:01:43 +00:00
anv_pass.c anv: Plumb the device into *bits_for_access_flags 2020-10-08 01:17:11 -05:00
anv_perf.c anv: drop likely/unlikely around INTEL_DEBUG 2020-10-06 18:43:07 +00:00
anv_pipeline.c intel/compiler, anv: Delete cs_prog_data->slm_size 2020-10-14 23:13:41 +00:00
anv_pipeline_cache.c anv: remove VkPipelineCacheCreateInfo::flags assert 2020-10-06 10:29:33 -04:00
anv_private.h anv/image: Teach anv_get_image_format_features() about modifiers (v3) 2020-11-17 10:36:44 -08:00
anv_queue.c anv: Check file descriptor before closing. 2020-09-28 15:34:01 -07:00
anv_util.c mesa: Promote Intel's simple logging façade for Android to util/ 2020-09-28 09:14:44 -07:00
anv_wsi.c anv: implement shareable timeline semaphores 2020-09-01 16:40:11 +00:00
anv_wsi_display.c vulkan/wsi/display: add option for display fence to signal syncobj 2020-09-24 13:20:00 +00: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 intel: Pointer to SCISSOR_RECT array should be 64B aligned 2020-11-09 21:29:04 +00:00
gen8_cmd_buffer.c isl, anv, iris: Add a centralized helper to select MOCS based on usage 2020-10-19 19:18:11 +00:00
genX_blorp_exec.c isl, anv, iris: Add a centralized helper to select MOCS based on usage 2020-10-19 19:18:11 +00:00
genX_cmd_buffer.c anv: Pass correct stencil aux usage during MSAA resolve 2020-10-22 21:42:36 +00:00
genX_gpu_memcpy.c isl, anv, iris: Add a centralized helper to select MOCS based on usage 2020-10-19 19:18:11 +00:00
genX_pipeline.c anv: Implement VK_EXT_transform_feedback on Gen7 2020-10-05 22:34:07 +00:00
genX_query.c anv: Implement VK_KHR_performance_query 2020-05-20 14:02:27 +03:00
genX_state.c intel/gen9: Enable MSC RAW Hazard Avoidance 2020-10-01 16:57:50 +00:00
meson.build anv: fix a build race between generating a header and using it 2020-11-12 15:57:05 +01:00
TODO anv: Implement pipeline statistics queries 2017-03-17 12:12:50 -07:00
vk_format_info.h anv: Add HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED in vk_format 2019-06-24 08:28:18 +03:00