Test DXIL shader runtime preference without MSL

This commit is contained in:
2026-08-14 22:19:16 -07:00
committed by GitHub
+9
View File
@@ -27,6 +27,15 @@ choose_shader_runtime_prefers_msl :: proc(t: ^testing.T) {
testing.expect_value(t, rt.format, sdl.GPUShaderFormat{.MSL})
}
@(test)
choose_shader_runtime_prefers_dxil_without_msl :: proc(t: ^testing.T) {
rt, ok := choose_shader_runtime_from_formats({.DXIL, .SPIRV})
testing.expect(t, ok, "should pick a runtime when DXIL is available")
testing.expect_value(t, rt.backend, Shader_Backend.DSD12_DXIL)
testing.expect_value(t, rt.shader_dir, "shaders/d3d12")
testing.expect_value(t, rt.format, sdl.GPUShaderFormat{.DXIL})
}
@(test)
choose_shader_runtime_spirv_only :: proc(t: ^testing.T) {
rt, ok := choose_shader_runtime_from_formats({.SPIRV})