MCPcopy Create free account
hub / github.com/RevoSucks/BM64Recomp / end

Method end

src/ui/ui_renderer.cpp:624–658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622 }
623
624 void end(plume::RenderCommandList* list, plume::RenderFramebuffer* framebuffer) {
625 // Draw the texture were rendered the UI in to the swap chain framebuffer if MSAA is enabled.
626 if (multisampling_.sampleCount > 1) {
627 plume::RenderTextureBarrier before_resolve_barriers[] = {
628 plume::RenderTextureBarrier(screen_texture_ms_.get(), plume::RenderTextureLayout::RESOLVE_SOURCE),
629 plume::RenderTextureBarrier(screen_texture_.get(), plume::RenderTextureLayout::RESOLVE_DEST)
630 };
631
632 list->barriers(plume::RenderBarrierStage::COPY, before_resolve_barriers, uint32_t(std::size(before_resolve_barriers)));
633 list->resolveTexture(screen_texture_.get(), screen_texture_ms_.get());
634 list->barriers(plume::RenderBarrierStage::GRAPHICS, plume::RenderTextureBarrier(screen_texture_.get(), plume::RenderTextureLayout::SHADER_READ));
635 list->setFramebuffer(framebuffer);
636 list->setPipeline(pipeline_.get());
637 list->setGraphicsPipelineLayout(layout_.get());
638 list->setGraphicsDescriptorSet(sampler_set_.get(), 0);
639 list->setGraphicsDescriptorSet(screen_descriptor_set_.get(), 1);
640 list->setScissors(plume::RenderRect{ 0, 0, window_width_, window_height_ });
641 plume::RenderVertexBufferView vertex_view(screen_vertex_buffer_.get(), screen_vertex_buffer_size_);
642 list->setVertexBuffers(0, &vertex_view, 1, &vertex_slot_);
643
644 RmlPushConstants constants{
645 .transform = Rml::Matrix4f::Identity(),
646 .translation = Rml::Vector2f(0.0f, 0.0f)
647 };
648
649 list_->setGraphicsPushConstants(0, &constants);
650 list->drawInstanced(3, 1, 0, 0);
651 }
652
653 end_dynamic_buffer(upload_buffer_);
654 end_dynamic_buffer(vertex_buffer_);
655 end_dynamic_buffer(index_buffer_);
656
657 list_ = nullptr;
658 }
659
660 void queue_image_from_bytes_file(const std::string &src, const std::vector<char> &bytes) {
661 // Width and height aren't used for file images, so set them to 0.

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected