Bug 102024

Summary: FORMAT_FEATURE_SAMPLED_IMAGE_BIT not supported for D16_UNORM and D32_SFLOAT
Product: Mesa Reporter: pierre.krieger1708
Component: Drivers/Vulkan/intelAssignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: jason
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description pierre.krieger1708 2017-08-03 08:42:40 UTC
According to section `32.3.3. Required Format Support` of the Vulkan specs, the `VK_FORMAT_D32_SFLOAT` and `VK_FORMAT_D16_UNORM` formats must support the `VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT` usage.

However the driver doesn't report this usage on my Ivy Bridge (Intel Core i5-3210M).

More generally the driver doesn't report any depth/stencil format that supports `SAMPLED_IMAGE_BIT`, which makes it a bit limiting for shadowmaps for example.
Comment 1 Jason Ekstrand 2017-08-04 03:06:14 UTC
Patch on the list:

https://patchwork.freedesktop.org/patch/170291/
Comment 2 Jason Ekstrand 2017-08-07 16:01:09 UTC
Fixed by the following commit in master:

commit 06d3115bb97740a4c8f36c645944a8bd0bde3f68
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Thu Aug 3 19:58:24 2017 -0700

    anv/formats: Allow sampling on depth-only formats on gen7
    
    We can't sample from depth-stencil formats but on gen7 but we can sample
    from depth-only formats.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102024
    Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
    Cc: mesa-stable@lists.freedesktop.org

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.