diff --git a/engine/shader_backend_test.odin b/engine/shader_backend_test.odin index 68ea4cf..5a9cd1d 100644 --- a/engine/shader_backend_test.odin +++ b/engine/shader_backend_test.odin @@ -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})