Mesa (master): 24 new commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 17 18:40:11 UTC 2020
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=87dc3106b077199b829a082e32ec33d0c6d400ab
Author: Chad Versace <chad at kiwitree.net>
Date: Tue Sep 22 11:23:13 2020 -0700
anv/image: Define anv_image_get_aux_addr (v3)
Simple refactor. No intended change in behavior.
Replace each derivation of aux address with anv_image_get_aux_addr().
The function will soon do more in support of
VK_EXT_image_drm_format_modifier, where the image bo and aux bo may be
disjoint.
v2:
- Replace param 'aspect' with 'plane'.
v3:
- Workaround for stencil ccs. If no aux surface, then return
ANV_NULL_ADDRESS.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v3)
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5fa0e5b87df52e112dc1ffa0ba34962ffca16540
Author: Chad Versace <chad at kiwitree.net>
Date: Sun Aug 9 14:29:54 2020 -0700
anv/image: Check surface offsets after adding each surface
Pre-patch, we checked the offsets once per aspect after adding all
surfaces for the aspect. The additional checks will make it easier to
diagnose layout bugs.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f0abc2a22422c4cdf4d9ef6a17bd288bddad674
Author: Chad Versace <chad at kiwitree.net>
Date: Sun Aug 9 14:21:15 2020 -0700
anv/image: Rewrite check_surfaces() [v2]
Pure refactor. No intended change in behavior.
This makes the code infinitely easier to understand. And it uncovers
a potential bug (marked with XXX comment).
v2: Fix narrowing conversions on 32-bit arch. s/size_t/uintmax_t/.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> (v1)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v2)
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=15642a52ce216a0043eb88447d65d33f8516efd5
Author: Chad Versace <chad at kiwitree.net>
Date: Sun Aug 9 13:46:34 2020 -0700
anv/image: Further split add_*_surface funcs (v2)
Months ago, make_surface() added *all* surfaces required for the given
aspect. It was a monster monolithic function, and difficult to reason
about its correctness. In commit c652ff8c (2020-03-06), I split the code
for aux surfaces into its own function, add_aux_surface_if_supported().
This patch continues the splitting, therefore making bugs easier to
identify.
Code changes:
- Move the code that adds the shadow surface from make_surface() to
a new function add_shadow_surface(), called from
add_all_surfaces().
- Move the call to add_aux_surface_if_supported() from make_surface()
to add_all_surfaces().
- To preserve correctness of the assertions on image layout in
make_surface(), move them to the loop in add_all_surfaces() after
all the aspect's surfaces have been added.
- Rename make_surface() to add_primary_surface() because now that's
what it does.
Pure refactor, no intended change in behavior.
v2:
- Rebase onto "anv: Fix isl_surf_usage_flags for stencil images".
- Sanitize the image's extent earlier.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v2)
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f2073c76ef0c1bb8d4c14add2ea33be2bc558c2
Author: Chad Versace <chad at kiwitree.net>
Date: Sun Aug 9 13:01:24 2020 -0700
anv/image: Define add_all_surfaces()
This deduplicates the loops in anv_image_create() and
resolve_ahw_image().
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2bfd43ba0bf7ef43d73c0d4dc9174aad8f0522f7
Author: Chad Versace <chad at kiwitree.net>
Date: Sun Aug 9 12:53:47 2020 -0700
anv/image: Add more asserts to choose_isl_tiling_flags
Acked-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8636adf856eccb6d702666a29199fd72f47c7afb
Author: Chad Versace <chad at kiwitree.net>
Date: Sat Aug 8 17:39:24 2020 -0700
anv/image: Move some DRM code in anv_get_image_format_properties()
In anv_get_image_format_properties(), the special-case code for
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT is tiny. It is mostly a detached
'case' in the 'switch' block for VkImageType. So move the special-case
code to immediately follow the 'switch' block.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=40ac4c9cdc36067962e5e66c169bbd492f6b4a3d
Author: Chad Versace <chad at kiwitree.net>
Date: Sat Aug 8 19:33:49 2020 -0500
anv/image: Emit error message for non-2D DRM images
In vkGetPhysicalDeviceImageFormatProperties.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c892e242589fb93caec8198b093b434df4e11b6b
Author: Chad Versace <chad at kiwitree.net>
Date: Sat Aug 8 19:29:47 2020 -0500
anv/image: Drop redundant rejection of YCbCr formats with modifiers
The check in anv_get_image_format_properties() is already handled in
anv_get_image_format_features().
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c9f2a74b5a5da4ccfd69ce83ba1d39e106565714
Author: Chad Versace <chad at kiwitree.net>
Date: Sat Aug 8 19:11:33 2020 -0500
anv/image: Respect VkImageFormatListCreateInfo for VkImageFormatProperties (v2)
When filling VkImageFormatProperties, anv_get_image_format_properties()
checks the requested VkImageUsageFlags and VkImageCreateFlags against
the VkFormatFeatureFlags available to the queried VkFormat. However, we
neglected to consider if any formats given in
VkImageFormatListCreateInfo
further restricted the available VkFormatFeatureFlags.
The image view formats are more likely to introduce additional
restrictions when DRM format modifiers are present.
v2:
- Do not drop anv_formats_ccs_e_compatible().
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v2)
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce4f6bda66e32db8cc52233932062bf7bfd256e7
Author: Chad Versace <chad at kiwitree.net>
Date: Sat Aug 8 18:45:48 2020 -0500
anv/image: Fail earlier in anv_get_image_format_properties
If anv_get_image_format_features reports that the inputs are
unsupported, fail immediately.
Without the early fail, I have less confidence in the function's
correctness when a DRM format modifier is present.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c5b4b1e1dbf73317bbcb4e778bbd900995d6a89
Author: Chad Versace <chad at kiwitree.net>
Date: Sat Aug 8 18:42:22 2020 -0500
anv/image: Minor refactor of VkImageFormatProperties::sampleCounts
The code in anv_get_image_format_properties() that set sampleCounts
appears correct, but weirdly inconsistent. Clean the code to
consistently set sampleCounts in the same location as
maxExtent/maxMipLevels/maxArraySize.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b3ec91326b7e9181a2c865e5e9e251466092c39
Author: Chad Versace <chad at kiwitree.net>
Date: Wed Aug 5 11:09:32 2020 -0700
anv/image: Rename get_wsi_format_modifier_properties_list()
Rename it to get_drm_format_modifier_properties_list() because it is now
independent of WSI.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=57d416d4236bac3bbae10fcf290f9502ca091a5a
Author: Chad Versace <chad at kiwitree.net>
Date: Sat Aug 8 12:59:21 2020 -0700
anv/image: Fix VkExternalMemoryProperties for images (v5)
In vkGetPhysicalDeviceImageFormatProperties2, we advertised support for
VK_IMAGE_TILING_LINEAR and VK_IMAGE_TILING_OPTIMAL for all memory
handles.
However, when importing or exporting an image, there must exist a method
that enables the app and driver to agree on the image's memory layout.
If no method exists, then we should reject image creation.
v2:
- Reduce copy-paste for Lionel.
v3:
- Treat tiling LINEAR and DRM_FORMAT_MODIFIER as identical when
determing compatible memory handles.
- Improve comments.
v4:
- Remove DMA_BUF from opaque_fd_only_props.
v5:
- Minor changes to code style for `if`. (for jekstrand)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> (v4)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v4)
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2aa56905c6b4413a3ad66b77412fd28d34daef0
Author: Chad Versace <chad at kiwitree.net>
Date: Wed Aug 5 11:11:50 2020 -0700
anv/image: Delete the list of modifier-compatible formats
The code asserted that we supported no more than 4 formats with
modifiers: /VK_FORMAT_B8G8R8(A8)?_(SRGB|UNORM)/.
Strangely, 2 of the 4 were non-power-of-two formats, which were rejected
elsewhere.
The assertion's comment suggested that we use a hard-coded list of
formats because the driver was not yet able to determine if a given
format was compatible with a given modifier. Therefore, the list only
contained formats that were compatible with *all* modifiers. That code
deficiency no longer exists: anv_get_image_format_features() can check
format/modifier compatibility.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=146f41e608c4b35a5f68f0f49aa08d7949cf0d4c
Author: Chad Versace <chad at kiwitree.net>
Date: Wed Aug 5 10:23:05 2020 -0700
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 at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6835cb7f86223e33aaece0e10be3e87b118f1af5
Author: Chad Versace <chad at kiwitree.net>
Date: Wed Aug 5 09:23:39 2020 -0700
isl: Make public the list of modifiers
This allows Vulkan and GL to iterate over the full list of modifiers
instead of hard-coding in various places the "same" list as isl.
(Anvil's list has already diverged from isl's list. It omits Gen12
modifiers).
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=51eefbaae6d8d70a5774627e33f2dd7f81b34c99
Author: Chad Versace <chad at kiwitree.net>
Date: Wed Aug 5 10:16:19 2020 -0700
anv/image: Fill drmFormatModifierTilingFeatures (v2)
Fill VkDrmFormatModifierPropertiesEXT::drmFormatModifierTilingFeatures
with anv_get_image_format_features().
anv_formats.c:get_wsi_format_modifier_properties_list() incorrectly left
it uninitialized.
v2: Increment drmFormatModifierPlaneCount if modifier support aux.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v2)
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f39b3e48da34b2401a385fc4de4145610e75da2
Author: Chad Versace <chad at kiwitree.net>
Date: Mon Aug 3 10:02:40 2020 -0700
anv/image: Teach anv_get_image_format_features() about modifiers (v3)
Because anv_get_image_format_features() now understands modifiers, also
relocate most of the modifier compatibility checks from
anv_get_format_plane() into anv_get_image_format_features() in order to
avoid duplication.
The new signature forces some code movement in
anv_get_image_format_properties().
v2:
- Reject VK_FORMAT_B4G4R4A4_UNORM_PACK16 with modifiers on HSW.
v3:
- Revert the v2 change.
- Query isl_format_layout instead of pipe_format. (for jekstrand)
- Drop misguided comments. (for jekstrand)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v3)
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=486ae7c655e86d3f1b08f9356b11fe4eaee707bb
Author: Chad Versace <chad at kiwitree.net>
Date: Fri Oct 16 11:09:09 2020 -0700
isl: Add isl_format_layout::uniform_channel_type
If each format channel has the same base type (such unorm), then that
is the format's "uniform channel type".
Calculating the field at buildtime is probably better than looping over
all channels at runtime each time we wish to query it.
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f665bae4eb34fa2d05f6e9ccdd90245badd12eaf
Author: Chad Versace <chad at kiwitree.net>
Date: Wed Aug 5 08:57:13 2020 -0700
anv/image: Use isl_drm_modifier_get_score()
It replaces anv_drm_format_mod_score().
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=01bad67a940c234e325e17a37afe076b47ac9ad1
Author: Chad Versace <chad at kiwitree.net>
Date: Tue Aug 25 10:35:24 2020 -0700
isl: Define isl_drm_modifier_get_score() [v3]
Return the modifier's score, which indicates the driver's preference for the
modifier relative to others. A higher score is better. Zero means
unsupported.
Intended to assist selection of a modifier from an externally provided list,
such as VkImageDrmFormatModifierListCreateInfoEXT.
v2:
- Rename anv_drm_format_mod_score to isl_drm_modifier_get_score.
- Squash all incremental changes to anv_drm_format_mod_score.
v3:
- Drop redundant 'unlikely'. (for nchery)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v3)
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b50275a4b63d3da12ead2f6e57be8988223af83d
Author: Chad Versace <chad at kiwitree.net>
Date: Tue Sep 8 09:44:43 2020 -0700
anv/image: Fix isl_surf_usage_flags for stencil images
Respect VkImageStencilUsageCreateInfoEXT.
CC: mesa-stable at lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=51a19c83b000407a31b5cd17b996084a6b58a4ff
Author: Chad Versace <chad at kiwitree.net>
Date: Tue Aug 4 10:14:11 2020 -0700
anv/image: Check DISJOINT in vkGetPhysicalDeviceImageFormatProperties2 (v2)
The code did not return error when VK_IMAGE_CREATE_DISJOINT_BIT was
incompatible with the other input params.
If the Vulkan spec forbids a set of input params for vkCreateImage,
but permits them for vkGetPhysicalDeviceImageFormatProperties2,
then vkGetPhysicalDeviceImageFormatProperties2 must reject those input
params with failure.
- v2: Clearer commit message.
CC: <mesa-stable at lists.freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
More information about the mesa-commit
mailing list