1
- // Copyright (C) 2018-2020 - DevSH Graphics Programming Sp. z O.O.
1
+ // Copyright (C) 2018-2025 - DevSH Graphics Programming Sp. z O.O.
2
2
// This file is part of the "Nabla Engine".
3
3
// For conditions of distribution and use, see copyright notice in nabla.h
4
4
15
15
#include " nbl/builtin/MTLdefaults.h"
16
16
17
17
18
-
19
18
using namespace nbl ;
20
19
using namespace asset ;
21
20
22
- #define VERT_SHADER_NO_UV_CACHE_KEY " nbl/builtin/shader/loader/mtl/vertex_no_uv.vert"
23
- #define VERT_SHADER_UV_CACHE_KEY " nbl/builtin/shader/loader/mtl/vertex_uv.vert"
24
- #define FRAG_SHADER_NO_UV_CACHE_KEY " nbl/builtin/shader/loader/mtl/fragment_no_uv.frag"
25
- #define FRAG_SHADER_UV_CACHE_KEY " nbl/builtin/shader/loader/mtl/fragment_uv.frag"
26
21
27
- CGraphicsPipelineLoaderMTL::CGraphicsPipelineLoaderMTL (IAssetManager* _am, core::smart_refctd_ptr<system::ISystem>&& sys) :
28
- IRenderpassIndependentPipelineLoader(_am), m_system(std::move(sys))
22
+ CGraphicsPipelineLoaderMTL::CGraphicsPipelineLoaderMTL (IAssetManager* _am, core::smart_refctd_ptr<system::ISystem>&& sys) : m_system(std::move(sys))
29
23
{
30
24
#if 0 // Remove IRenderpassIndependentPipelines and use MC for Mesh Loaders
31
25
//create vertex shaders and insert them into cache
@@ -70,6 +64,7 @@ CGraphicsPipelineLoaderMTL::CGraphicsPipelineLoaderMTL(IAssetManager* _am, core:
70
64
#endif
71
65
}
72
66
67
+ #if 0
73
68
void CGraphicsPipelineLoaderMTL::initialize()
74
69
{
75
70
IRenderpassIndependentPipelineLoader::initialize();
@@ -123,6 +118,7 @@ void CGraphicsPipelineLoaderMTL::initialize()
123
118
124
119
insertBuiltinAssetIntoCache(m_assetMgr, bundle, "nbl/builtin/renderpass_independent_pipeline/loader/mtl/missing_material_pipeline");
125
120
}
121
+ #endif
126
122
127
123
bool CGraphicsPipelineLoaderMTL::isALoadableFileFormat (system::IFile* _file, const system::logger_opt_ptr logger) const
128
124
{
@@ -138,6 +134,8 @@ bool CGraphicsPipelineLoaderMTL::isALoadableFileFormat(system::IFile* _file, con
138
134
139
135
SAssetBundle CGraphicsPipelineLoaderMTL::loadAsset (system::IFile* _file, const IAssetLoader::SAssetLoadParams& _params, IAssetLoader::IAssetLoaderOverride* _override, uint32_t _hierarchyLevel)
140
136
{
137
+ return {};
138
+ #if 0 // Remove IRenderpassIndependentPipelines and use MC for Mesh Loaders
141
139
SContext ctx(
142
140
asset::IAssetLoader::SAssetLoadContext{
143
141
_params,
@@ -196,12 +194,12 @@ SAssetBundle CGraphicsPipelineLoaderMTL::loadAsset(system::IFile* _file, const I
196
194
if (materials.empty())
197
195
return SAssetBundle(nullptr, {});
198
196
return SAssetBundle(std::move(meta),std::move(retval));
197
+ #endif
199
198
}
200
199
200
+ #if 0 // Remove IRenderpassIndependentPipelines and use MC for Mesh Loaders
201
201
core::smart_refctd_ptr<ICPURenderpassIndependentPipeline> CGraphicsPipelineLoaderMTL::makePipelineFromMtl(SContext& _ctx, const SMtl& _mtl, bool hasUV)
202
202
{
203
- return nullptr ;
204
- #if 0 // Remove IRenderpassIndependentPipelines and use MC for Mesh Loaders
205
203
SBlendParams blendParams;
206
204
207
205
std::string cacheKey("nbl/builtin/renderpass_independent_pipeline/loader/mtl/");
@@ -323,8 +321,8 @@ core::smart_refctd_ptr<ICPURenderpassIndependentPipeline> CGraphicsPipelineLoade
323
321
ppln = core::make_smart_refctd_ptr<ICPURenderpassIndependentPipeline>(std::move(layout), shaders, shaders+2u, vtxParams, blendParams, SPrimitiveAssemblyParams{}, SRasterizationParams{});
324
322
}
325
323
return ppln;
326
- #endif
327
324
}
325
+ #endif
328
326
329
327
namespace
330
328
{
@@ -403,6 +401,7 @@ namespace
403
401
}
404
402
}
405
403
404
+ #if 0
406
405
const char* CGraphicsPipelineLoaderMTL::readTexture(const char* _bufPtr, const char* const _bufEnd, SMtl* _currMaterial, const char* _mapType) const
407
406
{
408
407
static const std::unordered_map<std::string, CMTLMetadata::CRenderpassIndependentPipeline::E_MAP_TYPE> str2type =
@@ -912,3 +911,4 @@ auto CGraphicsPipelineLoaderMTL::readMaterials(system::IFile* _file, const syste
912
911
913
912
return materials;
914
913
}
914
+ #endif
0 commit comments