Harbor

Changelog 3536a6851b77

pin capability limits

@sky · 1 month ago · parent 7f752ff3403c
0 added 2 modified 0 deleted
gpu/compiler/executor.odin modified

Diff hidden because this file has more than 800 lines.

gpu/tests/compiler_executor_test.odin +4 -2 modified
125 unchanged lines hidden
126 126 }
127 127
128 128 @(test)
129 - test_compiler_rejects_mrt_until_backend_contract_supports_it :: proc(t: ^testing.T) {
129 + test_compiler_rejects_color_targets_over_capability_limit :: proc(t: ^testing.T) {
130 130 frame := ir.init_frame_ir()
131 131 defer ir.destroy_frame_ir(&frame)
132 132
3 unchanged lines hidden
136 136 testing.expect(t, ir.pass_add_color_target(&pass, ir.make_color_target(color_a, .B8G8R8A8_SRGB)))
137 137 testing.expect(t, ir.pass_add_color_target(&pass, ir.make_color_target(color_b, .B8G8R8A8_SRGB)))
138 138
139 - _, ok := compiler.build_render_pass_desc(&frame, &pass)
139 + caps := bk.implemented_base_capabilities(1, 0)
140 + testing.expect(t, !bk.supports_color_target_count(caps, u32(pass.color_target_count)))
141 + _, ok := compiler.build_render_pass_desc_with_capabilities(&frame, &pass, caps)
140 142 testing.expect(t, !ok)
141 143 }
142 144
63 unchanged lines hidden