sysgpu: implement select() intrinsic for HLSL, MSL, and SPIR-V #1436
No reviewers
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach!1436
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Crispigt/sysgpu/hlsl-select"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR implements the
select()intrinsic for HLSL, MSL, and SPIR-V. It also fixes a missing boolean implementation in MSL.Fixes a panic when compiling shaders using WGSL
select().(cond ? true : false).metal::select(false, true, cond).emitBoolfor MSL (was previously commented out and not implemented), required forselectconditions using literals.OpSelect(OpCode 69).Left GLSL unimplemented for now as the test suite appears commented out in
test.zig, so I figured I wouldn't implement it.Tested Verified output generation locally for HLSL, MSL, and SPIR-V using a simple test case.
Validated runtime behavior for HLSL and SPIR-V, by rendering a checkered triangle (using
selectin the fragment shader) on Windows 11 with an AMD Radeon RX 7900 XTX.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.