microsoft/compiler: Use image formats to determine texture types
authorJesse Natalie <jenatali@microsoft.com>
Fri, 26 May 2023 17:41:27 +0000 (10:41 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 30 May 2023 17:54:18 +0000 (17:54 +0000)
commit84691dfc460b651b94bc42f102fadde1cd6952f3
tree64cb729fd857717522dd6d5815cd46ffbd1a3a40
parent431557e38e9ee641ce78cb63d6cab03bcad93bb4
microsoft/compiler: Use image formats to determine texture types

Fixes some tests when bindless is disabled, where the image format is
R32, we do atomics on it, but we didn't set the "typed UAV load with
additional formats" feature bit because when we loaded from it, we
only loaded one component. Since the image format on the DXIL side
was declared as U32x4, the DXIL validator said that we should have.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23266>
src/microsoft/compiler/dxil_module.c
src/microsoft/compiler/nir_to_dxil.c