summaryrefslogtreecommitdiffstats
path: root/RenderScript/include/SamplerParser.h
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-04-14 18:29:09 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-04-14 18:29:09 +0000
commitc09883fbe3951cd77543003ae1c6fdf6e5a11517 (patch)
tree4bbcf4b08d6825f904bb613f3463dcfda7964a61 /RenderScript/include/SamplerParser.h
parentMinor update to comply with updated graphics types (diff)
downloadDiligentTools-c09883fbe3951cd77543003ae1c6fdf6e5a11517.tar.gz
DiligentTools-c09883fbe3951cd77543003ae1c6fdf6e5a11517.zip
Moved primitive topology from draw attribs to pipeline desc; fixed multiple issue with mismatching types used by Lua parsers
Diffstat (limited to 'RenderScript/include/SamplerParser.h')
-rw-r--r--RenderScript/include/SamplerParser.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/RenderScript/include/SamplerParser.h b/RenderScript/include/SamplerParser.h
index 296fdaf..3cc5dc3 100644
--- a/RenderScript/include/SamplerParser.h
+++ b/RenderScript/include/SamplerParser.h
@@ -57,9 +57,9 @@ namespace Diligent
DEFINE_ENUM_ELEMENT_MAPPING( FilterTypeEnumMapping, FILTER_TYPE_MAXIMUM_ANISOTROPIC );
VERIFY( FilterTypeEnumMapping.m_Str2ValMap.size() == FILTER_TYPE_NUM_FILTERS - 1, "Unexpected map size. Did you update FILTER_TYPE enum?" );
VERIFY( FilterTypeEnumMapping.m_Val2StrMap.size() == FILTER_TYPE_NUM_FILTERS - 1, "Unexpected map size. Did you update FILTER_TYPE enum?" );
- DEFINE_ENUM_BINDER( Bindings, StructType, MinFilter, FILTER_TYPE, FilterTypeEnumMapping )
- DEFINE_ENUM_BINDER( Bindings, StructType, MagFilter, FILTER_TYPE, FilterTypeEnumMapping )
- DEFINE_ENUM_BINDER( Bindings, StructType, MipFilter, FILTER_TYPE, FilterTypeEnumMapping )
+ DEFINE_ENUM_BINDER( Bindings, StructType, MinFilter, FilterTypeEnumMapping );
+ DEFINE_ENUM_BINDER( Bindings, StructType, MagFilter, FilterTypeEnumMapping );
+ DEFINE_ENUM_BINDER( Bindings, StructType, MipFilter, FilterTypeEnumMapping );
DEFINE_ENUM_ELEMENT_MAPPING( TexAddrModeEnumMapping, TEXTURE_ADDRESS_WRAP );
@@ -69,23 +69,23 @@ namespace Diligent
DEFINE_ENUM_ELEMENT_MAPPING( TexAddrModeEnumMapping, TEXTURE_ADDRESS_MIRROR_ONCE );
VERIFY( TexAddrModeEnumMapping.m_Str2ValMap.size() == TEXTURE_ADDRESS_NUM_MODES - 1, "Unexpected map size. Did you update TEXTURE_ADDRESS_MODE enum?" );
VERIFY( TexAddrModeEnumMapping.m_Val2StrMap.size() == TEXTURE_ADDRESS_NUM_MODES - 1, "Unexpected map size. Did you update TEXTURE_ADDRESS_MODE enum?" );
- DEFINE_ENUM_BINDER( Bindings, StructType, AddressU, TEXTURE_ADDRESS_MODE, TexAddrModeEnumMapping )
- DEFINE_ENUM_BINDER( Bindings, StructType, AddressV, TEXTURE_ADDRESS_MODE, TexAddrModeEnumMapping )
- DEFINE_ENUM_BINDER( Bindings, StructType, AddressW, TEXTURE_ADDRESS_MODE, TexAddrModeEnumMapping )
+ DEFINE_ENUM_BINDER( Bindings, StructType, AddressU, TexAddrModeEnumMapping );
+ DEFINE_ENUM_BINDER( Bindings, StructType, AddressV, TexAddrModeEnumMapping );
+ DEFINE_ENUM_BINDER( Bindings, StructType, AddressW, TexAddrModeEnumMapping );
- Validator<Float32> DummyValidatorF( SkipValidationFunc<float> );
- DEFINE_BINDER( Bindings, StructType, MipLODBias, Float32, DummyValidatorF )
+ DEFINE_BINDER( Bindings, StructType, MipLODBias );
- Validator<Uint32> MaxAnisotropyValidator( "Max Anisotropy", 0, 32 );
- DEFINE_BINDER( Bindings, StructType, MaxAnisotropy, Uint32, MaxAnisotropyValidator )
+ using MaxAnisotropyType = decltype(StructType::MaxAnisotropy);
+ Validator<MaxAnisotropyType> MaxAnisotropyValidator( "Max Anisotropy", 0, 32 );
+ DEFINE_BINDER_EX( Bindings, StructType, MaxAnisotropy, MaxAnisotropyType, MaxAnisotropyValidator );
- DEFINE_ENUM_BINDER( Bindings, StructType, ComparisonFunc, COMPARISON_FUNCTION, CmpFuncEnumMapping )
+ DEFINE_ENUM_BINDER( Bindings, StructType, ComparisonFunc, CmpFuncEnumMapping );
- DEFINE_BINDER( Bindings, StructType, BorderColor, RGBALoader, 0 )
+ DEFINE_BINDER_EX( Bindings, StructType, BorderColor, RGBALoader, 0 );
- DEFINE_BINDER( Bindings, StructType, MinLOD, Float32, DummyValidatorF )
- DEFINE_BINDER( Bindings, StructType, MaxLOD, Float32, DummyValidatorF )
+ DEFINE_BINDER( Bindings, StructType, MinLOD );
+ DEFINE_BINDER( Bindings, StructType, MaxLOD );
}
class SamplerParser : public EngineObjectParserCommon<ISampler>