@@ -477,13 +477,6 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
477477 // OpenGL: const egl::CEGL::Context*
478478 // Vulkan: const VkDevice*
479479 virtual const void * getNativeHandle () const = 0;
480-
481- // these are the defines which shall be added to any IGPUShader which has its source as GLSL
482- inline core::SRange<const char * const > getExtraShaderDefines () const
483- {
484- const char * const * begin = m_extraShaderDefines.data ();
485- return {begin,begin+m_extraShaderDefines.size ()};
486- }
487480
488481 protected:
489482 ILogicalDevice (core::smart_refctd_ptr<IAPIConnection>&& api, IPhysicalDevice* physicalDevice, const SCreationParams& params)
@@ -563,37 +556,6 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
563556 ) = 0;
564557 virtual core::smart_refctd_ptr<IGPUGraphicsPipeline> createGraphicsPipeline_impl (IGPUPipelineCache* pipelineCache, IGPUGraphicsPipeline::SCreationParams&& params) = 0;
565558 virtual bool createGraphicsPipelines_impl (IGPUPipelineCache* pipelineCache, core::SRange<const IGPUGraphicsPipeline::SCreationParams> params, core::smart_refctd_ptr<IGPUGraphicsPipeline>* output) = 0;
566-
567- void addCommonShaderDefines (std::ostringstream& pool, const bool runningInRenderDoc);
568-
569- template <typename ... Args>
570- inline void addShaderDefineToPool (std::ostringstream& pool, const char * define, Args&&... args)
571- {
572- const ptrdiff_t pos = pool.tellp ();
573- m_extraShaderDefines.push_back (reinterpret_cast <const char *>(pos));
574- pool << define << " " ;
575- ((pool << (std::is_same<uint8_t , Args>::value ? static_cast <uint32_t >(std::forward<Args>(args)) : std::forward<Args>(args))), ...);
576- }
577- inline void finalizeShaderDefinePool (std::ostringstream&& pool)
578- {
579- m_ShaderDefineStringPool.resize (static_cast <size_t >(pool.tellp ())+m_extraShaderDefines.size ());
580- const auto data = ptrdiff_t (m_ShaderDefineStringPool.data ());
581-
582- const auto str = pool.str ();
583- size_t nullCharsWritten = 0u ;
584- for (auto i=0u ; i<m_extraShaderDefines.size (); i++)
585- {
586- auto & dst = m_extraShaderDefines[i];
587- const auto len = (i!=(m_extraShaderDefines.size ()-1u ) ? ptrdiff_t (m_extraShaderDefines[i+1 ]):str.length ())-ptrdiff_t (dst);
588- const char * src = str.data ()+ptrdiff_t (dst);
589- dst += data+(nullCharsWritten++);
590- memcpy (const_cast <char *>(dst),src,len);
591- const_cast <char *>(dst)[len] = 0 ;
592- }
593- }
594-
595- core::vector<char > m_ShaderDefineStringPool;
596- core::vector<const char *> m_extraShaderDefines;
597559
598560 core::smart_refctd_ptr<asset::CCompilerSet> m_compilerSet;
599561 core::smart_refctd_ptr<IAPIConnection> m_api;
0 commit comments