diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-23 17:08:01 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-23 17:08:01 -0500 |
| commit | ca9f9856bb1da14270d4e784410caeaea65ecbd4 (patch) | |
| tree | 04639ca2a730cd7d0141942405b59a073c3c1e14 /runtime/src | |
| parent | f195a642fa88c2888f99b4e972ccf20ec9085998 (diff) | |
| parent | 3ce953ae806909e03aefbcf6c2866e7430df851e (diff) | |
Merge PR #9569
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/command_list.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/src/command_list.h b/runtime/src/command_list.h index 0d5ae922f..7c5c09e0a 100644 --- a/runtime/src/command_list.h +++ b/runtime/src/command_list.h | |||
| @@ -762,12 +762,13 @@ public: | |||
| 762 | } | 762 | } |
| 763 | 763 | ||
| 764 | // ClearDepthStencilView; the cleared planes must be in depth_write state at execution. | 764 | // ClearDepthStencilView; the cleared planes must be in depth_write state at execution. |
| 765 | // D3D12 requires depth in [0, 1] and at least one clear flag. | 765 | // A D32_FLOAT target keeps the depth exactly as given, outside [0, 1] and NaN included (measured on WARP, |
| 766 | // d3d12_clear_test); a D16 target quantizes it at replay. Flags that name no plane close the list and clear nothing. | ||
| 766 | bool clear_depth_stencil(const TargetView& target, std::uint32_t flags, float depth, std::uint8_t stencil, | 767 | bool clear_depth_stencil(const TargetView& target, std::uint32_t flags, float depth, std::uint8_t stencil, |
| 767 | std::span<const Rect> rects = {}) { | 768 | std::span<const Rect> rects = {}) { |
| 768 | if (!valid(target)) return false; | 769 | if (!valid(target)) return false; |
| 769 | if (!flags || (flags & ~(clear_depth | clear_stencil))) return false; | 770 | if (flags & ~(clear_depth | clear_stencil)) return false; |
| 770 | if ((flags & clear_depth) && !(depth >= 0.0f && depth <= 1.0f)) return false; | 771 | if (!flags) return !closed_; |
| 771 | return append(ClearDepthStencil{target, flags, depth, stencil, {rects.begin(), rects.end()}}); | 772 | return append(ClearDepthStencil{target, flags, depth, stencil, {rects.begin(), rects.end()}}); |
| 772 | } | 773 | } |
| 773 | 774 | ||