downgrade Filament libs to v1.34.2 for Windows
This commit is contained in:
@@ -142,6 +142,13 @@ protected:
|
||||
TargetLanguage targetLanguage;
|
||||
};
|
||||
std::vector<CodeGenParams> mCodeGenPermutations;
|
||||
// For finding properties and running semantic analysis, we always use the same code gen
|
||||
// permutation. This is the first permutation generated with default arguments passed to matc.
|
||||
static constexpr const CodeGenParams mSemanticCodeGenParams = {
|
||||
.shaderModel = ShaderModel::MOBILE,
|
||||
.targetApi = TargetApi::OPENGL,
|
||||
.targetLanguage = TargetLanguage::SPIRV
|
||||
};
|
||||
|
||||
// Keeps track of how many times MaterialBuilder::init() has been called without a call to
|
||||
// MaterialBuilder::shutdown(). Internally, glslang does something similar. We keep track for
|
||||
@@ -231,14 +238,12 @@ public:
|
||||
using TransparencyMode = filament::TransparencyMode;
|
||||
using SpecularAmbientOcclusion = filament::SpecularAmbientOcclusion;
|
||||
|
||||
using AttributeType = filament::backend::UniformType;
|
||||
using UniformType = filament::backend::UniformType;
|
||||
using ConstantType = filament::backend::ConstantType;
|
||||
using SamplerType = filament::backend::SamplerType;
|
||||
using SubpassType = filament::backend::SubpassType;
|
||||
using SamplerFormat = filament::backend::SamplerFormat;
|
||||
using ParameterPrecision = filament::backend::Precision;
|
||||
using Precision = filament::backend::Precision;
|
||||
using CullingMode = filament::backend::CullingMode;
|
||||
using FeatureLevel = filament::backend::FeatureLevel;
|
||||
|
||||
@@ -267,9 +272,6 @@ public:
|
||||
};
|
||||
using PreprocessorDefineList = std::vector<PreprocessorDefine>;
|
||||
|
||||
|
||||
MaterialBuilder& noSamplerValidation(bool enabled) noexcept;
|
||||
|
||||
//! Set the name of this material.
|
||||
MaterialBuilder& name(const char* name) noexcept;
|
||||
|
||||
@@ -576,7 +578,7 @@ public:
|
||||
MaterialBuilder& shaderDefine(const char* name, const char* value) noexcept;
|
||||
|
||||
//! Add a new fragment shader output variable. Only valid for materials in the POST_PROCESS domain.
|
||||
MaterialBuilder& output(VariableQualifier qualifier, OutputTarget target, Precision precision,
|
||||
MaterialBuilder& output(VariableQualifier qualifier, OutputTarget target,
|
||||
OutputType type, const char* name, int location = -1) noexcept;
|
||||
|
||||
MaterialBuilder& enableFramebufferFetch() noexcept;
|
||||
@@ -650,14 +652,13 @@ public:
|
||||
struct Output {
|
||||
Output() noexcept = default;
|
||||
Output(const char* outputName, VariableQualifier qualifier, OutputTarget target,
|
||||
Precision precision, OutputType type, int location) noexcept
|
||||
: name(outputName), qualifier(qualifier), target(target), precision(precision),
|
||||
type(type), location(location) { }
|
||||
OutputType type, int location) noexcept
|
||||
: name(outputName), qualifier(qualifier), target(target), type(type),
|
||||
location(location) { }
|
||||
|
||||
utils::CString name;
|
||||
VariableQualifier qualifier;
|
||||
OutputTarget target;
|
||||
Precision precision;
|
||||
OutputType type;
|
||||
int location;
|
||||
};
|
||||
@@ -718,44 +719,20 @@ public:
|
||||
FeatureLevel getFeatureLevel() const noexcept { return mFeatureLevel; }
|
||||
/// @endcond
|
||||
|
||||
struct Attribute {
|
||||
std::string_view name;
|
||||
AttributeType type;
|
||||
MaterialBuilder::VertexAttribute location;
|
||||
std::string getAttributeName() const noexcept {
|
||||
return "mesh_" + std::string{ name };
|
||||
}
|
||||
std::string getDefineName() const noexcept {
|
||||
std::string uppercase{ name };
|
||||
transform(uppercase.cbegin(), uppercase.cend(), uppercase.begin(), ::toupper);
|
||||
return "HAS_ATTRIBUTE_" + uppercase;
|
||||
}
|
||||
};
|
||||
|
||||
using AttributeDatabase = std::array<Attribute, filament::backend::MAX_VERTEX_ATTRIBUTE_COUNT>;
|
||||
|
||||
static inline AttributeDatabase const& getAttributeDatabase() noexcept {
|
||||
return sAttributeDatabase;
|
||||
}
|
||||
|
||||
private:
|
||||
static const AttributeDatabase sAttributeDatabase;
|
||||
|
||||
void prepareToBuild(MaterialInfo& info) noexcept;
|
||||
|
||||
// Return true if the shader is syntactically and semantically valid.
|
||||
// This method finds all the properties defined in the fragment and
|
||||
// vertex shaders of the material.
|
||||
bool findAllProperties(CodeGenParams const& semanticCodeGenParams) noexcept;
|
||||
bool findAllProperties() noexcept;
|
||||
|
||||
// Multiple calls to findProperties accumulate the property sets across fragment
|
||||
// and vertex shaders in mProperties.
|
||||
bool findProperties(filament::backend::ShaderStage type,
|
||||
MaterialBuilder::PropertyList& allProperties,
|
||||
CodeGenParams const& semanticCodeGenParams) noexcept;
|
||||
MaterialBuilder::PropertyList& p) noexcept;
|
||||
|
||||
bool runSemanticAnalysis(MaterialInfo const& info,
|
||||
CodeGenParams const& semanticCodeGenParams) noexcept;
|
||||
bool runSemanticAnalysis(MaterialInfo const& info) noexcept;
|
||||
|
||||
bool checkLiteRequirements() noexcept;
|
||||
|
||||
@@ -874,8 +851,6 @@ private:
|
||||
PreprocessorDefineList mDefines;
|
||||
|
||||
filament::UserVariantFilterMask mVariantFilter = {};
|
||||
|
||||
bool mNoSamplerValidation = false;
|
||||
};
|
||||
|
||||
} // namespace filamat
|
||||
|
||||
Reference in New Issue
Block a user