Skip to content

Commit aea2204

Browse files
Erfan-Ahmadideprilula28
authored andcommitted
Revert fix because it is fixed in assetLoader elsewhere and no need to handle it in logical device
Revert "Auxiliary commit to revert individual files from 216b7db" This reverts commit ffbbfe352673dd54a8f6c1e06bde626938245f7f.
1 parent 1a7d23f commit aea2204

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/nbl/video/CVulkanLogicalDevice.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -557,13 +557,6 @@ class CVulkanLogicalDevice final : public ILogicalDevice
557557
}
558558
else
559559
{
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-
567560
auto compiler = m_compilerSet->getShaderCompiler(cpushader->getContentType());
568561

569562
asset::IShaderCompiler::SCompilerOptions commonCompileOptions = {};
@@ -581,14 +574,14 @@ class CVulkanLogicalDevice final : public ILogicalDevice
581574
if (cpushader->getContentType() == asset::ICPUShader::E_CONTENT_TYPE::ECT_HLSL)
582575
{
583576
// TODO: add specific HLSLCompiler::SOption params
584-
spirvShader = m_compilerSet->compileToSPIRV(newCPUShader.get(), commonCompileOptions);
577+
spirvShader = m_compilerSet->compileToSPIRV(cpushader.get(), commonCompileOptions);
585578
}
586579
else if (cpushader->getContentType() == asset::ICPUShader::E_CONTENT_TYPE::ECT_GLSL)
587580
{
588-
spirvShader = m_compilerSet->compileToSPIRV(newCPUShader.get(), commonCompileOptions);
581+
spirvShader = m_compilerSet->compileToSPIRV(cpushader.get(), commonCompileOptions);
589582
}
590583
else
591-
spirvShader = m_compilerSet->compileToSPIRV(newCPUShader.get(), commonCompileOptions);
584+
spirvShader = m_compilerSet->compileToSPIRV(cpushader.get(), commonCompileOptions);
592585

593586
}
594587

0 commit comments

Comments
 (0)