Skip to content

microsoft/compiler: Fix texture/image variable decls to have a more-correct number of components

Jesse Natalie requested to merge jenatali/mesa:dxil-image-components into main

If we have image format information, use that. If we don't, make some up based on how the texture/image is used. Multi-component loads/stores indicate a multi-component format, atomics force single-component formats. We use var->data.image.format to store the type info, but all we really care about is a number of components.

This fixes some validation when doing single-component loads of a resource that we declared as multi-component, because now we set the DXIL feature flag based on the number of components in the texture rather than the individual load instruction, which matches how DXIL validation expects it to be set. This fixes some Vulkan CTS tests when bindless support isn't available.

Edited by Jesse Natalie

Merge request reports