Harbor

Changelog fb057e546116

record instance vertex layout proof

@sky · 1 month ago · parent 5f573b776da0
0 added 2 modified 0 deleted
tests/compiler_executor_test.odin modified

Diff hidden because this file has more than 800 lines.

tests/recording_backend.odin +15 -0 modified
63 unchanged lines hidden
64 64 color_formats: [bk.MAX_COLOR_TARGETS]bk.Format,
65 65 color_views: [bk.MAX_COLOR_TARGETS]bk.Texture_Handle,
66 66 clear_colors: [bk.MAX_COLOR_TARGETS][4]f32,
67 + vertex_binding_count: u32,
68 + vertex_bindings: [16]bk.Vertex_Binding,
69 + vertex_attribute_count: u32,
70 + vertex_attributes: [16]bk.Vertex_Attribute,
67 71
68 72 push_constant_size: u32,
69 73 push_constant_bytes: [compiler.IMPORTED_PUSH_CONSTANT_CAP]u8,
326 unchanged lines hidden
396 400 pipeline = handle,
397 401 color_count = desc.color_attachment_count,
398 402 color_formats = desc.color_formats,
403 + vertex_binding_count = u32(len(desc.vertex_bindings)),
404 + vertex_attribute_count = u32(len(desc.vertex_attributes)),
399 405 })
406 + call := &rec.calls[len(rec.calls) - 1]
407 + for binding, i in desc.vertex_bindings {
408 + if i >= len(call.vertex_bindings) {break}
409 + call.vertex_bindings[i] = binding
410 + }
411 + for attr, i in desc.vertex_attributes {
412 + if i >= len(call.vertex_attributes) {break}
413 + call.vertex_attributes[i] = attr
414 + }
400 415 return handle, true
401 416 }
402 417
240 unchanged lines hidden