diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 18ec849d..780e75a1 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -52,7 +52,7 @@ jobs: shell: bash working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} run: | - cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/external/vcpkg/scripts/buildsystems/vcpkg.cmake -DSDW_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/shaderwriter -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE -DSDW_GENERATE_SOURCE=OFF -DSDW_BUILD_TESTS=ON -DSDW_TESTS_ENABLE_VALIDATION=OFF -DSDW_ALL_TESTS=OFF + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} --preset ci -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE - name: Build if: (steps.configure.conclusion == 'success') id: build @@ -72,7 +72,7 @@ jobs: shell: bash run: | cmake --install . --config ${{ matrix.buildType }} - 7z a $GITHUB_WORKSPACE/ShaderWriter-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/shaderwriter/ + 7z a $GITHUB_WORKSPACE/ShaderWriter-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/ShaderWriter/ - name: Clean build folder if: (steps.build.conclusion == 'success') working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} @@ -125,7 +125,7 @@ jobs: shell: bash working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} run: | - cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/external/vcpkg/scripts/buildsystems/vcpkg.cmake -DSDW_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/shaderwriter -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE -DSDW_GENERATE_SOURCE=OFF -DSDW_BUILD_TESTS=ON -DSDW_TESTS_ENABLE_VALIDATION=OFF -DSDW_ALL_TESTS=OFF + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} --preset ci -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE - name: Build if: (steps.configure.conclusion == 'success') id: build @@ -139,7 +139,7 @@ jobs: shell: bash run: | cmake --install . --config ${{ matrix.buildType }} - 7z a $GITHUB_WORKSPACE/ShaderWriter-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/shaderwriter/ + 7z a $GITHUB_WORKSPACE/ShaderWriter-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/ShaderWriter/ - name: Clean build folder if: (steps.build.conclusion == 'success') working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} @@ -199,7 +199,7 @@ jobs: shell: bash working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} run: | - cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/external/vcpkg/scripts/buildsystems/vcpkg.cmake -DSDW_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/shaderwriter -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE -DSDW_GENERATE_SOURCE=OFF -DSDW_BUILD_TESTS=ON -DSDW_TESTS_ENABLE_VALIDATION=OFF -DSDW_ALL_TESTS=OFF + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} --preset ci -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE - name: Build if: (steps.configure.conclusion == 'success') id: build @@ -219,7 +219,7 @@ jobs: shell: bash run: | cmake --install . --config ${{ matrix.buildType }} - 7z a $GITHUB_WORKSPACE/ShaderWriter-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/shaderwriter/ + 7z a $GITHUB_WORKSPACE/ShaderWriter-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/ShaderWriter/ - name: Clean build folder if: (steps.build.conclusion == 'success') working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} diff --git a/CMakePresets.json b/CMakePresets.json index 2a9c0773..cf0e54f2 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -74,6 +74,31 @@ "description": "Build configuration using Ninja, for ShaderWriter developers", "inherits": "dev-base", "generator": "Ninja" + }, + { + "name": "ci", + "installDir": "${sourceDir}/package/ShaderWriter", + "displayName": "ShaderWriter CI Config", + "description": "Build configuration using Ninja, for ShaderWriter CI", + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/external/vcpkg/scripts/buildsystems/vcpkg.cmake", + "SDW_ALL_TESTS": false, + "SDW_BUILD_EXPORTERS": true, + "SDW_BUILD_EXPORTER_GLSL": true, + "SDW_BUILD_EXPORTER_HLSL": true, + "SDW_BUILD_EXPORTER_SPIRV": true, + "SDW_BUILD_TESTS": true, + "SDW_BUILD_VULKAN_LAYER": true, + "SDW_BUILD_STATIC_EXPORTERS": false, + "SDW_BUILD_STATIC_SDAST": false, + "SDW_BUILD_STATIC_SDW": false, + "SDW_BUILD_STATIC": false, + "SDW_GENERATE_SOURCE": false, + "SDW_TESTS_ENABLE_VALIDATION": false, + "SDW_UNITY_BUILD": true, + "PROJECTS_WARNINGS_AS_ERRORS": true, + "PROJECTS_OUTPUT_DIR": "${sourceDir}" + } } ] } diff --git a/include/ShaderAST/Expr/ExprCache.hpp b/include/ShaderAST/Expr/ExprCache.hpp index bd67d9b7..3044ffb0 100644 --- a/include/ShaderAST/Expr/ExprCache.hpp +++ b/include/ShaderAST/Expr/ExprCache.hpp @@ -22,7 +22,7 @@ namespace ast::expr class ExprCache { public: - SDAST_API ExprCache( ShaderAllocatorBlock & allocator ); + SDAST_API explicit ExprCache( ShaderAllocatorBlock & allocator ); SDAST_API ~ExprCache() = default; SDAST_API AddPtr makeAdd( type::TypePtr type, ExprPtr lhs, ExprPtr rhs ); diff --git a/include/ShaderAST/ShaderAllocator.hpp b/include/ShaderAST/ShaderAllocator.hpp index a42692b8..f24bf9bf 100644 --- a/include/ShaderAST/ShaderAllocator.hpp +++ b/include/ShaderAST/ShaderAllocator.hpp @@ -7,7 +7,9 @@ See LICENSE file in root folder #include "ShaderASTPrerequisites.hpp" +#include #include +#include #include namespace ast @@ -122,7 +124,7 @@ namespace ast friend class ShaderAllocatorBlock; public: - SDAST_API ShaderAllocator( AllocationMode allocationMode = AllocationMode::eFragmented ); + SDAST_API explicit ShaderAllocator( AllocationMode allocationMode = AllocationMode::eFragmented ); SDAST_API ~ShaderAllocator() = default; SDAST_API void * allocate( size_t size ); diff --git a/include/ShaderAST/Stmt/PreprocEndif.hpp b/include/ShaderAST/Stmt/PreprocEndif.hpp index 59b4fa77..462a3d9b 100644 --- a/include/ShaderAST/Stmt/PreprocEndif.hpp +++ b/include/ShaderAST/Stmt/PreprocEndif.hpp @@ -13,7 +13,7 @@ namespace ast::stmt : public Stmt { public: - SDAST_API PreprocEndif( StmtCache & stmtCache ); + SDAST_API explicit PreprocEndif( StmtCache & stmtCache ); SDAST_API void accept( VisitorPtr vis )override; }; diff --git a/include/ShaderAST/Stmt/StmtCache.hpp b/include/ShaderAST/Stmt/StmtCache.hpp index 2c3ac23f..c1868d53 100644 --- a/include/ShaderAST/Stmt/StmtCache.hpp +++ b/include/ShaderAST/Stmt/StmtCache.hpp @@ -19,7 +19,7 @@ namespace ast::stmt class StmtCache { public: - SDAST_API StmtCache( ShaderAllocatorBlock & allocator ); + SDAST_API explicit StmtCache( ShaderAllocatorBlock & allocator ); SDAST_API ~StmtCache() = default; SDAST_API PreprocDefinePtr makePreprocDefine( EntityName nameId, std::string name, expr::ExprPtr expr ); diff --git a/include/ShaderAST/Stmt/StmtCompound.hpp b/include/ShaderAST/Stmt/StmtCompound.hpp index 5dcd81bf..c5c83b32 100644 --- a/include/ShaderAST/Stmt/StmtCompound.hpp +++ b/include/ShaderAST/Stmt/StmtCompound.hpp @@ -13,12 +13,12 @@ namespace ast::stmt : public Container { protected: - SDAST_API explicit Compound( StmtCache & stmtCache + SDAST_API Compound( StmtCache & stmtCache , size_t size , Kind kind ); public: - SDAST_API Compound( StmtCache & stmtCache ); + SDAST_API explicit Compound( StmtCache & stmtCache ); SDAST_API void accept( VisitorPtr vis )override; }; diff --git a/include/ShaderAST/Stmt/StmtContainer.hpp b/include/ShaderAST/Stmt/StmtContainer.hpp index 39b88586..c521e762 100644 --- a/include/ShaderAST/Stmt/StmtContainer.hpp +++ b/include/ShaderAST/Stmt/StmtContainer.hpp @@ -13,7 +13,7 @@ namespace ast::stmt : public Stmt { protected: - SDAST_API explicit Container( StmtCache & stmtCache + SDAST_API Container( StmtCache & stmtCache , size_t size , Kind kind ); diff --git a/include/ShaderAST/Stmt/StmtContinue.hpp b/include/ShaderAST/Stmt/StmtContinue.hpp index f0111703..bb3ecc86 100644 --- a/include/ShaderAST/Stmt/StmtContinue.hpp +++ b/include/ShaderAST/Stmt/StmtContinue.hpp @@ -13,7 +13,7 @@ namespace ast::stmt : public Stmt { public: - SDAST_API Continue( StmtCache & stmtCache ); + SDAST_API explicit Continue( StmtCache & stmtCache ); SDAST_API void accept( VisitorPtr vis )override; }; diff --git a/include/ShaderAST/Stmt/StmtDemote.hpp b/include/ShaderAST/Stmt/StmtDemote.hpp index 184b5e0b..66dd8c2c 100644 --- a/include/ShaderAST/Stmt/StmtDemote.hpp +++ b/include/ShaderAST/Stmt/StmtDemote.hpp @@ -13,7 +13,7 @@ namespace ast::stmt : public Stmt { public: - SDAST_API Demote( StmtCache & stmtCache ); + SDAST_API explicit Demote( StmtCache & stmtCache ); SDAST_API void accept( VisitorPtr vis )override; }; diff --git a/include/ShaderAST/Stmt/StmtIgnoreIntersection.hpp b/include/ShaderAST/Stmt/StmtIgnoreIntersection.hpp index 570a98ae..323ad1b5 100644 --- a/include/ShaderAST/Stmt/StmtIgnoreIntersection.hpp +++ b/include/ShaderAST/Stmt/StmtIgnoreIntersection.hpp @@ -15,7 +15,7 @@ namespace ast::stmt : public Stmt { public: - SDAST_API IgnoreIntersection( StmtCache & stmtCache ); + SDAST_API explicit IgnoreIntersection( StmtCache & stmtCache ); SDAST_API void accept( VisitorPtr vis )override; }; diff --git a/include/ShaderAST/Stmt/StmtTerminateInvocation.hpp b/include/ShaderAST/Stmt/StmtTerminateInvocation.hpp index d75658e2..106bfabb 100644 --- a/include/ShaderAST/Stmt/StmtTerminateInvocation.hpp +++ b/include/ShaderAST/Stmt/StmtTerminateInvocation.hpp @@ -13,7 +13,7 @@ namespace ast::stmt : public Stmt { public: - SDAST_API TerminateInvocation( StmtCache & stmtCache ); + SDAST_API explicit TerminateInvocation( StmtCache & stmtCache ); SDAST_API void accept( VisitorPtr vis )override; }; diff --git a/include/ShaderAST/Stmt/StmtTerminateRay.hpp b/include/ShaderAST/Stmt/StmtTerminateRay.hpp index 2636b52b..cc00a483 100644 --- a/include/ShaderAST/Stmt/StmtTerminateRay.hpp +++ b/include/ShaderAST/Stmt/StmtTerminateRay.hpp @@ -15,7 +15,7 @@ namespace ast::stmt : public Stmt { public: - SDAST_API TerminateRay( StmtCache & stmtCache ); + SDAST_API explicit TerminateRay( StmtCache & stmtCache ); SDAST_API void accept( VisitorPtr vis )override; }; diff --git a/include/ShaderAST/Visitors/CloneExpr.hpp b/include/ShaderAST/Visitors/CloneExpr.hpp index ab531da5..55ad443d 100644 --- a/include/ShaderAST/Visitors/CloneExpr.hpp +++ b/include/ShaderAST/Visitors/CloneExpr.hpp @@ -22,11 +22,10 @@ namespace ast SDAST_API explicit ExprCloner( expr::ExprCache & exprCache , expr::ExprPtr & result ); - private: + protected: SDAST_API virtual expr::ExprPtr doSubmit( expr::Expr * expr ); - SDAST_API virtual expr::ExprPtr doSubmit( expr::ExprPtr const & expr ); + SDAST_API expr::ExprPtr doSubmit( expr::ExprPtr const & expr ); - protected: SDAST_API void visitAddExpr( expr::Add * expr )override; SDAST_API void visitAddAssignExpr( expr::AddAssign * expr )override; SDAST_API void visitAggrInitExpr( expr::AggrInit * expr )override; diff --git a/include/ShaderAST/Visitors/CloneStmt.hpp b/include/ShaderAST/Visitors/CloneStmt.hpp index ff79510b..4d3b3f47 100644 --- a/include/ShaderAST/Visitors/CloneStmt.hpp +++ b/include/ShaderAST/Visitors/CloneStmt.hpp @@ -24,7 +24,7 @@ namespace ast protected: SDAST_API virtual expr::ExprPtr doSubmit( expr::Expr * expr ); - SDAST_API virtual expr::ExprPtr doSubmit( expr::ExprPtr const & expr ); + SDAST_API expr::ExprPtr doSubmit( expr::ExprPtr const & expr ); SDAST_API void visitContainerStmt( stmt::Container * cont )override; SDAST_API void visitAccelerationStructureDeclStmt( stmt::AccelerationStructureDecl * stmt )override; diff --git a/include/ShaderWriter/RayIntersectionWriter.hpp b/include/ShaderWriter/RayIntersectionWriter.hpp index 864370a5..ffccbb18 100644 --- a/include/ShaderWriter/RayIntersectionWriter.hpp +++ b/include/ShaderWriter/RayIntersectionWriter.hpp @@ -77,7 +77,7 @@ namespace sdw : public ShaderWriter { public: - SDW_API RayIntersectionWriter( ShaderAllocator * allocator = nullptr ); + SDW_API explicit RayIntersectionWriter( ShaderAllocator * allocator = nullptr ); SDW_API void implementMain( RayIntersectionMainFunc const & function ); }; diff --git a/source/CompilerGlsl/GlslExprAdapter.cpp b/source/CompilerGlsl/GlslExprAdapter.cpp index 1eca15aa..f5550ea4 100644 --- a/source/CompilerGlsl/GlslExprAdapter.cpp +++ b/source/CompilerGlsl/GlslExprAdapter.cpp @@ -196,11 +196,6 @@ namespace glsl return result; } - ast::expr::ExprPtr ExprAdapter::doSubmit( ast::expr::ExprPtr const & expr ) - { - return doSubmit( expr.get() ); - } - void ExprAdapter::visitAssignExpr( ast::expr::Assign * expr ) { auto lhs = expr->getLHS(); diff --git a/source/CompilerGlsl/GlslExprAdapter.hpp b/source/CompilerGlsl/GlslExprAdapter.hpp index fbeb8aed..e870a238 100644 --- a/source/CompilerGlsl/GlslExprAdapter.hpp +++ b/source/CompilerGlsl/GlslExprAdapter.hpp @@ -36,8 +36,8 @@ namespace glsl , ast::stmt::Container * container , ast::expr::ExprPtr & result ); + using ast::ExprCloner::doSubmit; ast::expr::ExprPtr doSubmit( ast::expr::Expr * expr )override; - ast::expr::ExprPtr doSubmit( ast::expr::ExprPtr const & expr )override; void visitAssignExpr( ast::expr::Assign * expr )override; void visitArrayAccessExpr( ast::expr::ArrayAccess * expr )override; void visitIdentifierExpr( ast::expr::Identifier * expr )override; diff --git a/source/CompilerGlsl/GlslStmtAdapter.cpp b/source/CompilerGlsl/GlslStmtAdapter.cpp index f9fd00b8..2d1471ea 100644 --- a/source/CompilerGlsl/GlslStmtAdapter.cpp +++ b/source/CompilerGlsl/GlslStmtAdapter.cpp @@ -432,11 +432,6 @@ namespace glsl , m_adaptationData , m_current ); } - - ast::expr::ExprPtr StmtAdapter::doSubmit( ast::expr::ExprPtr const & expr ) - { - return doSubmit( expr.get() ); - } void StmtAdapter::visitConstantBufferDeclStmt( ast::stmt::ConstantBufferDecl * stmt ) { diff --git a/source/CompilerGlsl/GlslStmtAdapter.hpp b/source/CompilerGlsl/GlslStmtAdapter.hpp index f3d6f191..1bf36911 100644 --- a/source/CompilerGlsl/GlslStmtAdapter.hpp +++ b/source/CompilerGlsl/GlslStmtAdapter.hpp @@ -78,8 +78,8 @@ namespace glsl , ast::stmt::Container * globalsCont , ast::stmt::ContainerPtr & result ); + using ast::StmtCloner::doSubmit; ast::expr::ExprPtr doSubmit( ast::expr::Expr * expr )override; - ast::expr::ExprPtr doSubmit( ast::expr::ExprPtr const & expr )override; void visitConstantBufferDeclStmt( ast::stmt::ConstantBufferDecl * stmt )override; void visitFunctionDeclStmt( ast::stmt::FunctionDecl * stmt )override; diff --git a/source/CompilerHlsl/HlslExprAdapter.cpp b/source/CompilerHlsl/HlslExprAdapter.cpp index efa7cc6a..ab1f8680 100644 --- a/source/CompilerHlsl/HlslExprAdapter.cpp +++ b/source/CompilerHlsl/HlslExprAdapter.cpp @@ -503,11 +503,6 @@ namespace hlsl return result; } - ast::expr::ExprPtr ExprAdapter::doSubmit( ast::expr::ExprPtr const & expr ) - { - return doSubmit( expr.get() ); - } - void ExprAdapter::visitArrayAccessExpr( ast::expr::ArrayAccess * expr ) { auto arrayIndex = doSubmit( expr->getRHS() ); diff --git a/source/CompilerHlsl/HlslExprAdapter.hpp b/source/CompilerHlsl/HlslExprAdapter.hpp index 6b617cb9..1cf093ac 100644 --- a/source/CompilerHlsl/HlslExprAdapter.hpp +++ b/source/CompilerHlsl/HlslExprAdapter.hpp @@ -52,8 +52,8 @@ namespace hlsl , ast::stmt::Container * intrinsics , bool preventVarTypeReplacement ); + using ast::ExprCloner::doSubmit; ast::expr::ExprPtr doSubmit( ast::expr::Expr * expr )override; - ast::expr::ExprPtr doSubmit( ast::expr::ExprPtr const & expr )override; void visitArrayAccessExpr( ast::expr::ArrayAccess * expr )override; void visitCompositeConstructExpr( ast::expr::CompositeConstruct * expr )override; void visitIdentifierExpr( ast::expr::Identifier * expr )override; diff --git a/source/CompilerHlsl/HlslStmtAdapter.cpp b/source/CompilerHlsl/HlslStmtAdapter.cpp index 8d2891ee..d2b5fb4e 100644 --- a/source/CompilerHlsl/HlslStmtAdapter.cpp +++ b/source/CompilerHlsl/HlslStmtAdapter.cpp @@ -71,11 +71,6 @@ namespace hlsl , false ); } - ast::expr::ExprPtr StmtAdapter::doSubmit( ast::expr::ExprPtr const & expr ) - { - return doSubmit( expr.get() ); - } - void StmtAdapter::linkVars( ast::var::VariablePtr textureSampler , ast::var::VariablePtr texture , ast::var::VariablePtr sampler ) diff --git a/source/CompilerHlsl/HlslStmtAdapter.hpp b/source/CompilerHlsl/HlslStmtAdapter.hpp index 40f83c89..3ca44cca 100644 --- a/source/CompilerHlsl/HlslStmtAdapter.hpp +++ b/source/CompilerHlsl/HlslStmtAdapter.hpp @@ -34,8 +34,8 @@ namespace hlsl , AdaptationData & adaptationData , ast::stmt::ContainerPtr & result ); + using ast::StmtCloner::doSubmit; ast::expr::ExprPtr doSubmit( ast::expr::Expr * expr )override; - ast::expr::ExprPtr doSubmit( ast::expr::ExprPtr const & expr )override; void linkVars( ast::var::VariablePtr textureSampler , ast::var::VariablePtr texture diff --git a/source/CompilerHlsl/HlslVariableReplacer.hpp b/source/CompilerHlsl/HlslVariableReplacer.hpp index 5b48b928..4374625e 100644 --- a/source/CompilerHlsl/HlslVariableReplacer.hpp +++ b/source/CompilerHlsl/HlslVariableReplacer.hpp @@ -24,6 +24,7 @@ namespace hlsl , ast::var::VariablePtr origin , ast::var::VariablePtr replacement ); + using ast::ExprCloner::doSubmit; ast::expr::ExprPtr doSubmit( ast::expr::Expr * expr )override; void visitIdentifierExpr( ast::expr::Identifier * expr )override; diff --git a/source/CompilerSpirV/SpirvExprAdapter.cpp b/source/CompilerSpirV/SpirvExprAdapter.cpp index 70c8385f..14a47d95 100644 --- a/source/CompilerSpirV/SpirvExprAdapter.cpp +++ b/source/CompilerSpirV/SpirvExprAdapter.cpp @@ -80,11 +80,6 @@ namespace spirv return result; } - ast::expr::ExprPtr ExprAdapter::doSubmit( ast::expr::ExprPtr const & expr ) - { - return doSubmit( expr.get() ); - } - void ExprAdapter::visitAssignExpr( ast::expr::Assign * expr ) { TraceFunc; diff --git a/source/CompilerSpirV/SpirvExprAdapter.hpp b/source/CompilerSpirV/SpirvExprAdapter.hpp index 0f52c116..e38f95d0 100644 --- a/source/CompilerSpirV/SpirvExprAdapter.hpp +++ b/source/CompilerSpirV/SpirvExprAdapter.hpp @@ -32,8 +32,8 @@ namespace spirv , AdaptationData & adaptationData , ast::expr::ExprPtr & result ); + using ast::ExprCloner::doSubmit; ast::expr::ExprPtr doSubmit( ast::expr::Expr * expr )override; - ast::expr::ExprPtr doSubmit( ast::expr::ExprPtr const & expr )override; void visitAssignExpr( ast::expr::Assign * expr )override; void visitIdentifierExpr( ast::expr::Identifier * expr )override; void visitIntrinsicCallExpr( ast::expr::IntrinsicCall * expr )override; diff --git a/source/CompilerSpirV/SpirvStmtAdapter.cpp b/source/CompilerSpirV/SpirvStmtAdapter.cpp index da851161..01029709 100644 --- a/source/CompilerSpirV/SpirvStmtAdapter.cpp +++ b/source/CompilerSpirV/SpirvStmtAdapter.cpp @@ -43,11 +43,6 @@ namespace spirv return ExprAdapter::submit( m_exprCache, m_typesCache, expr, m_current, m_ioDeclarations, m_adaptationData ); } - ast::expr::ExprPtr StmtAdapter::doSubmit( ast::expr::ExprPtr const & expr ) - { - return doSubmit( expr.get() ); - } - void StmtAdapter::visitElseIfStmt( ast::stmt::ElseIf * stmt ) { AST_Failure( "Unexpected ElseIf statement." ); diff --git a/source/CompilerSpirV/SpirvStmtAdapter.hpp b/source/CompilerSpirV/SpirvStmtAdapter.hpp index 76a67825..f471e1cb 100644 --- a/source/CompilerSpirV/SpirvStmtAdapter.hpp +++ b/source/CompilerSpirV/SpirvStmtAdapter.hpp @@ -42,9 +42,9 @@ namespace spirv , ast::type::TypesCache & typesCache , ast::stmt::ContainerPtr & result , AdaptationData & adaptationData ); - + + using ast::StmtCloner::doSubmit; ast::expr::ExprPtr doSubmit( ast::expr::Expr * expr )override; - ast::expr::ExprPtr doSubmit( ast::expr::ExprPtr const & expr )override; void visitElseIfStmt( ast::stmt::ElseIf * stmt )override; void visitElseStmt( ast::stmt::Else * stmt )override; diff --git a/source/CompilerSpirV/compileSpirV.cpp b/source/CompilerSpirV/compileSpirV.cpp index 7ed16a58..a81b2199 100644 --- a/source/CompilerSpirV/compileSpirV.cpp +++ b/source/CompilerSpirV/compileSpirV.cpp @@ -164,7 +164,6 @@ namespace spirv private: ast::type::TypePtr type; ast::var::VariablePtr var; - ast::expr::Expr * expr{}; }; auto module = spirv::Module::deserialize( spirv ); diff --git a/source/ShaderAST/ShaderAllocator.cpp b/source/ShaderAST/ShaderAllocator.cpp index 995c31d4..6842968b 100644 --- a/source/ShaderAST/ShaderAllocator.cpp +++ b/source/ShaderAST/ShaderAllocator.cpp @@ -4,7 +4,6 @@ See LICENSE file in root folder #include "ShaderAST/ShaderAllocator.hpp" #include -#include namespace ast { @@ -147,7 +146,7 @@ namespace ast { if ( level == 0 ) { - return { nullptr }; + return nullptr; } auto buddy = doAllocate( level - 1 ); @@ -347,9 +346,9 @@ namespace ast if ( currentIt != m_memory.end() ) { - for ( auto & memory : std::span{ currentIt, m_memory.end() } ) + for ( auto it = currentIt; it != m_memory.end(); ++it ) { - result += memory.offset; + result += it->offset; } } diff --git a/source/ShaderAST/Visitors/CloneStmt.cpp b/source/ShaderAST/Visitors/CloneStmt.cpp index 40fa341f..45f0347b 100644 --- a/source/ShaderAST/Visitors/CloneStmt.cpp +++ b/source/ShaderAST/Visitors/CloneStmt.cpp @@ -35,7 +35,7 @@ namespace ast expr::ExprPtr StmtCloner::doSubmit( expr::ExprPtr const & expr ) { - return doSubmit( expr ); + return doSubmit( expr.get() ); } void StmtCloner::visitContainerStmt( stmt::Container * cont ) diff --git a/source/ShaderAST/Visitors/StmtSimplifier.cpp b/source/ShaderAST/Visitors/StmtSimplifier.cpp index 8a119591..ae044b6f 100644 --- a/source/ShaderAST/Visitors/StmtSimplifier.cpp +++ b/source/ShaderAST/Visitors/StmtSimplifier.cpp @@ -193,6 +193,8 @@ namespace ast } private: + using ast::ExprCloner::doSubmit; + expr::ExprPtr doSubmit( expr::Expr * expr , bool & allLiterals ) { @@ -213,11 +215,6 @@ namespace ast return doSubmit( expr, m_allLiterals ); } - expr::ExprPtr doSubmit( expr::ExprPtr expr ) - { - return doSubmit( expr.get() ); - } - void visitUnaryExpr( expr::Unary * expr ) { TraceFunc @@ -856,6 +853,8 @@ namespace ast { } + using ast::StmtCloner::doSubmit; + expr::ExprPtr doSubmit( expr::Expr * expr )override { bool allLiterals{ true }; diff --git a/source/ShaderAST/Visitors/TransformSSA.cpp b/source/ShaderAST/Visitors/TransformSSA.cpp index 8e92131d..4296a3ce 100644 --- a/source/ShaderAST/Visitors/TransformSSA.cpp +++ b/source/ShaderAST/Visitors/TransformSSA.cpp @@ -1504,7 +1504,7 @@ namespace ast expr::ExprPtr doSubmit( expr::ExprPtr const & expr ) { - return submit( expr.get(), m_stmtCache, m_exprCache, m_typesCache, m_container, m_isParam, m_data ); + return doSubmit( expr.get() ); } template< typename ExprT > @@ -2119,6 +2119,8 @@ namespace ast } protected: + using ast::StmtCloner::doSubmit; + expr::ExprPtr doSubmit( expr::Expr * expr )override { return ExprSSAiser::submit( expr diff --git a/test/ShaderWriter/CompileSPIRV.cpp b/test/ShaderWriter/CompileSPIRV.cpp index 5186b8a4..05dd21d6 100644 --- a/test/ShaderWriter/CompileSPIRV.cpp +++ b/test/ShaderWriter/CompileSPIRV.cpp @@ -2,10 +2,18 @@ #include -#if SDW_Test_HasVulkan - #pragma warning( disable: 5262 ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverloaded-virtual" +#pragma GCC diagnostic ignored "-Wtype-limits" +#if SDW_Test_HasSpirVTools +# include "spirv-tools/libspirv.hpp" +#endif +#pragma GCC diagnostic pop + +#if SDW_Test_HasVulkan + #include "./vulkan/vulkan.h" #if SDW_HasVulkanLayer @@ -19,16 +27,60 @@ #include #include -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Woverloaded-virtual" -#pragma GCC diagnostic ignored "-Wtype-limits" -#if SDW_Test_HasSpirVTools -# include "spirv-tools/libspirv.hpp" #endif -#pragma GCC diagnostic pop namespace test { + namespace sdw_test + { + static constexpr uint32_t makeVkVersion( uint32_t variant, uint32_t major, uint32_t minor, uint32_t patch ) + { + return ( ( ( uint32_t( variant ) ) << 29 ) + | ( ( uint32_t( major ) ) << 22 ) + | ( ( uint32_t( minor ) ) << 12 ) + | ( uint32_t( patch ) ) ); + } + + static constexpr uint32_t spv1_0 = 0x00010000u; + static constexpr uint32_t spv1_1 = 0x00010100u; + static constexpr uint32_t spv1_2 = 0x00010200u; + static constexpr uint32_t spv1_3 = 0x00010300u; + static constexpr uint32_t spv1_4 = 0x00010400u; + static constexpr uint32_t spv1_5 = 0x00010500u; + static constexpr uint32_t spv1_6 = 0x00010600u; + + static constexpr uint32_t vk1_0 = makeVkVersion( 0, 1, 0, 0 ); + static constexpr uint32_t vk1_1 = makeVkVersion( 0, 1, 1, 0 ); + static constexpr uint32_t vk1_2 = makeVkVersion( 0, 1, 2, 0 ); + static constexpr uint32_t vk1_3 = makeVkVersion( 0, 1, 3, 0 ); + + static uint32_t getMaxSpvVersion( uint32_t vkVersion ) + { + uint32_t result{ spv1_0 }; + + if ( vkVersion >= vk1_3 ) + { + result = spv1_6; + } + else if ( vkVersion >= vk1_2 ) + { + result = spv1_5; + } + else if ( vkVersion >= vk1_1 ) + { + result = spv1_3; + } + else if ( vkVersion >= vk1_0 ) + { + result = spv1_0; + } + + return result; + } + } + +#if SDW_Test_HasVulkan + namespace { struct LayerProperties @@ -696,43 +748,6 @@ namespace test namespace sdw_test { - static constexpr uint32_t spv1_0 = 0x00010000u; - static constexpr uint32_t spv1_1 = 0x00010100u; - static constexpr uint32_t spv1_2 = 0x00010200u; - static constexpr uint32_t spv1_3 = 0x00010300u; - static constexpr uint32_t spv1_4 = 0x00010400u; - static constexpr uint32_t spv1_5 = 0x00010500u; - static constexpr uint32_t spv1_6 = 0x00010600u; - - static constexpr uint32_t vk1_0 = VK_MAKE_API_VERSION( 0, 1, 0, 0 ); - static constexpr uint32_t vk1_1 = VK_MAKE_API_VERSION( 0, 1, 1, 0 ); - static constexpr uint32_t vk1_2 = VK_MAKE_API_VERSION( 0, 1, 2, 0 ); - static constexpr uint32_t vk1_3 = VK_MAKE_API_VERSION( 0, 1, 3, 0 ); - - static uint32_t getMaxSpvVersion( uint32_t vkVersion ) - { - uint32_t result{ spv1_0 }; - - if ( vkVersion >= vk1_3 ) - { - result = spv1_6; - } - else if ( vkVersion >= vk1_2 ) - { - result = spv1_5; - } - else if ( vkVersion >= vk1_1 ) - { - result = spv1_3; - } - else if ( vkVersion >= vk1_0 ) - { - result = spv1_0; - } - - return result; - } - struct SPIRVContext { SPIRVContext() @@ -1355,96 +1370,41 @@ namespace test } #endif -} #else -#if SDW_Test_HasSpirVTools -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Woverloaded-virtual" -#pragma GCC diagnostic ignored "-Wtype-limits" -#if SDW_Test_HasSpirVTools -# include "spirv-tools/libspirv.hpp" -#endif -#pragma GCC diagnostic pop -#endif - -namespace test -{ - static constexpr uint32_t makeVkVersion( uint32_t variant, uint32_t major, uint32_t minor, uint32_t patch ) - { - return ( ( ( ( uint32_t )( variant ) ) << 29 ) - | ( ( ( uint32_t )( major ) ) << 22 ) - | ( ( ( uint32_t )( minor ) ) << 12 ) - | ( ( uint32_t )( patch ) ) ); - } - - static constexpr uint32_t spv1_0 = 0x00010000u; - static constexpr uint32_t spv1_1 = 0x00010100u; - static constexpr uint32_t spv1_2 = 0x00010200u; - static constexpr uint32_t spv1_3 = 0x00010300u; - static constexpr uint32_t spv1_4 = 0x00010400u; - static constexpr uint32_t spv1_5 = 0x00010500u; - static constexpr uint32_t spv1_6 = 0x00010600u; - - static constexpr uint32_t vk1_0 = makeVkVersion( 0, 1, 0, 0 ); - static constexpr uint32_t vk1_1 = makeVkVersion( 0, 1, 1, 0 ); - static constexpr uint32_t vk1_2 = makeVkVersion( 0, 1, 2, 0 ); - static constexpr uint32_t vk1_3 = makeVkVersion( 0, 1, 3, 0 ); - - static uint32_t getMaxSpvVersion( uint32_t vkVersion ) - { - uint32_t result{ spv1_0 }; - - if ( vkVersion >= vk1_3 ) - { - result = spv1_6; - } - else if ( vkVersion >= vk1_2 ) - { - result = spv1_5; - } - else if ( vkVersion >= vk1_1 ) - { - result = spv1_3; - } - else if ( vkVersion >= vk1_0 ) - { - result = spv1_0; - } - - return result; - } - - static std::vector< std::pair< uint32_t, uint32_t > > const & getShaderModels() + namespace sdw_test { - static std::vector< std::pair< uint32_t, uint32_t > > shaderModels = []() + static std::vector< std::pair< uint32_t, uint32_t > > const & getShaderModels() { - static const std::vector< uint32_t > spvVersions{ spv1_0, spv1_1, spv1_2, spv1_3, spv1_4, spv1_5, spv1_6 }; - static const std::vector< uint32_t > vkVersions{ vk1_0, vk1_1, vk1_2, vk1_3 }; + static std::vector< std::pair< uint32_t, uint32_t > > shaderModels = []() + { + static const std::vector< uint32_t > spvVersions{ spv1_0, spv1_1, spv1_2, spv1_3, spv1_4, spv1_5, spv1_6 }; + static const std::vector< uint32_t > vkVersions{ vk1_0, vk1_1, vk1_2, vk1_3 }; - uint32_t maxApiVersion{ vk1_3 }; - std::vector< std::pair< uint32_t, uint32_t > > result; + uint32_t maxApiVersion{ vk1_3 }; + std::vector< std::pair< uint32_t, uint32_t > > result; - for ( auto vkV : vkVersions ) - { - if ( vkV <= maxApiVersion ) + for ( auto vkV : vkVersions ) { - auto maxSpvVersion = getMaxSpvVersion( vkV ); - - for ( auto it = spvVersions.begin(); it != spvVersions.end(); ++it ) + if ( vkV <= maxApiVersion ) { - if ( *it <= maxSpvVersion ) + auto maxSpvVersion = getMaxSpvVersion( vkV ); + + for ( auto it = spvVersions.begin(); it != spvVersions.end(); ++it ) { - result.emplace_back( vkV, *it ); + if ( *it <= maxSpvVersion ) + { + result.emplace_back( vkV, *it ); + } } } } - } - return result; - }(); - return shaderModels; + return result; + }(); + return shaderModels; + } } bool retrieveIsSpirVInitialised( sdw_test::TestCounts const & testCounts @@ -1456,18 +1416,18 @@ namespace test uint32_t retrieveVulkanVersion( sdw_test::TestCounts const & testCounts , uint32_t infoIndex ) { - return getShaderModels()[infoIndex].first; + return sdw_test::getShaderModels()[infoIndex].first; } uint32_t retrieveSPIRVVersion( sdw_test::TestCounts const & testCounts , uint32_t infoIndex ) { - return getShaderModels()[infoIndex].second; + return sdw_test::getShaderModels()[infoIndex].second; } uint32_t retrieveSpirVInfosSize( sdw_test::TestCounts const & testCounts ) { - return uint32_t( getShaderModels().size() ); + return uint32_t( sdw_test::getShaderModels().size() ); } uint32_t getSpirVTargetEnv( sdw_test::TestCounts const & testCounts @@ -1478,19 +1438,19 @@ namespace test switch ( spvVersion ) { - case spv1_0: + case sdw_test::spv1_0: return spv_target_env::SPV_ENV_UNIVERSAL_1_0; - case spv1_1: + case sdw_test::spv1_1: return spv_target_env::SPV_ENV_UNIVERSAL_1_1; - case spv1_2: + case sdw_test::spv1_2: return spv_target_env::SPV_ENV_UNIVERSAL_1_2; - case spv1_3: + case sdw_test::spv1_3: return spv_target_env::SPV_ENV_UNIVERSAL_1_3; - case spv1_4: + case sdw_test::spv1_4: return spv_target_env::SPV_ENV_UNIVERSAL_1_4; - case spv1_5: + case sdw_test::spv1_5: return spv_target_env::SPV_ENV_UNIVERSAL_1_5; - case spv1_6: + case sdw_test::spv1_6: return spv_target_env::SPV_ENV_UNIVERSAL_1_6; default: return spv_target_env::SPV_ENV_UNIVERSAL_1_6; @@ -1526,6 +1486,6 @@ namespace test { } #endif -} #endif +} diff --git a/test/ShaderWriter/GlslToSpv.cpp b/test/ShaderWriter/GlslToSpv.cpp index 5bba596a..6c3ed0bc 100644 --- a/test/ShaderWriter/GlslToSpv.cpp +++ b/test/ShaderWriter/GlslToSpv.cpp @@ -57,98 +57,118 @@ namespace test void doInitResources( TBuiltInResource & resources ) { + resources.limits.nonInductiveForLoops = true; + resources.limits.whileLoops = true; resources.limits.doWhileLoops = true; + resources.limits.generalUniformIndexing = true; resources.limits.generalAttributeMatrixVectorIndexing = true; - resources.limits.generalConstantMatrixVectorIndexing = true; + resources.limits.generalVaryingIndexing = true; resources.limits.generalSamplerIndexing = true; - resources.limits.generalUniformIndexing = true; resources.limits.generalVariableIndexing = true; - resources.limits.generalVaryingIndexing = true; - resources.limits.nonInductiveForLoops = true; - resources.limits.whileLoops = true; - resources.maxAtomicCounterBindings = 1; - resources.maxAtomicCounterBufferSize = 16384; - resources.maxClipDistances = 6; + resources.limits.generalConstantMatrixVectorIndexing = true; + + resources.maxLights = 32; resources.maxClipPlanes = 6; - resources.maxCombinedAtomicCounterBuffers = 1; - resources.maxCombinedAtomicCounters = 8; - resources.maxCombinedClipAndCullDistances = 6; - resources.maxCombinedImageUniforms = 8; - resources.maxCombinedImageUnitsAndFragmentOutputs = 8; - resources.maxCombinedShaderOutputResources = 8; + resources.maxTextureUnits = 32; + resources.maxTextureCoords = 32; + resources.maxVertexAttribs = 64; + resources.maxVertexUniformComponents = 4096; + resources.maxVaryingFloats = 32; + resources.maxVertexTextureImageUnits = 32; resources.maxCombinedTextureImageUnits = 80; - resources.maxComputeAtomicCounterBuffers = 1; - resources.maxComputeAtomicCounters = 8; - resources.maxComputeImageUniforms = 8; - resources.maxComputeTextureImageUnits = 16; - resources.maxComputeUniformComponents = 1024; + resources.maxTextureImageUnits = 32; + resources.maxFragmentUniformComponents = 4096; + resources.maxDrawBuffers = 16; + resources.maxVertexUniformVectors = 128; + resources.maxVaryingVectors = 8; + resources.maxFragmentUniformVectors = 16; + resources.maxVertexOutputVectors = 16; + resources.maxFragmentInputVectors = 15; + resources.minProgramTexelOffset = -8; + resources.maxProgramTexelOffset = 32; + resources.maxClipDistances = 6; resources.maxComputeWorkGroupCountX = 512; resources.maxComputeWorkGroupCountY = 512; resources.maxComputeWorkGroupCountZ = 512; resources.maxComputeWorkGroupSizeX = 512; resources.maxComputeWorkGroupSizeY = 512; resources.maxComputeWorkGroupSizeZ = 512; - resources.maxCullDistances = 16; - resources.maxDrawBuffers = 16; - resources.maxFragmentAtomicCounterBuffers = 1; - resources.maxFragmentAtomicCounters = 8; - resources.maxFragmentImageUniforms = 8; - resources.maxFragmentInputComponents = 32; - resources.maxFragmentInputVectors = 15; - resources.maxFragmentUniformComponents = 4096; - resources.maxFragmentUniformVectors = 16; - resources.maxGeometryAtomicCounterBuffers = 0; - resources.maxGeometryAtomicCounters = 0; - resources.maxGeometryImageUniforms = 0; + resources.maxComputeUniformComponents = 1024; + resources.maxComputeTextureImageUnits = 16; + resources.maxComputeImageUniforms = 8; + resources.maxComputeAtomicCounters = 8; + resources.maxComputeAtomicCounterBuffers = 1; + resources.maxVaryingComponents = 32; + resources.maxVertexOutputComponents = 32; resources.maxGeometryInputComponents = 32; resources.maxGeometryOutputComponents = 32; - resources.maxGeometryOutputVertices = 256; + resources.maxFragmentInputComponents = 32; + resources.maxImageUnits = 8; + resources.maxCombinedImageUnitsAndFragmentOutputs = 8; + resources.maxCombinedShaderOutputResources = 8; + resources.maxImageSamples = 0; + resources.maxVertexImageUniforms = 0; + resources.maxTessControlImageUniforms = 0; + resources.maxTessEvaluationImageUniforms = 0; + resources.maxGeometryImageUniforms = 0; + resources.maxFragmentImageUniforms = 8; + resources.maxCombinedImageUniforms = 8; resources.maxGeometryTextureImageUnits = 16; + resources.maxGeometryOutputVertices = 256; resources.maxGeometryTotalOutputComponents = 32; resources.maxGeometryUniformComponents = 1024; resources.maxGeometryVaryingComponents = 32; - resources.maxImageSamples = 0; - resources.maxImageUnits = 8; - resources.maxLights = 32; - resources.maxPatchVertices = 32; - resources.maxProgramTexelOffset = 32; - resources.maxSamples = 4; - resources.maxTessControlAtomicCounterBuffers = 0; - resources.maxTessControlAtomicCounters = 0; - resources.maxTessControlImageUniforms = 0; resources.maxTessControlInputComponents = 32; resources.maxTessControlOutputComponents = 128; resources.maxTessControlTextureImageUnits = 16; - resources.maxTessControlTotalOutputComponents = 32; resources.maxTessControlUniformComponents = 1024; - resources.maxTessEvaluationAtomicCounterBuffers = 0; - resources.maxTessEvaluationAtomicCounters = 0; - resources.maxTessEvaluationImageUniforms = 0; + resources.maxTessControlTotalOutputComponents = 32; resources.maxTessEvaluationInputComponents = 32; resources.maxTessEvaluationOutputComponents = 32; resources.maxTessEvaluationTextureImageUnits = 16; resources.maxTessEvaluationUniformComponents = 1024; - resources.maxTessGenLevel = 32; resources.maxTessPatchComponents = 32; - resources.maxTextureCoords = 32; - resources.maxTextureImageUnits = 32; - resources.maxTextureUnits = 32; + resources.maxPatchVertices = 32; + resources.maxTessGenLevel = 32; + resources.maxViewports = 32; + resources.maxVertexAtomicCounters = 0; + resources.maxTessControlAtomicCounters = 0; + resources.maxTessEvaluationAtomicCounters = 0; + resources.maxGeometryAtomicCounters = 0; + resources.maxFragmentAtomicCounters = 8; + resources.maxCombinedAtomicCounters = 8; + resources.maxAtomicCounterBindings = 1; + resources.maxVertexAtomicCounterBuffers = 0; + resources.maxTessControlAtomicCounterBuffers = 0; + resources.maxTessEvaluationAtomicCounterBuffers = 0; + resources.maxGeometryAtomicCounterBuffers = 0; + resources.maxFragmentAtomicCounterBuffers = 1; + resources.maxCombinedAtomicCounterBuffers = 1; + resources.maxAtomicCounterBufferSize = 16384; resources.maxTransformFeedbackBuffers = 4; resources.maxTransformFeedbackInterleavedComponents = 64; - resources.maxVaryingComponents = 32; - resources.maxVaryingFloats = 32; - resources.maxVaryingVectors = 8; - resources.maxVertexAtomicCounterBuffers = 0; - resources.maxVertexAtomicCounters = 0; - resources.maxVertexAttribs = 64; - resources.maxVertexImageUniforms = 0; - resources.maxVertexOutputComponents = 32; - resources.maxVertexOutputVectors = 16; - resources.maxVertexTextureImageUnits = 32; - resources.maxVertexUniformComponents = 4096; - resources.maxVertexUniformVectors = 128; - resources.maxViewports = 32; - resources.minProgramTexelOffset = -8; + resources.maxCullDistances = 16; + resources.maxCombinedClipAndCullDistances = 6; + resources.maxSamples = 4; + resources.maxMeshOutputVerticesNV = 256; + resources.maxMeshOutputPrimitivesNV = 256; + resources.maxMeshWorkGroupSizeX_NV = 128; + resources.maxMeshWorkGroupSizeY_NV = 128; + resources.maxMeshWorkGroupSizeZ_NV = 128; + resources.maxTaskWorkGroupSizeX_NV = 128; + resources.maxTaskWorkGroupSizeY_NV = 128; + resources.maxTaskWorkGroupSizeZ_NV = 128; + resources.maxMeshViewCountNV = 4; + resources.maxMeshOutputVerticesEXT = 256; + resources.maxMeshOutputPrimitivesEXT = 256; + resources.maxMeshWorkGroupSizeX_EXT = 128; + resources.maxMeshWorkGroupSizeY_EXT = 128; + resources.maxMeshWorkGroupSizeZ_EXT = 128; + resources.maxTaskWorkGroupSizeX_EXT = 128; + resources.maxTaskWorkGroupSizeY_EXT = 128; + resources.maxTaskWorkGroupSizeZ_EXT = 128; + resources.maxMeshViewCountEXT = 4; + resources.maxDualSourceDrawBuffersEXT = 4; } EShLanguage doGetLanguage( ast::ShaderStage stage ) diff --git a/test/ShaderWriter/WriterCommon.cpp b/test/ShaderWriter/WriterCommon.cpp index d36ccc48..3a8049e7 100644 --- a/test/ShaderWriter/WriterCommon.cpp +++ b/test/ShaderWriter/WriterCommon.cpp @@ -554,6 +554,7 @@ namespace test || shader.getType() == ast::ShaderStage::eTask || config.requiredExtensions.end() != config.requiredExtensions.find( glsl::EXT_separate_samplers ) ) { + testCounts << "COIN !!"; try { compileGlslToSpv( shader.getType(), glsl, 150 ); @@ -566,6 +567,7 @@ namespace test } else { + testCounts << "GLOP !!"; isCompiled = compileGlsl( glsl , shader.getType() , errors diff --git a/test/ShaderWriter/WriterCommon.hpp b/test/ShaderWriter/WriterCommon.hpp index eb20a15b..4196d53d 100644 --- a/test/ShaderWriter/WriterCommon.hpp +++ b/test/ShaderWriter/WriterCommon.hpp @@ -51,7 +51,7 @@ namespace test : test::TestCounts { SDWTest_API TestCounts( test::TestSuite & suite ); - SDWTest_API ~TestCounts()noexcept = default; + SDWTest_API ~TestCounts()noexcept override = default; bool isSpirVInitialised( uint32_t infoIndex )const; bool isSpvIgnored( uint32_t infoIndex, uint32_t ignoredSpvVersion )const;