Skip to content

Commit

Permalink
Render state cache: correct graphics PSO desc before serializing it
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Aug 23, 2023
1 parent 624d9ff commit 3bbd476
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Graphics/GraphicsTools/src/RenderStateCache.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,6 +42,7 @@

#include "ObjectBase.hpp"
#include "ShaderBase.hpp"
#include "PipelineStateBase.hpp"
#include "RefCntAutoPtr.hpp"
#include "SerializationDevice.h"
#include "SerializedShader.h"
Expand Down Expand Up @@ -911,6 +912,8 @@ struct RenderStateCacheImpl::SerializedPsoCIWrapper<GraphicsPipelineStateCreateI
SerializedPsoCIWrapper(ISerializationDevice* pSerializationDevice, RENDER_DEVICE_TYPE DeviceType, const GraphicsPipelineStateCreateInfo& _CI) :
SerializedPsoCIWrapperBase<GraphicsPipelineStateCreateInfo>{pSerializationDevice, DeviceType, _CI}
{
CorrectGraphicsPipelineDesc(CI.GraphicsPipeline, pSerializationDevice->GetDeviceInfo().Features);

// Replace render pass with serialized render pass
if (CI.GraphicsPipeline.pRenderPass != nullptr)
{
Expand Down

0 comments on commit 3bbd476

Please sign in to comment.