MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / register_graphics_pipeline

Method register_graphics_pipeline

framework/resource_record.cpp:96–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96size_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
137void ResourceRecord::set_shader_module(size_t index, const ShaderModule &shader_module)
138{

Callers 2

recordMethod · 0.45
recordMethod · 0.45

Calls 4

writeFunction · 0.85
sizeMethod · 0.80
get_subpass_indexMethod · 0.80
get_render_passMethod · 0.45

Tested by

no test coverage detected