Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/.vscode
/binaries
/build
/build*
/out
/setup
/doc/*coverage*
Expand Down
37 changes: 35 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@
}
},
{
"name": "user-msvc",
"name": "user-msvc2022",
"displayName": "ShaderWriter User Visual Studio Config",
"description": "Build configuration using Visual Studio, for ShaderWriter users",
"description": "Build configuration using Visual Studio 2022, for ShaderWriter users",
"inherits": "user-base",
"generator": "Visual Studio 17 2022"
},
{
"name": "user-msvc2026",
"displayName": "ShaderWriter User Visual Studio Config",
"description": "Build configuration using Visual Studio 2026, for ShaderWriter users",
"inherits": "user-base",
"generator": "Visual Studio 18 2026"
},
{
"name": "user-ninja",
"displayName": "ShaderWriter User Ninja Config",
Expand Down Expand Up @@ -109,6 +116,32 @@
"VCPKG_MANIFEST_FEATURES": "glsl;hlsl;spirv;tests;vklayer"
}
},
{
"name": "dev-mingw-base",
"hidden": true,
"displayName": "ShaderWriter Developer MinGW Config",
"description": "ShaderWriter Developer build configuration using Ninja, on MinGW",
"generator": "Ninja",
"inherits": "dev-base"
},
{
"name": "dev-mingw-debug",
"displayName": "ShaderWriter Developer MinGW Config, Debug",
"description": "Build configuration using Ninja, for ShaderWriter developers on MinGW, Debug",
"inherits": "dev-mingw-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "dev-mingw-release",
"displayName": "ShaderWriter Developer MinGW Config, Release",
"description": "Build configuration using Ninja, for ShaderWriter developers on MinGW, Release",
"inherits": "dev-mingw-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ci",
"installDir": "${sourceDir}/package/ShaderWriter",
Expand Down
4 changes: 2 additions & 2 deletions include/ShaderAST/Expr/Expr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace ast::expr
Expr & operator=( Expr && ) = delete;

public:
SDAST_API virtual ~Expr()noexcept = default;
virtual ~Expr()noexcept = default;

SDAST_API Expr( ExprCache & exprCache
, size_t size
Expand All @@ -102,7 +102,7 @@ namespace ast::expr

SDAST_API ExprPtr clone()const;

SDAST_API virtual void accept( VisitorPtr )const
virtual void accept( VisitorPtr )const
{
}

Expand Down
8 changes: 4 additions & 4 deletions include/ShaderAST/Expr/ExprVisitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ namespace ast::expr
class Visitor
{
protected:
SDAST_API Visitor()noexcept = default;
Visitor()noexcept = default;

public:
SDAST_API virtual ~Visitor()noexcept = default;
virtual ~Visitor()noexcept = default;

SDAST_API virtual void visitAddExpr( Add const * ) = 0;
SDAST_API virtual void visitAddAssignExpr( AddAssign const * ) = 0;
Expand Down Expand Up @@ -156,10 +156,10 @@ namespace ast::expr
: public Visitor
{
protected:
SDAST_API SimpleVisitor()noexcept = default;
SimpleVisitor()noexcept = default;

public:
SDAST_API ~SimpleVisitor()noexcept override = default;
~SimpleVisitor()noexcept override = default;

virtual void visitUnaryExpr( Unary const * expr ) = 0;
virtual void visitBinaryExpr( Binary const * expr ) = 0;
Expand Down
5 changes: 5 additions & 0 deletions include/ShaderAST/Expr/GetCombinedImageAccessName.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This file is generated, don't modify it!

#include <string>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdisabled-optimization"

namespace ast::expr
{
inline std::string getName( CombinedImageAccess value )
Expand Down Expand Up @@ -1894,4 +1897,6 @@ namespace ast::expr
}
}

#pragma GCC diagnostic pop

#endif
5 changes: 5 additions & 0 deletions include/ShaderAST/Expr/GetIntrinsicName.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This file is generated, don't modify it!

#include <string>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdisabled-optimization"

namespace ast::expr
{
inline std::string getName( Intrinsic value )
Expand Down Expand Up @@ -5424,4 +5427,6 @@ namespace ast::expr
}
}

#pragma GCC diagnostic pop

#endif
5 changes: 5 additions & 0 deletions include/ShaderAST/Expr/GetStorageImageAccessName.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This file is generated, don't modify it!

#include <string>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdisabled-optimization"

namespace ast::expr
{
inline std::string getName( StorageImageAccess value )
Expand Down Expand Up @@ -1152,4 +1155,6 @@ namespace ast::expr
}
}

#pragma GCC diagnostic pop

#endif
18 changes: 9 additions & 9 deletions include/ShaderAST/ShaderAllocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,34 @@ namespace ast
*\param[in] minBlockSize
* The minimum size for a block.
*/
BuddyAllocator( uint32_t numLevels
SDAST_API BuddyAllocator( uint32_t numLevels
, uint32_t minBlockSize );
/**
* Reports memory leaks.
*/
~BuddyAllocator();
SDAST_API ~BuddyAllocator();
/**
* Allocates memory.
*\param[in] size
* The requested memory size.
*\return
* The memory chunk.
*/
PointerType allocate( size_t size );
SDAST_API PointerType allocate( size_t size );
/**
* Deallocates memory.
*\param[in] pointer
* The memory chunk.
*/
bool deallocate( PointerType pointer );
SDAST_API bool deallocate( PointerType pointer );
/**
*\return
* The pool total size.
*/
size_t getTotalSize()const;
SDAST_API size_t getTotalSize()const;

PointerType getPointer( uint32_t offset );
size_t getOffset( ConstPointerType pointer )const;
SDAST_API PointerType getPointer( uint32_t offset );
SDAST_API size_t getOffset( ConstPointerType pointer )const;

private:
uint32_t doGetLevel( size_t size )const;
Expand Down Expand Up @@ -141,7 +141,7 @@ namespace ast

public:
SDAST_API explicit ShaderAllocator( AllocationMode allocationMode = AllocationMode::eFragmented );
SDAST_API ~ShaderAllocator() = default;
~ShaderAllocator() = default;

SDAST_API void * allocate( size_t size, size_t count = 1u );
SDAST_API void deallocate( void * mem, size_t size, size_t count = 1u )noexcept;
Expand All @@ -150,7 +150,7 @@ namespace ast
SDAST_API size_t getMemDiff( MemoryCursor const & cursor )const noexcept;
SDAST_API size_t report()const;

SDAST_API ShaderAllocatorBlockPtr getBlock()
ShaderAllocatorBlockPtr getBlock()
{
return std::make_unique< ShaderAllocatorBlock >( *this );
}
Expand Down
2 changes: 1 addition & 1 deletion include/ShaderAST/Stmt/Stmt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace ast::stmt
SDAST_API explicit Stmt( StmtCache & stmtCache
, size_t size
, Kind kind );
SDAST_API virtual ~Stmt()noexcept = default;
virtual ~Stmt()noexcept = default;

SDAST_API virtual void accept( VisitorPtr )const = 0;

Expand Down
Loading
Loading