File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Graphics/GraphicsEngineVulkan Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,6 @@ class ShaderVkImpl final : public ShaderBase<EngineVkImplTraits>
9292
9393 const std::shared_ptr<const SPIRVShaderResources>& GetShaderResources () const
9494 {
95- // DEV_CHECK_ERR(!IsCompiling(), "Shader resources are not available until the shader is compiled. Use GetStatus() to check the shader status.");
96-
9795 static const std::shared_ptr<const SPIRVShaderResources> NullShaderResource;
9896 // NOTE: while shader is compiled asynchronously, is not available
9997 if (IsCompiling ())
Original file line number Diff line number Diff line change @@ -967,7 +967,6 @@ void PipelineStateVkImpl::InitPipelineLayout(const PipelineStateCreateInfo& Crea
967967void PipelineStateVkImpl::PatchShaderConvertUniformBufferToPushConstant (const PushConstantInfoVk& PushConstantInfo,
968968 TShaderStages& ShaderStages) const noexcept (false )
969969{
970- #if !DILIGENT_NO_HLSL
971970 // If no push constant was selected, no patching needed
972971 if (PushConstantInfo.SignatureIndex == INVALID_PUSH_CONSTANT_INDEX ||
973972 PushConstantInfo.ResourceIndex == INVALID_PUSH_CONSTANT_INDEX)
@@ -1029,6 +1028,7 @@ void PipelineStateVkImpl::PatchShaderConvertUniformBufferToPushConstant(const Pu
10291028
10301029 if (ShouldPatchUniformBuffer)
10311030 {
1031+ #if !DILIGENT_NO_HLSL
10321032 const std::vector<uint32_t >& SPIRV = Stage.SPIRVs [i];
10331033
10341034 std::vector<uint32_t > PatchedSPIRV = PatchSPIRVConvertUniformBufferToPushConstant (
@@ -1045,12 +1045,13 @@ void PipelineStateVkImpl::PatchShaderConvertUniformBufferToPushConstant(const Pu
10451045 LOG_ERROR_MESSAGE (" Failed to convert uniform buffer '" , PushConstantName,
10461046 " ' to push constant in shader '" , pShader->GetDesc ().Name , " '" );
10471047 }
1048+ #else
1049+ LOG_ERROR_AND_THROW (" Cannot patch shader, SPIRV-Tools is not available when DILIGENT_NO_HLSL defined." );
1050+ #endif
10481051 }
10491052 }
10501053 }
1051- #else
1052- // Warning: SPIRV-Tools is not available due to DILIGENT_NO_HLSL defined.
1053- #endif
1054+
10541055}
10551056
10561057template <typename PSOCreateInfoType>
You can’t perform that action at this time.
0 commit comments