How do I "use GraphicsPipelineState Interface" per this deprecation warning?

I’m trying to clean up some deprecation warnings on some calls into FRHICommandList (SetBlendState, SetRasterState, etc.) which just say “Use GraphicsPipelineState Interface”.

Searching for “GraphicsPipelineState” in the engine documentation returns no results: Suche - Unreal Engine

Same when searching for it in the API documentation: Suche - Unreal Engine

Searching for it on the forums yields the error “The following words are either very common, too long, or too short and were not included in your search:
GraphicsPipelineState” and no search results.

Searching for it on AnswerHub yields no results: Search results for '' - Epic Developer Community Forums

A Google search brought me to the most useless documentation page I’ve ever seen: GraphicsPipelineState | Unreal Engine Documentation

Digging through the engine source for a while brought me to PipelineStateCache.h and .cpp which look… maybe promising? But there are no comments anywhere in any of this code, and since I lack a working knowledge of the overall implementation model on account of not being employed by Epic, I don’t even know where to begin to decipher this.

I could just ignore the deprecation warnings for now (they’re not hurting anything) but I’m really curious how we’re actually intended to resolve this?

As far as I can recall:

  • Create an instance of [FONT=Courier New]FGraphicsPipelineStateInitializer
  • [FONT=Courier New]Context (post/scene).RHICmdList.ApplyCachedRenderTargets(<your instance>)
  • [FONT=Courier New]<your instance>.BlendState = TStaticBlendState< your blend states >::GetRHI( );
  • Batch up more commands as necessary.
  • End the pipeline state setup and set it as the active state using [FONT=Courier New]SetGraphicsPipelineState( <context>.RHICmdList, <your instance of GraphicsPSOInitializer> );
  • Execute rendering calls as-necessary.

… I think.

NOTE: I was looking at a postprocessing sample for this.