@@ -2108,41 +2108,58 @@ inline void DeviceContextBase<ImplementationTraits>::DvpVerifyRenderTargets() co
21082108 DEV_CHECK_ERR (m_pPipelineState, " No pipeline state is bound" );
21092109
21102110 const auto & PSODesc = m_pPipelineState->GetDesc ();
2111- DEV_CHECK_ERR (PSODesc.IsAnyGraphicsPipeline (),
2111+ DEV_CHECK_ERR (PSODesc.IsAnyGraphicsPipeline () || PSODesc. IsTilePipeline () ,
21122112 " Pipeline state '" , PSODesc.Name , " ' is not a graphics pipeline" );
21132113
2114- TEXTURE_FORMAT BoundRTVFormats[8 ] = {TEX_FORMAT_UNKNOWN};
2115- TEXTURE_FORMAT BoundDSVFormat = TEX_FORMAT_UNKNOWN;
2116-
2114+ TEXTURE_FORMAT BoundRTVFormats[MAX_RENDER_TARGETS] = {};
21172115 for (Uint32 rt = 0 ; rt < m_NumBoundRenderTargets; ++rt)
21182116 {
2119- if (auto * pRT = m_pBoundRenderTargets[rt].RawPtr ())
2117+ if (const auto * pRT = m_pBoundRenderTargets[rt].RawPtr ())
21202118 BoundRTVFormats[rt] = pRT->GetDesc ().Format ;
21212119 else
21222120 BoundRTVFormats[rt] = TEX_FORMAT_UNKNOWN;
21232121 }
2122+ const auto BoundDSVFormat = m_pBoundDepthStencil ? m_pBoundDepthStencil->GetDesc ().Format : TEX_FORMAT_UNKNOWN;
21242123
2125- BoundDSVFormat = m_pBoundDepthStencil ? m_pBoundDepthStencil->GetDesc ().Format : TEX_FORMAT_UNKNOWN;
2124+ Uint32 NumPipelineRenderTargets = 0 ;
2125+ const TEXTURE_FORMAT* PipelineRTVFormats = nullptr ;
2126+ TEXTURE_FORMAT PipelineDSVFormat = TEX_FORMAT_UNKNOWN;
2127+ if (PSODesc.IsAnyGraphicsPipeline ())
2128+ {
2129+ const auto & GraphicsPipeline = m_pPipelineState->GetGraphicsPipelineDesc ();
2130+ NumPipelineRenderTargets = GraphicsPipeline.NumRenderTargets ;
2131+ PipelineRTVFormats = GraphicsPipeline.RTVFormats ;
2132+ PipelineDSVFormat = GraphicsPipeline.DSVFormat ;
2133+ }
2134+ else if (PSODesc.IsTilePipeline ())
2135+ {
2136+ const auto & TilePipeline = m_pPipelineState->GetTilePipelineDesc ();
2137+ NumPipelineRenderTargets = TilePipeline.NumRenderTargets ;
2138+ PipelineRTVFormats = TilePipeline.RTVFormats ;
2139+ }
2140+ else
2141+ {
2142+ UNEXPECTED (" Unexpected pipeline type" );
2143+ }
21262144
2127- const auto & GraphicsPipeline = m_pPipelineState->GetGraphicsPipelineDesc ();
2128- if (GraphicsPipeline.NumRenderTargets != m_NumBoundRenderTargets)
2145+ if (NumPipelineRenderTargets != m_NumBoundRenderTargets)
21292146 {
21302147 LOG_WARNING_MESSAGE (" The number of currently bound render targets (" , m_NumBoundRenderTargets,
21312148 " ) does not match the number of outputs specified by the PSO '" , PSODesc.Name ,
2132- " ' (" , Uint32{GraphicsPipeline. NumRenderTargets } , " )." );
2149+ " ' (" , NumPipelineRenderTargets , " )." );
21332150 }
21342151
2135- if (BoundDSVFormat != GraphicsPipeline. DSVFormat )
2152+ if (BoundDSVFormat != PipelineDSVFormat )
21362153 {
21372154 LOG_WARNING_MESSAGE (" Currently bound depth-stencil buffer format (" , GetTextureFormatAttribs (BoundDSVFormat).Name ,
21382155 " ) does not match the DSV format specified by the PSO '" , PSODesc.Name ,
2139- " ' (" , GetTextureFormatAttribs (GraphicsPipeline. DSVFormat ).Name , " )." );
2156+ " ' (" , GetTextureFormatAttribs (PipelineDSVFormat ).Name , " )." );
21402157 }
21412158
21422159 for (Uint32 rt = 0 ; rt < m_NumBoundRenderTargets; ++rt)
21432160 {
21442161 auto BoundFmt = BoundRTVFormats[rt];
2145- auto PSOFmt = GraphicsPipeline. RTVFormats [rt];
2162+ auto PSOFmt = PipelineRTVFormats [rt];
21462163 if (BoundFmt != PSOFmt)
21472164 {
21482165 LOG_WARNING_MESSAGE (" Render target bound to slot " , rt, " (" , GetTextureFormatAttribs (BoundFmt).Name ,
0 commit comments