| 94 | } |
| 95 | |
| 96 | size_t ResourceRecord::register_graphics_pipeline(VkPipelineCache /*pipeline_cache*/, vkb::rendering::PipelineStateC &pipeline_state) |
| 97 | { |
| 98 | graphics_pipeline_indices.push_back(graphics_pipeline_indices.size()); |
| 99 | |
| 100 | auto &pipeline_layout = pipeline_state.get_pipeline_layout(); |
| 101 | auto render_pass = pipeline_state.get_render_pass(); |
| 102 | |
| 103 | write(stream, |
| 104 | ResourceType::GraphicsPipeline, |
| 105 | pipeline_layout_to_index.at(&pipeline_layout), |
| 106 | render_pass_to_index.at(render_pass), |
| 107 | pipeline_state.get_subpass_index()); |
| 108 | |
| 109 | auto &specialization_constant_state = pipeline_state.get_specialization_constant_state().get_specialization_constant_state(); |
| 110 | |
| 111 | write(stream, |
| 112 | specialization_constant_state); |
| 113 | |
| 114 | auto &vertex_input_state = pipeline_state.get_vertex_input_state(); |
| 115 | |
| 116 | write(stream, |
| 117 | vertex_input_state.attributes, |
| 118 | vertex_input_state.bindings); |
| 119 | |
| 120 | write(stream, |
| 121 | pipeline_state.get_input_assembly_state(), |
| 122 | pipeline_state.get_rasterization_state(), |
| 123 | pipeline_state.get_viewport_state(), |
| 124 | pipeline_state.get_multisample_state(), |
| 125 | pipeline_state.get_depth_stencil_state()); |
| 126 | |
| 127 | auto &color_blend_state = pipeline_state.get_color_blend_state(); |
| 128 | |
| 129 | write(stream, |
| 130 | color_blend_state.logic_op, |
| 131 | color_blend_state.logic_op_enable, |
| 132 | color_blend_state.attachments); |
| 133 | |
| 134 | return graphics_pipeline_indices.back(); |
| 135 | } |
| 136 | |
| 137 | void ResourceRecord::set_shader_module(size_t index, const ShaderModule &shader_module) |
| 138 | { |
no test coverage detected