Deric C.
80fa621482
[DirectX] Set shader feature flags MinimumPrecision and NativeLowPrecision, and refactor the logic for setting low-precision-related flags ( #139623 )
...
Fixes #138997 and does refactoring for low-precision-related flags.
The shader feature flags MinimumPrecision and NativeLowPrecision were
not being set, leading to validation errors.
This PR sets these shader feature flags [as in
DXC](377c4ca6d8/lib/DXIL/DxilShaderFlags.cpp (L58-L63) )
and adds tests for them.
This PR also performs some refactoring of low-precision-related flags to
make it less confusing.
- The `UseNativeLowPrecision` DXIL module flag has been renamed to
`NativeLowPrecisionMode` to imply that it is setting some execution
state which the module should be interpreted with
- The LLVM module flag `dx.nativelowprec` is now read only once and sets
a bool to be used by `updateFunctionFlags()` and for setting the DXIL
module flag `NativeLowPrecisionMode`
- The `MinimumPrecision`, `NativeLowPrecision`, and
`LowPrecisionPresent` shader feature flags are all set together under
`updateFunctionFlags()`
- Moved the logic for setting DXIL module flags `NativeLowPrecisionMode`
and `ResMayNotAlias` out of the per-function loop and placed it
alongside the logic for setting other DXIL module flags
(`DisableOptimizations`, `Max64UAVs`, and `UAVsAtEveryStage` flags)
---------
Co-authored-by: Justin Bogner <mail@justinbogner.com>
2025-05-14 10:37:27 -07:00
..
2025-04-15 22:33:27 -07:00
2025-04-24 13:56:34 -07:00
2025-04-23 10:27:09 -06:00
2025-05-12 23:00:00 -07:00
2025-03-20 11:07:54 -07:00
2025-04-24 14:17:11 -06:00
2025-05-14 10:37:27 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-26 13:40:11 -04:00
2024-08-20 16:33:25 -07:00
2024-11-22 10:23:30 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-10-18 21:16:50 +01:00
2024-11-06 11:32:07 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-08 16:56:05 -08:00
2025-03-16 09:47:48 +00:00
2025-03-06 13:18:06 -08:00
2025-01-12 18:52:20 -07:00
2025-03-06 13:18:06 -08:00
2025-01-21 17:33:45 -08:00
2025-02-26 09:43:30 -08:00
2025-02-26 09:43:30 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-02-25 16:09:41 -05:00
2025-01-21 17:33:45 -08:00
2024-10-17 12:54:52 -06:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-03-13 09:29:37 -07:00
2025-03-13 09:29:37 -07:00
2025-03-16 09:47:48 +00:00
2024-10-10 16:34:26 -07:00
2024-11-14 23:34:07 -08:00
2025-02-25 16:09:41 -05:00
2025-04-14 10:34:15 -07:00
2025-04-14 10:34:15 -07:00
2025-04-14 10:34:15 -07:00
2025-04-14 10:34:15 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-08-15 12:16:52 +03:00
2024-08-02 15:13:16 -07:00
2024-09-12 15:53:50 -04:00
2024-11-06 11:32:07 -08:00
2025-01-21 17:33:45 -08:00
2024-09-12 15:53:50 -04:00
2025-04-14 10:34:15 -07:00
2024-10-17 12:54:52 -06:00
2024-12-02 12:08:14 -08:00
2024-10-17 12:54:52 -06:00
2024-10-17 12:54:52 -06:00
2025-01-21 17:33:45 -08:00
2025-01-15 15:36:50 -07:00
2025-01-15 15:36:50 -07:00
2024-11-06 07:31:39 -08:00
2024-11-06 07:31:39 -08:00
2024-11-18 13:56:33 -08:00
2024-12-18 16:33:49 -05:00
2024-08-02 15:13:16 -07:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-10-17 12:54:52 -06:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2024-12-01 22:31:40 -08:00
2025-03-24 16:17:19 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-05-08 09:13:26 -07:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-04-17 09:02:05 -07:00
2025-04-29 16:07:44 -04:00
2025-03-17 20:33:02 -04:00
2025-03-17 20:33:02 -04:00
2025-04-22 14:25:33 -04:00
2025-04-30 17:09:28 -04:00
2024-09-23 19:00:20 -04:00
2024-09-23 19:00:20 -04:00
2024-10-02 15:55:40 -04:00
2024-08-15 12:16:52 +03:00
2025-05-13 15:05:01 -07:00
2025-03-17 20:33:02 -04:00
2024-11-13 16:36:24 -05:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-11-06 11:32:07 -08:00
2025-01-21 17:33:45 -08:00
2025-04-28 12:43:38 -07:00
2024-10-18 21:16:50 +01:00
2025-04-14 10:34:15 -07:00
2024-10-17 12:54:52 -06:00
2025-04-10 16:40:05 -04:00
2024-10-07 10:33:35 -07:00
2025-01-08 16:56:05 -08:00
2025-03-16 09:47:48 +00:00
2025-01-12 18:52:20 -07:00
2025-01-12 18:52:20 -07:00
2025-03-29 00:45:11 -04:00
2025-05-09 15:14:26 -06:00
2025-03-17 20:33:02 -04:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-20 12:46:33 -04:00
2025-04-08 08:54:10 +09:00
2024-12-18 16:33:49 -05:00
2024-11-13 16:36:24 -05:00
2024-12-18 16:33:49 -05:00
2024-11-13 16:36:24 -05:00
2025-03-17 20:33:02 -04:00
2024-10-02 15:55:40 -04:00
2024-08-02 15:13:16 -07:00
2024-09-04 22:12:01 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-11-06 11:32:07 -08:00
2024-09-23 19:00:20 -04:00
2024-10-17 12:54:52 -06:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2024-08-02 15:13:16 -07:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-09-23 19:00:20 -04:00
2025-03-05 17:04:10 -08:00
2025-03-05 17:04:10 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-04-21 10:26:27 -04:00
2025-04-11 14:32:44 -04:00
2024-12-17 17:32:50 -05:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-27 23:26:56 -08:00
2025-01-16 10:35:23 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00