@@ -557,13 +557,6 @@ class CVulkanLogicalDevice final : public ILogicalDevice
557
557
}
558
558
else
559
559
{
560
- const char * begin = static_cast <const char *>(source->getPointer ());
561
- const char * end = begin + source->getSize ();
562
- std::string code (begin, end);
563
-
564
- auto newCodeBuffer = core::make_smart_refctd_ptr<asset::CDummyCPUBuffer>(code.size () + 1u , code.data (), core::adopt_memory);
565
- auto newCPUShader = core::make_smart_refctd_ptr<asset::ICPUShader>(std::move (newCodeBuffer), cpushader->getStage (), cpushader->getContentType (), std::string (cpushader->getFilepathHint ()));
566
-
567
560
auto compiler = m_compilerSet->getShaderCompiler (cpushader->getContentType ());
568
561
569
562
asset::IShaderCompiler::SCompilerOptions commonCompileOptions = {};
@@ -581,14 +574,14 @@ class CVulkanLogicalDevice final : public ILogicalDevice
581
574
if (cpushader->getContentType () == asset::ICPUShader::E_CONTENT_TYPE::ECT_HLSL)
582
575
{
583
576
// TODO: add specific HLSLCompiler::SOption params
584
- spirvShader = m_compilerSet->compileToSPIRV (newCPUShader .get (), commonCompileOptions);
577
+ spirvShader = m_compilerSet->compileToSPIRV (cpushader .get (), commonCompileOptions);
585
578
}
586
579
else if (cpushader->getContentType () == asset::ICPUShader::E_CONTENT_TYPE::ECT_GLSL)
587
580
{
588
- spirvShader = m_compilerSet->compileToSPIRV (newCPUShader .get (), commonCompileOptions);
581
+ spirvShader = m_compilerSet->compileToSPIRV (cpushader .get (), commonCompileOptions);
589
582
}
590
583
else
591
- spirvShader = m_compilerSet->compileToSPIRV (newCPUShader .get (), commonCompileOptions);
584
+ spirvShader = m_compilerSet->compileToSPIRV (cpushader .get (), commonCompileOptions);
592
585
593
586
}
594
587
0 commit comments