Harbor

Changelog c12bad10727f

plan generated texture glyph draws

@sky · 1 month ago · parent 18366cc40be3
0 added 3 modified 0 deleted
frame_api.odin modified

Diff hidden because this file has more than 800 lines.

tests/compiler_executor_test.odin +31 -0 modified
455 unchanged lines hidden
456 456 }
457 457
458 458 @(test)
459 + test_compiler_rejects_raw_planned_draw_with_diagnostic :: proc(t: ^testing.T) {
460 + rec := recording_backend_init()
461 + defer recording_backend_destroy(&rec)
462 + frame := ir.init_frame_ir()
463 + defer ir.destroy_frame_ir(&frame)
464 +
465 + raw := ir.add_buffer(&frame, "raw", 0, {}, {}, .Transient)
466 + command := ir.add_draw_packet(
467 + &frame,
468 + ir.INVALID_PASS,
469 + ir.INVALID_PIPELINE,
470 + .Raw,
471 + {
472 + geometry = {kind = .Raw, resource = raw},
473 + order = .Strict,
474 + },
475 + )
476 +
477 + backend := recording_backend_use(&rec)
478 + state := compiler.init_execution_state(&backend)
479 + defer compiler.destroy_execution_state(&state)
480 + diagnostics := ir.init_diagnostics()
481 + defer ir.destroy_diagnostics(&diagnostics)
482 +
483 + testing.expect(t, !compiler.execute_prepared_planned_commands(&state, &frame, {}, {0, 0, 0, 1}, &diagnostics))
484 + testing.expect_value(t, len(diagnostics.items), 1)
485 + testing.expect_value(t, diagnostics.items[0].code, ir.Diagnostic_Code.Unsupported)
486 + testing.expect_value(t, diagnostics.items[0].command, command)
487 + }
488 +
489 + @(test)
459 490 test_compiler_executes_planned_vertex_stream_draw :: proc(t: ^testing.T) {
460 491 rec := recording_backend_init()
461 492 defer recording_backend_destroy(&rec)
127 unchanged lines hidden
tests/frame_api_test.odin modified

Diff hidden because this file has more than 800 lines.