diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-04-14 18:29:09 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-04-14 18:29:09 +0000 |
| commit | c09883fbe3951cd77543003ae1c6fdf6e5a11517 (patch) | |
| tree | 4bbcf4b08d6825f904bb613f3463dcfda7964a61 /RenderScript/src/TextureViewParser.cpp | |
| parent | Minor update to comply with updated graphics types (diff) | |
| download | DiligentTools-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/src/TextureViewParser.cpp')
| -rw-r--r-- | RenderScript/src/TextureViewParser.cpp | 55 |
1 files changed, 41 insertions, 14 deletions
diff --git a/RenderScript/src/TextureViewParser.cpp b/RenderScript/src/TextureViewParser.cpp index 1abc373..c80fcc4 100644 --- a/RenderScript/src/TextureViewParser.cpp +++ b/RenderScript/src/TextureViewParser.cpp @@ -52,21 +52,48 @@ namespace Diligent "Unexpected map size. Did you update TEXTURE_VIEW_TYPE enum?" ); VERIFY( m_ViewTypeEnumMapping.m_Val2StrMap.size() == TEXTURE_VIEW_NUM_VIEWS - 1, "Unexpected map size. Did you update TEXTURE_VIEW_TYPE enum?" ); - DEFINE_ENUM_BINDER( m_Bindings, STexViewDescWrapper, ViewType, TEXTURE_VIEW_TYPE, m_ViewTypeEnumMapping ); + DEFINE_ENUM_BINDER( m_Bindings, STexViewDescWrapper, ViewType, m_ViewTypeEnumMapping ); - DEFINE_ENUM_BINDER( m_Bindings, STexViewDescWrapper, TextureDim, RESOURCE_DIMENSION, m_TexTypeEnumMapping ); - DEFINE_ENUM_BINDER( m_Bindings, STexViewDescWrapper, Format, TEXTURE_FORMAT, m_TexFormatEnumMapping ); - - DEFINE_BINDER( m_Bindings, STexViewDescWrapper, MostDetailedMip, Uint32, Validator<Uint32>( "MostDetailedMip", 0, 16384 ) ); - DEFINE_BINDER( m_Bindings, STexViewDescWrapper, NumMipLevels, Uint32, Validator<Uint32>( "NumMipLevels", 1, 16384 ) ); - - // The following two members are in enum - DEFINE_BINDER( m_Bindings, STexViewDescWrapper, FirstArraySlice, Uint32, Validator<Uint32>( "FirstArraySlice", 0, 16384 ) ); - DEFINE_BINDER( m_Bindings, STexViewDescWrapper, FirstDepthSlice, Uint32, Validator<Uint32>( "FirstDepthSlice", 0, 16384 ) ); - - // The following two members are in enum - DEFINE_BINDER( m_Bindings, STexViewDescWrapper, NumArraySlices, Uint32, Validator<Uint32>( "NumArraySlices", 0, 16384 ) ); - DEFINE_BINDER( m_Bindings, STexViewDescWrapper, NumDepthSlices, Uint32, Validator<Uint32>( "NumDepthSlices", 0, 16384 ) ); + DEFINE_ENUM_BINDER( m_Bindings, STexViewDescWrapper, TextureDim, m_TexTypeEnumMapping ); + DEFINE_ENUM_BINDER( m_Bindings, STexViewDescWrapper, Format, m_TexFormatEnumMapping ); + + { + using MostDetailedMipType = decltype(STexViewDescWrapper::MostDetailedMip); + Validator<MostDetailedMipType> MostDetailedMipValidator("MostDetailedMip", 0, 16384); + DEFINE_BINDER_EX( m_Bindings, STexViewDescWrapper, MostDetailedMip, MostDetailedMipType, MostDetailedMipValidator); + } + + { + using NumMipLevelsType = decltype(STexViewDescWrapper::NumMipLevels); + Validator<NumMipLevelsType> NumMipLevelsValidator("NumMipLevels", 1, 16384); + DEFINE_BINDER_EX( m_Bindings, STexViewDescWrapper, NumMipLevels, NumMipLevelsType, NumMipLevelsValidator); + } + + // The following two members are in union + { + using FirstArraySliceType = decltype(STexViewDescWrapper::FirstArraySlice); + Validator<FirstArraySliceType> FirstArraySliceValidator("FirstArraySlice", 0, 16384); + DEFINE_BINDER_EX( m_Bindings, STexViewDescWrapper, FirstArraySlice, FirstArraySliceType, FirstArraySliceValidator); + } + + { + using FirstDepthSliceType = decltype(STexViewDescWrapper::FirstDepthSlice); + Validator<FirstDepthSliceType> FirstDepthSliceValidator("FirstDepthSlice", 0, 16384); + DEFINE_BINDER_EX( m_Bindings, STexViewDescWrapper, FirstDepthSlice, FirstDepthSliceType, FirstDepthSliceValidator); + } + + // The following two members are in union + { + using NumArraySlicesType = decltype(STexViewDescWrapper::NumArraySlices); + Validator<NumArraySlicesType> NumArraySlicesValidator("NumArraySlices", 0, 16384); + DEFINE_BINDER_EX( m_Bindings, STexViewDescWrapper, NumArraySlices, NumArraySlicesType, NumArraySlicesValidator); + } + + { + using NumDepthSlicesType = decltype(STexViewDescWrapper::NumDepthSlices); + Validator<NumDepthSlicesType> NumDepthSlicesValidator("NumDepthSlices", 0, 16384); + DEFINE_BINDER_EX( m_Bindings, STexViewDescWrapper, NumDepthSlices, NumDepthSlicesType, NumDepthSlicesValidator); + } DEFINE_ENUM_ELEMENT_MAPPING( m_UAVAccessFlagEnumMapping, UAV_ACCESS_FLAG_READ ); DEFINE_ENUM_ELEMENT_MAPPING( m_UAVAccessFlagEnumMapping, UAV_ACCESS_FLAG_WRITE ); |
