Re: [Mesa-dev] [PATCH] anv: FORMAT_FEATURE_TRANSFER_SRC/DST_BIT_KHR not used with VkFormatProperties.bufferFeatures
Reviewed-by: Jason EkstrandOn Wed, Jun 14, 2017 at 9:55 AM, Andres Gomez wrote: > VK_FORMAT_FEATURE_TRANSFER_[SRC|DST]_BIT_KHR is a flag value of the > VkFormatFeatureFlagBits enum that can only be hold and checked against > the linearTilingFeatures or optimalTilingFeatures members of the > VkFormatProperties struct but not the bufferFeatures member. > > From the Vulkan® 1.0.51, with the VK_KHR_maintenance1 extension, > section 32.3.2 docs for VkFormatProperties: > >"* linearTilingFeatures is a bitmask of VkFormatFeatureFlagBits > specifying features supported by images created with a tiling > parameter of VK_IMAGE_TILING_LINEAR. > > * optimalTilingFeatures is a bitmask of VkFormatFeatureFlagBits > specifying features supported by images created with a tiling > parameter of VK_IMAGE_TILING_OPTIMAL. > > * bufferFeatures is a bitmask of VkFormatFeatureFlagBits > specifying features supported by buffers." > > ... > > Bits which can be set in the VkFormatProperties features > linearTilingFeatures, optimalTilingFeatures, and bufferFeatures > are: > > typedef enum VkFormatFeatureFlagBits { > > ... > > VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x4000, > VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x8000, > > ... > > } VkFormatFeatureFlagBits; > > ... > > The following bits may be set in linearTilingFeatures and > optimalTilingFeatures, specifying that the features are supported > by images or image views created with the queried > vkGetPhysicalDeviceFormatProperties::format: > > ... > > * VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR specifies that an image > can be used as a source image for copy commands. > > * VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR specifies that an image > can be used as a destination image for copy commands and clear > commands." > > Cc: Jason Ekstrand > Cc: Iago Toral Quiroga > Cc: Lionel Landwerlin > Signed-off-by: Andres Gomez > --- > src/intel/vulkan/anv_formats.c | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_ > formats.c > index 104d4f7a5fe..0bc81d12dab 100644 > --- a/src/intel/vulkan/anv_formats.c > +++ b/src/intel/vulkan/anv_formats.c > @@ -378,11 +378,6 @@ get_buffer_format_properties(const struct > gen_device_info *devinfo, > if (format == ISL_FORMAT_R32_SINT || format == ISL_FORMAT_R32_UINT) >flags |= VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT; > > - if (flags) { > - flags |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | > - VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR; > - } > - > return flags; > } > > -- > 2.11.0 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] anv: FORMAT_FEATURE_TRANSFER_SRC/DST_BIT_KHR not used with VkFormatProperties.bufferFeatures
On Thu, 2017-06-15 at 01:13 +0100, Lionel Landwerlin wrote: > Out of curiosity, does this fix a test (maybe upcoming one)? Not really, but realized checking an upcoming test for vk-gl-cts. The test was failing on some conditions because of erroneously checking some FORMAT_FEATURE flags against VkFormatProperties.bufferFeatures. Upon analysis, I also realized that it should also be failing in a similar scenario because of checking FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR against VkFormatProperties.bufferFeatures. It was not failing when running against anv due to the bug corrected here. When this lands, that test will start to (incorrectly) fail also because of the latter case. That test is also being fixed right now to check against the proper members of VkFormatProperties and not bufferFeatures. Hope this helps to understand where this is all coming from. -- Br, Andres ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] anv: FORMAT_FEATURE_TRANSFER_SRC/DST_BIT_KHR not used with VkFormatProperties.bufferFeatures
Out of curiosity, does this fix a test (maybe upcoming one)? Otherwise sounds fair : Reviewed-by: Lionel LandwerlinThanks! On 14/06/17 17:55, Andres Gomez wrote: VK_FORMAT_FEATURE_TRANSFER_[SRC|DST]_BIT_KHR is a flag value of the VkFormatFeatureFlagBits enum that can only be hold and checked against the linearTilingFeatures or optimalTilingFeatures members of the VkFormatProperties struct but not the bufferFeatures member. >From the Vulkan® 1.0.51, with the VK_KHR_maintenance1 extension, section 32.3.2 docs for VkFormatProperties: "* linearTilingFeatures is a bitmask of VkFormatFeatureFlagBits specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_LINEAR. * optimalTilingFeatures is a bitmask of VkFormatFeatureFlagBits specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_OPTIMAL. * bufferFeatures is a bitmask of VkFormatFeatureFlagBits specifying features supported by buffers." ... Bits which can be set in the VkFormatProperties features linearTilingFeatures, optimalTilingFeatures, and bufferFeatures are: typedef enum VkFormatFeatureFlagBits { ... VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x4000, VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x8000, ... } VkFormatFeatureFlagBits; ... The following bits may be set in linearTilingFeatures and optimalTilingFeatures, specifying that the features are supported by images or image views created with the queried vkGetPhysicalDeviceFormatProperties::format: ... * VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR specifies that an image can be used as a source image for copy commands. * VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR specifies that an image can be used as a destination image for copy commands and clear commands." Cc: Jason Ekstrand Cc: Iago Toral Quiroga Cc: Lionel Landwerlin Signed-off-by: Andres Gomez --- src/intel/vulkan/anv_formats.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 104d4f7a5fe..0bc81d12dab 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -378,11 +378,6 @@ get_buffer_format_properties(const struct gen_device_info *devinfo, if (format == ISL_FORMAT_R32_SINT || format == ISL_FORMAT_R32_UINT) flags |= VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT; - if (flags) { - flags |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | - VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR; - } - return flags; } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] anv: FORMAT_FEATURE_TRANSFER_SRC/DST_BIT_KHR not used with VkFormatProperties.bufferFeatures
VK_FORMAT_FEATURE_TRANSFER_[SRC|DST]_BIT_KHR is a flag value of the VkFormatFeatureFlagBits enum that can only be hold and checked against the linearTilingFeatures or optimalTilingFeatures members of the VkFormatProperties struct but not the bufferFeatures member. From the Vulkan® 1.0.51, with the VK_KHR_maintenance1 extension, section 32.3.2 docs for VkFormatProperties: "* linearTilingFeatures is a bitmask of VkFormatFeatureFlagBits specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_LINEAR. * optimalTilingFeatures is a bitmask of VkFormatFeatureFlagBits specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_OPTIMAL. * bufferFeatures is a bitmask of VkFormatFeatureFlagBits specifying features supported by buffers." ... Bits which can be set in the VkFormatProperties features linearTilingFeatures, optimalTilingFeatures, and bufferFeatures are: typedef enum VkFormatFeatureFlagBits { ... VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x4000, VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x8000, ... } VkFormatFeatureFlagBits; ... The following bits may be set in linearTilingFeatures and optimalTilingFeatures, specifying that the features are supported by images or image views created with the queried vkGetPhysicalDeviceFormatProperties::format: ... * VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR specifies that an image can be used as a source image for copy commands. * VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR specifies that an image can be used as a destination image for copy commands and clear commands." Cc: Jason EkstrandCc: Iago Toral Quiroga Cc: Lionel Landwerlin Signed-off-by: Andres Gomez --- src/intel/vulkan/anv_formats.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 104d4f7a5fe..0bc81d12dab 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -378,11 +378,6 @@ get_buffer_format_properties(const struct gen_device_info *devinfo, if (format == ISL_FORMAT_R32_SINT || format == ISL_FORMAT_R32_UINT) flags |= VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT; - if (flags) { - flags |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | - VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR; - } - return flags; } -- 2.11.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev