MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SetPipelineState

Method SetPipelineState

deps/LLGL/sources/Renderer/Vulkan/VKCommandBuffer.cpp:751–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749/* ----- Pipeline States ----- */
750
751void VKCommandBuffer::SetPipelineState(PipelineState& pipelineState)
752{
753 /* Bind native PSO */
754 auto& pipelineStateVK = LLGL_CAST(VKPipelineState&, pipelineState);
755 vkCmdBindPipeline(commandBuffer_, pipelineStateVK.GetBindPoint(), pipelineStateVK.GetVkPipeline());
756
757 /* Handle special case for graphics PSOs */
758 if (pipelineStateVK.GetBindPoint() == VK_PIPELINE_BIND_POINT_GRAPHICS)
759 {
760 auto& graphicsPSO = LLGL_CAST(VKGraphicsPSO&, pipelineStateVK);
761
762 /* Scissor rectangle must be updated (if scissor test is disabled) */
763 scissorEnabled_ = graphicsPSO.IsScissorEnabled();
764 if (!scissorEnabled_ && scissorRectInvalidated_ && graphicsPSO.HasDynamicScissor())
765 {
766 /* Set scissor to render target resolution */
767 VkRect2D scissorRect;
768 {
769 scissorRect.offset = { 0, 0 };
770 scissorRect.extent = framebufferExtent_;
771 }
772 vkCmdSetScissor(commandBuffer_, 0, 1, &scissorRect);
773
774 /* Avoid scissor update with each graphics pipeline binding (as long as render pass does not change) */
775 scissorRectInvalidated_ = false;
776 }
777 }
778}
779
780void VKCommandBuffer::SetBlendFactor(const ColorRGBAf& color)
781{

Callers 15

DrawMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
RunMethod · 0.45
RunMethod · 0.45
OnDrawFrameMethod · 0.45
OnDrawFrameMethod · 0.45
mainFunction · 0.45

Calls 4

GetVkPipelineMethod · 0.80
HasDynamicScissorMethod · 0.80
GetBindPointMethod · 0.45
IsScissorEnabledMethod · 0.45

Tested by 6

mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36