24 May
2023
24 May
'23
8:23 p.m.
On Wed May 24 20:23:01 2023 +0000, Henri Verbeet wrote:
For what it's worth, I think this pretty much corresponds to shader model 1-3 texkill. It does, and I was considering saying that we should make it a HLSL op accordingly. On reflection, though, I decided we probably don't, but rather we probably want to do a "raising" peephole. I wouldn't be surprised if there are programs out there that spell out clip() as something like "if (any(x < 0)) discard".
Then again, if I write that out in a shader, native d3dcompiler doesn't seem capable of optimizing that all the way down to texkill()... -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/211#note_33747