2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-03-05 12:33:02 +00:00

chore: deactivate IW4 material and techset compilation for now

This commit is contained in:
Jan Laupetin
2026-01-23 21:55:27 +00:00
parent 7ab9adc17c
commit bbb282a206
2 changed files with 21 additions and 10 deletions

View File

@@ -9,11 +9,8 @@
#include "Gdt/AbstractGdtEntryReader.h" #include "Gdt/AbstractGdtEntryReader.h"
#include "Gdt/IGdtQueryable.h" #include "Gdt/IGdtQueryable.h"
#include "Pool/GlobalAssetPool.h" #include "Pool/GlobalAssetPool.h"
#include "Techset/CommonTechsetCache.h"
#include "Techset/StateMap/StateMapFromTechniqueExtractor.h"
#include "Techset/StateMap/StateMapHandler.h" #include "Techset/StateMap/StateMapHandler.h"
#include "Techset/TechniqueFileReader.h" #include "Techset/StateMap/TechniqueStateMapCache.h"
#include "Techset/TechniqueStateMapCache.h"
#include "Techset/TechsetCommon.h" #include "Techset/TechsetCommon.h"
#include "Utils/Logging/Log.h" #include "Utils/Logging/Log.h"
@@ -28,6 +25,7 @@ using namespace IW4;
namespace namespace
{ {
/*
class SkipMaterialException final : public std::exception class SkipMaterialException final : public std::exception
{ {
}; };
@@ -1328,6 +1326,7 @@ namespace
std::unique_ptr<techset::ICreatorIW4> m_techset_creator; std::unique_ptr<techset::ICreatorIW4> m_techset_creator;
}; };
*/
class MaterialLoader final : public AssetCreator<AssetMaterial> class MaterialLoader final : public AssetCreator<AssetMaterial>
{ {
@@ -1341,6 +1340,8 @@ namespace
AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override
{ {
return AssetCreationResult::NoAction();
/*
const auto* entry = m_gdt.GetGdtEntryByGdfAndName(ObjConstants::GDF_FILENAME_MATERIAL, assetName); const auto* entry = m_gdt.GetGdtEntryByGdfAndName(ObjConstants::GDF_FILENAME_MATERIAL, assetName);
if (!entry) if (!entry)
return AssetCreationResult::NoAction(); return AssetCreationResult::NoAction();
@@ -1367,6 +1368,7 @@ namespace
} }
return AssetCreationResult::Failure(); return AssetCreationResult::Failure();
*/
} }
private: private:

View File

@@ -6,11 +6,9 @@
#include "Game/IW4/Techset/TechsetConstantsIW4.h" #include "Game/IW4/Techset/TechsetConstantsIW4.h"
#include "Shader/D3D9ShaderAnalyser.h" #include "Shader/D3D9ShaderAnalyser.h"
#include "Shader/ShaderCommon.h" #include "Shader/ShaderCommon.h"
#include "Techset/CommonTechsetCache.h"
#include "Techset/CommonTechsetLoader.h" #include "Techset/CommonTechsetLoader.h"
#include "Techset/StateMap/StateMapReader.h" #include "Techset/StateMap/StateMapReader.h"
#include "Techset/TechniqueFileReader.h" #include "Techset/StateMap/TechniqueStateMapCache.h"
#include "Techset/TechniqueStateMapCache.h"
#include "Techset/TechsetCommon.h" #include "Techset/TechsetCommon.h"
#include "Utils/Alignment.h" #include "Utils/Alignment.h"
#include "Utils/Logging/Log.h" #include "Utils/Logging/Log.h"
@@ -32,6 +30,7 @@ using namespace std::string_literals;
namespace namespace
{ {
/*
class LoadedTechnique class LoadedTechnique
{ {
public: public:
@@ -407,7 +406,7 @@ namespace
if (arg1.m_arg.type == MTL_ARG_MATERIAL_VERTEX_CONST || arg1.m_arg.type == MTL_ARG_MATERIAL_PIXEL_CONST if (arg1.m_arg.type == MTL_ARG_MATERIAL_VERTEX_CONST || arg1.m_arg.type == MTL_ARG_MATERIAL_PIXEL_CONST
|| arg1.m_arg.type == MTL_ARG_MATERIAL_PIXEL_SAMPLER) || arg1.m_arg.type == MTL_ARG_MATERIAL_PIXEL_SAMPLER)
return arg1.m_arg.u.codeSampler < arg2.m_arg.u.codeSampler; return arg1.m_arg.u.nameHash < arg2.m_arg.u.nameHash;
return arg1.m_arg.dest < arg2.m_arg.dest; return arg1.m_arg.dest < arg2.m_arg.dest;
}); });
@@ -1263,7 +1262,7 @@ namespace
TechniqueZoneLoadingState& m_zone_state; TechniqueZoneLoadingState& m_zone_state;
techset::ICreatorIW4* m_techset_creator; techset::ICreatorIW4* m_techset_creator;
}; };
*/
class TechsetLoader final : public techset::ICreatorIW4 class TechsetLoader final : public techset::ICreatorIW4
{ {
public: public:
@@ -1275,15 +1274,18 @@ namespace
AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override
{ {
return AssetCreationResult::NoAction();
/*
bool failure = false; bool failure = false;
const auto* techsetDefinition = LoadTechsetDefinition(assetName, context, failure); const auto* techsetDefinition = LoadTechsetDefinition(assetName, context, failure);
if (!techsetDefinition) if (!techsetDefinition)
return failure ? AssetCreationResult::Failure() : AssetCreationResult::NoAction(); return failure ? AssetCreationResult::Failure() : AssetCreationResult::NoAction();
return CreateTechsetFromDefinition(assetName, *techsetDefinition, context); return CreateTechsetFromDefinition(assetName, *techsetDefinition, context);
*/
} }
private: /*
AssetCreationResult CreateTechsetFromDefinition(const std::string& assetName, const CommonTechset& definition, AssetCreationContext& context) AssetCreationResult CreateTechsetFromDefinition(const std::string& assetName, const CommonTechset& definition, AssetCreationContext& context)
{ {
auto* techset = m_memory.Alloc<MaterialTechniqueSet>(); auto* techset = m_memory.Alloc<MaterialTechniqueSet>();
@@ -1311,9 +1313,11 @@ namespace
return AssetCreationResult::Success(context.AddAsset(std::move(registration))); return AssetCreationResult::Success(context.AddAsset(std::move(registration)));
} }
*/
CommonTechset* LoadTechsetDefinition(const std::string& assetName, AssetCreationContext& context, bool& failure) override CommonTechset* LoadTechsetDefinition(const std::string& assetName, AssetCreationContext& context, bool& failure) override
{ {
/*
failure = false; failure = false;
auto& definitionCache = context.GetZoneAssetCreationState<CommonTechsetCache>(); auto& definitionCache = context.GetZoneAssetCreationState<CommonTechsetCache>();
auto* cachedTechsetDefinition = definitionCache.GetCachedTechsetDefinition(assetName); auto* cachedTechsetDefinition = definitionCache.GetCachedTechsetDefinition(assetName);
@@ -1334,10 +1338,13 @@ namespace
definitionCache.AddCommonTechsetToCache(assetName, std::move(techsetDefinition)); definitionCache.AddCommonTechsetToCache(assetName, std::move(techsetDefinition));
return techsetDefinitionPtr; return techsetDefinitionPtr;
*/
return nullptr;
} }
const state_map::StateMapDefinition* LoadStateMapDefinition(const std::string& stateMapName, AssetCreationContext& context) override const state_map::StateMapDefinition* LoadStateMapDefinition(const std::string& stateMapName, AssetCreationContext& context) override
{ {
/*
auto& stateMapCache = context.GetZoneAssetCreationState<TechniqueStateMapCache>(); auto& stateMapCache = context.GetZoneAssetCreationState<TechniqueStateMapCache>();
auto* cachedStateMap = stateMapCache.GetCachedStateMap(stateMapName); auto* cachedStateMap = stateMapCache.GetCachedStateMap(stateMapName);
if (cachedStateMap) if (cachedStateMap)
@@ -1358,6 +1365,8 @@ namespace
stateMapCache.AddStateMapToCache(std::move(stateMapDefinition)); stateMapCache.AddStateMapToCache(std::move(stateMapDefinition));
return stateMapDefinitionPtr; return stateMapDefinitionPtr;
*/
return nullptr;
} }
private: private: