Showing preview only (1,041K chars total). Download the full file or copy to clipboard to get everything.
Repository: DragonJoker/RenderGraph
Branch: master
Commit: 5aebc0c2803e
Files: 108
Total size: 996.6 KB
Directory structure:
gitextract_6fjoabne/
├── .editorconfig
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── codecov.yml
│ └── workflows/
│ └── cmake.yml
├── .gitignore
├── .gitmodules
├── AUTHORS
├── CMakeLists.txt
├── CMakePresets.json
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── include/
│ └── RenderGraph/
│ ├── Attachment.hpp
│ ├── AttachmentTransition.hpp
│ ├── BufferData.hpp
│ ├── BufferViewData.hpp
│ ├── DotExport.hpp
│ ├── Exception.hpp
│ ├── FrameGraph.hpp
│ ├── FrameGraphBase.hpp
│ ├── FrameGraphEnums.hpp
│ ├── FrameGraphFunctions.hpp
│ ├── FrameGraphPrerequisites.hpp
│ ├── FrameGraphStructs.hpp
│ ├── FramePass.hpp
│ ├── FramePassGroup.hpp
│ ├── FramePassTimer.hpp
│ ├── GraphContext.hpp
│ ├── GraphNode.hpp
│ ├── GraphVisitor.hpp
│ ├── Hash.hpp
│ ├── Id.hpp
│ ├── ImageData.hpp
│ ├── ImageViewData.hpp
│ ├── LayerLayoutStatesHandler.hpp
│ ├── Log.hpp
│ ├── PixelFormat.inl
│ ├── RecordContext.hpp
│ ├── ResourceHandler.hpp
│ ├── RunnableGraph.hpp
│ ├── RunnablePass.hpp
│ ├── RunnablePasses/
│ │ ├── BufferCopy.hpp
│ │ ├── BufferToImageCopy.hpp
│ │ ├── ComputePass.hpp
│ │ ├── GenerateMipmaps.hpp
│ │ ├── ImageBlit.hpp
│ │ ├── ImageCopy.hpp
│ │ ├── ImageToBufferCopy.hpp
│ │ ├── PipelineConfig.hpp
│ │ ├── PipelineHolder.hpp
│ │ ├── RenderMesh.hpp
│ │ ├── RenderMeshConfig.hpp
│ │ ├── RenderMeshHolder.hpp
│ │ ├── RenderPass.hpp
│ │ ├── RenderPassHolder.hpp
│ │ ├── RenderQuad.hpp
│ │ ├── RenderQuadConfig.hpp
│ │ └── RenderQuadHolder.hpp
│ ├── Signal.hpp
│ ├── Version.hpp.in
│ └── WriteDescriptorSet.hpp
├── source/
│ ├── CMakeLists.txt
│ └── RenderGraph/
│ ├── Attachment.cpp
│ ├── AttachmentTransition.cpp
│ ├── BuilderCommon.hpp
│ ├── DotExport.cpp
│ ├── FrameGraph.cpp
│ ├── FrameGraph.natvis
│ ├── FrameGraphPrerequisites.cpp
│ ├── FramePass.cpp
│ ├── FramePassGroup.cpp
│ ├── FramePassTimer.cpp
│ ├── GraphBuilder.cpp
│ ├── GraphBuilder.hpp
│ ├── GraphContext.cpp
│ ├── GraphNode.cpp
│ ├── LayerLayoutStatesHandler.cpp
│ ├── Log.cpp
│ ├── RecordContext.cpp
│ ├── ResourceHandler.cpp
│ ├── RunnableGraph.cpp
│ ├── RunnablePass.cpp
│ └── RunnablePasses/
│ ├── BufferCopy.cpp
│ ├── BufferToImageCopy.cpp
│ ├── ComputePass.cpp
│ ├── GenerateMipmaps.cpp
│ ├── ImageBlit.cpp
│ ├── ImageCopy.cpp
│ ├── ImageToBufferCopy.cpp
│ ├── PipelineHolder.cpp
│ ├── RenderMesh.cpp
│ ├── RenderMeshHolder.cpp
│ ├── RenderPass.cpp
│ ├── RenderPassHolder.cpp
│ ├── RenderQuad.cpp
│ └── RenderQuadHolder.cpp
├── test/
│ ├── BaseTest.cpp
│ ├── BaseTest.hpp
│ ├── CMakeLists.txt
│ ├── Common.cpp
│ ├── Common.hpp
│ ├── TestAttachment.cpp
│ ├── TestBases.cpp
│ ├── TestRenderGraph.cpp
│ ├── TestRenderPass.cpp
│ └── TestRunnablePass.cpp
└── vcpkg.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
charset = utf-8
end_of_line = CRLF
indent_style = tab
indent_size = 4
tab_width = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.{c++,cc,cpp,cppm,cu,cuh,cxx,fx,h,h++,hh,hlsl,hpp,hxx,inl,ipp,ixx,tlh,tli}]
# Visual C++ Code Style settings
cpp_generate_documentation_comments = doxygen_slash_star
# Visual C++ Formatting settings
cpp_indent_braces = false
cpp_indent_multi_line_relative_to = innermost_parenthesis
cpp_indent_within_parentheses = indent
cpp_indent_preserve_within_parentheses = true
cpp_indent_case_contents = true
cpp_indent_case_labels = false
cpp_indent_case_contents_when_block = true
cpp_indent_lambda_braces_when_parameter = true
cpp_indent_goto_labels = leftmost_column
cpp_indent_preprocessor = leftmost_column
cpp_indent_access_specifiers = false
cpp_indent_namespace_contents = true
cpp_indent_preserve_comments = true
cpp_new_line_before_open_brace_namespace = new_line
cpp_new_line_before_open_brace_type = new_line
cpp_new_line_before_open_brace_function = new_line
cpp_new_line_before_open_brace_block = new_line
cpp_new_line_before_open_brace_lambda = new_line
cpp_new_line_scope_braces_on_separate_lines = true
cpp_new_line_close_brace_same_line_empty_type = false
cpp_new_line_close_brace_same_line_empty_function = false
cpp_new_line_before_catch = true
cpp_new_line_before_else = true
cpp_new_line_before_while_in_do_while = true
cpp_space_before_function_open_parenthesis = remove
cpp_space_within_parameter_list_parentheses = true
cpp_space_between_empty_parameter_list_parentheses = false
cpp_space_after_keywords_in_control_flow_statements = true
cpp_space_within_control_flow_statement_parentheses = true
cpp_space_before_lambda_open_parenthesis = false
cpp_space_within_cast_parentheses = true
cpp_space_after_cast_close_parenthesis = false
cpp_space_within_expression_parentheses = true
cpp_space_before_block_open_brace = true
cpp_space_between_empty_braces = false
cpp_space_before_initializer_list_open_brace = false
cpp_space_within_initializer_list_braces = true
cpp_space_preserve_in_initializer_list = false
cpp_space_before_open_square_bracket = false
cpp_space_within_square_brackets = false
cpp_space_before_empty_square_brackets = false
cpp_space_between_empty_square_brackets = false
cpp_space_group_square_brackets = true
cpp_space_within_lambda_brackets = false
cpp_space_between_empty_lambda_brackets = false
cpp_space_before_comma = false
cpp_space_after_comma = true
cpp_space_remove_around_member_operators = true
cpp_space_before_inheritance_colon = true
cpp_space_before_constructor_colon = true
cpp_space_remove_before_semicolon = true
cpp_space_after_semicolon = true
cpp_space_remove_around_unary_operator = true
cpp_space_around_binary_operator = insert
cpp_space_around_assignment_operator = insert
cpp_space_pointer_reference_alignment = center
cpp_space_around_ternary_operator = insert
cpp_use_unreal_engine_macro_formatting = true
cpp_wrap_preserve_blocks = never
# Visual C++ Inlcude Cleanup settings
cpp_include_cleanup_add_missing_error_tag_type = suggestion
cpp_include_cleanup_remove_unused_error_tag_type = dimmed
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/codecov.yml
================================================
codecov:
require_ci_to_pass: yes
coverage:
precision: 2
round: down
range: "70...100"
status:
project:
default:
target: auto
threshold: 100%
base: auto
patch:
default:
target: auto
threshold: 100%
base: auto
if_ci_failed: success
informational: true
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: no
require_head: no
require_base: no
github_checks:
annotations: true
================================================
FILE: .github/workflows/cmake.yml
================================================
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- created
jobs:
build-windows:
strategy:
matrix:
os: [[windows-latest,x64-windows,msvc]]
buildType: [Debug]
runs-on: ${{ matrix.os[0] }}
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule update --init -- "CMake"
git submodule update --init -- "external/vcpkg"
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{ github.workspace }}/external/vcpkg'
vcpkgJsonGlob: 'vcpkg.json'
- name: Setup OpenCppCoverage
id: setup_opencppcoverage
run: |
choco install OpenCppCoverage -y
echo "C:\Program Files\OpenCppCoverage" >> $env:GITHUB_PATH
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }}
- name: Configure CMake
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 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/rendergraph -DPROJECTS_COVERAGE=ON -DVULKAN_HEADERS_INCLUDE_DIRS=$VCPKG_ROOT/installed/${{matrix.os[1]}}/include --preset ci
- name: Build
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --parallel 2 --config ${{ matrix.buildType }}
- name: Build coverage report
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --target RenderGraphCoverage --config ${{ matrix.buildType }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ${{ github.workspace }}/doc/RenderGraphCoverage.xml
- name: Prepare package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --install . --config ${{ matrix.buildType }}
- name: Zip package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
7z a $GITHUB_WORKSPACE/RenderGraph-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/rendergraph/
- name: Upload package
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: RenderGraph-${{ matrix.os[1] }}.zip
path: ${{ github.workspace }}/RenderGraph-${{ matrix.os[1] }}.zip
build-macos:
strategy:
matrix:
os: [[macos-latest,x64-osx,clang]]
buildType: [Release]
runs-on: ${{ matrix.os[0] }}
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule update --init -- "CMake"
git submodule update --init -- "external/vcpkg"
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{ github.workspace }}/external/vcpkg'
vcpkgJsonGlob: 'vcpkg.json'
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }}
- name: Configure CMake
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 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/rendergraph -DVULKAN_HEADERS_INCLUDE_DIRS=$VCPKG_ROOT/installed/${{matrix.os[1]}}/include --preset ci
- name: Build
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --parallel 2 --config ${{ matrix.buildType }}
- name: Test
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
ctest -C ${{ matrix.buildType }}
- name: Prepare package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --install . --config ${{ matrix.buildType }}
- name: Zip package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
7z a $GITHUB_WORKSPACE/RenderGraph-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/rendergraph/
- name: Upload package
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: RenderGraph-${{ matrix.os[1] }}.zip
path: ${{ github.workspace }}/RenderGraph-${{ matrix.os[1] }}.zip
build-linux-gcc:
strategy:
matrix:
os: [[ubuntu-latest,x64-linux,gcc]]
buildType: [Release]
runs-on: ${{ matrix.os[0] }}
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule update --init -- "CMake"
git submodule update --init -- "external/vcpkg"
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{ github.workspace }}/external/vcpkg'
vcpkgJsonGlob: 'vcpkg.json'
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }}
- name: Configure GCC version
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "CC=gcc-12" >> $GITHUB_ENV
echo "CXX=g++-12" >> $GITHUB_ENV
- name: Configure CMake
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 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/rendergraph -DVULKAN_HEADERS_INCLUDE_DIRS=$VCPKG_ROOT/installed/${{matrix.os[1]}}/include --preset ci
- name: Build
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --parallel 2 --config ${{ matrix.buildType }}
- name: Test
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
ctest -C ${{ matrix.buildType }}
- name: Prepare package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --install . --config ${{ matrix.buildType }}
- name: Zip package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
7z a $GITHUB_WORKSPACE/RenderGraph-${{ matrix.os[1] }}-gcc.zip $GITHUB_WORKSPACE/package/rendergraph/
- name: Upload package
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: RenderGraph-${{ matrix.os[1] }}-gcc.zip
path: ${{ github.workspace }}/RenderGraph-${{ matrix.os[1] }}-gcc.zip
build-linux-clang:
strategy:
matrix:
os: [[ubuntu-latest,x64-linux,clang]]
buildType: [Release]
runs-on: ${{ matrix.os[0] }}
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule update --init -- "CMake"
git submodule update --init -- "external/vcpkg"
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{ github.workspace }}/external/vcpkg'
vcpkgJsonGlob: 'vcpkg.json'
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }}
- name: Configure Warnings as errors (OFF)
if: github.event_name == 'push'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=OFF" >> $GITHUB_ENV
- name: Configure Warnings as errors (ON)
if: github.event_name == 'pull_request'
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "PROJ_WAE=ON" >> $GITHUB_ENV
- name: Configure Clang version
shell: bash
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
run: |
echo "CC=clang-16" >> $GITHUB_ENV
echo "CXX=clang++-16" >> $GITHUB_ENV
- name: Configure CMake
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 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/package/rendergraph -DVULKAN_HEADERS_INCLUDE_DIRS=$VCPKG_ROOT/installed/${{matrix.os[1]}}/include --preset ci
- name: Build
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --build . --parallel 2 --config ${{ matrix.buildType }}
- name: Test
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
ctest -C ${{ matrix.buildType }}
- name: Prepare package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
cmake --install . --config ${{ matrix.buildType }}
- name: Zip package
if: github.event_name == 'push'
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }}
shell: bash
run: |
7z a $GITHUB_WORKSPACE/RenderGraph-${{ matrix.os[1] }}-clang.zip $GITHUB_WORKSPACE/package/rendergraph/
- name: Upload package
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: RenderGraph-${{ matrix.os[1] }}-clang.zip
path: ${{ github.workspace }}/RenderGraph-${{ matrix.os[1] }}-clang.zip
================================================
FILE: .gitignore
================================================
/.vscode
/binaries
/build*
/setup
/doc/coverage
/doc/RenderGraphCoverage
/doc/RenderGraphCoverage.xml
/doc/x86
/doc/x64
/.gitattributes
*.csproj
*.user
*.suo
*.gch
*.*~
================================================
FILE: .gitmodules
================================================
[submodule "CMake"]
path = CMake
url = https://github.com/DragonJoker/CMakeUtils.git
[submodule "external/vcpkg"]
path = external/vcpkg
url = https://github.com/microsoft/vcpkg.git
================================================
FILE: AUTHORS
================================================
Authors of RenderGraph
Sylvain Doremus Main author
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required( VERSION 3.10 )
cmake_policy( VERSION 3.10 )
#--------------------------------------------------------------------------------------------------
# Initial configurations
#--------------------------------------------------------------------------------------------------
# Set project name, used in folders and in workspace creation
set( MAIN_PROJECT_NAME "RenderGraph" )
# Set project version numbers
set( VERSION_MAJOR 2 )
set( VERSION_MINOR 1 )
set( VERSION_BUILD 0 )
set( VERSION_YEAR 2025 )
set( _PROJECT_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}" )
set( _PROJECT_SOVERSION "${VERSION_BUILD}" )
# Used to look for external modules
if ( NOT CMAKE_MODULE_PATH )
set( CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/CMake
${CMAKE_SOURCE_DIR}/CMake/Modules
${CMAKE_SOURCE_DIR}/CMake/Toolchains
)
set( CMAKE_TEMPLATES_DIR ${CMAKE_SOURCE_DIR}/CMake/Templates )
endif ()
set( CMAKE_POSITION_INDEPENDENT_CODE ON )
set( CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo" CACHE STRING "The configuration types" FORCE )
# Experimental Precompiled headers support for GCC
include( PCHSupport )
# Declare the project
project( ${MAIN_PROJECT_NAME} )
include( Setup )
include( Project )
include( CompilerVersion )
include( UnitTest )
include( CompilationFlags )
include( AStyleUtils )
include( ExternalDependencies )
include( Coverage )
# Organize projects into folders
set_property( GLOBAL PROPERTY USE_FOLDERS ON )
#--------------------------------------------------------------------------------------------------
# Adding include dirs to include search path
#--------------------------------------------------------------------------------------------------
set( CRG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
set( CRG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} )
set( CRG_EDITORCONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/.editorconfig )
if ( NOT DEFINED CRG_BUILD_STATIC )
option( CRG_BUILD_STATIC "Build as a static library" ON )
endif ()
if ( NOT DEFINED CRG_BUILD_TESTS )
option( CRG_BUILD_TESTS "Build RenderGraph test applications" OFF )
endif ()
if ( NOT DEFINED CRG_UNITY_BUILD )
option( CRG_UNITY_BUILD "Build RenderGraph using Unity (Jumbo) build method" OFF )
endif ()
if ( MSVC OR NOT "${CMAKE_BUILD_TYPE}" STREQUAL "" )
configure_file(
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/Version.hpp.in
${CRG_BINARY_DIR}/include/${PROJECT_NAME}/Version.hpp
NEWLINE_STYLE LF
)
# RenderGraph library
project( RenderGraph )
set( ${PROJECT_NAME}_HDR_FILES
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/Attachment.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/AttachmentTransition.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/BufferData.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/BufferViewData.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/DotExport.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/Exception.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/FrameGraph.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/FrameGraphBase.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/FrameGraphEnums.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/FrameGraphFunctions.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/FrameGraphPrerequisites.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/FrameGraphStructs.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/FramePass.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/FramePassGroup.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/FramePassTimer.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/GraphContext.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/GraphNode.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/GraphVisitor.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/Hash.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/Id.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/ImageData.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/ImageViewData.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/LayerLayoutStatesHandler.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/Log.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/PixelFormat.inl
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RecordContext.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/ResourceHandler.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnableGraph.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePass.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/Signal.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/WriteDescriptorSet.hpp
${CRG_BINARY_DIR}/include/${PROJECT_NAME}/Version.hpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/GraphBuilder.hpp
)
set( ${PROJECT_NAME}_SRC_FILES
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/Attachment.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/AttachmentTransition.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/DotExport.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/FrameGraph.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/FrameGraphPrerequisites.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/FramePass.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/FramePassGroup.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/FramePassTimer.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/GraphBuilder.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/GraphContext.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/GraphNode.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/LayerLayoutStatesHandler.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/Log.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RecordContext.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/ResourceHandler.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnableGraph.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePass.cpp
)
set( ${PROJECT_NAME}_NVS_FILES
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/FrameGraph.natvis
)
source_group( "Header Files" FILES ${${PROJECT_NAME}_HDR_FILES} )
source_group( "Source Files" FILES ${${PROJECT_NAME}_SRC_FILES} )
source_group( "Visualisation Files" FILES ${${PROJECT_NAME}_NVS_FILES} )
set( ${PROJECT_NAME}_FOLDER_HDR_FILES
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/BufferCopy.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/BufferToImageCopy.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/ComputePass.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/GenerateMipmaps.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/ImageBlit.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/ImageCopy.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/ImageToBufferCopy.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/PipelineConfig.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/PipelineHolder.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/RenderPass.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/RenderPassHolder.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/RenderMesh.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/RenderMeshConfig.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/RenderMeshHolder.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/RenderQuad.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/RenderQuadConfig.hpp
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}/RunnablePasses/RenderQuadHolder.hpp
)
set( ${PROJECT_NAME}_FOLDER_SRC_FILES
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/BufferCopy.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/BufferToImageCopy.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/ComputePass.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/GenerateMipmaps.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/ImageBlit.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/ImageCopy.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/ImageToBufferCopy.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/PipelineHolder.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/RenderPass.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/RenderPassHolder.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/RenderMesh.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/RenderMeshHolder.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/RenderQuad.cpp
${CRG_SOURCE_DIR}/source/${PROJECT_NAME}/RunnablePasses/RenderQuadHolder.cpp
)
set( ${PROJECT_NAME}_SRC_FILES
${${PROJECT_NAME}_SRC_FILES}
${${PROJECT_NAME}_FOLDER_SRC_FILES}
)
set( ${PROJECT_NAME}_HDR_FILES
${${PROJECT_NAME}_HDR_FILES}
${${PROJECT_NAME}_FOLDER_HDR_FILES}
)
source_group( "Header Files\\RunnablePasses" FILES ${${PROJECT_NAME}_FOLDER_HDR_FILES} )
source_group( "Source Files\\RunnablePasses" FILES ${${PROJECT_NAME}_FOLDER_SRC_FILES} )
if ( ${CRG_UNITY_BUILD} )
file( GLOB ${PROJECT_NAME}_FOLDER_SRC_FILES
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${PROJECT_NAME}.dir/Unity/*.cxx
)
source_group( "Source Files\\Unity" FILES ${${PROJECT_NAME}_FOLDER_SRC_FILES} )
endif ()
if ( CRG_BUILD_STATIC )
add_library( ${PROJECT_NAME} STATIC
${${PROJECT_NAME}_HDR_FILES}
${${PROJECT_NAME}_SRC_FILES}
${${PROJECT_NAME}_NVS_FILES}
)
target_compile_definitions( ${PROJECT_NAME}
PUBLIC
CRG_BUILD_STATIC
)
else ()
add_library( ${PROJECT_NAME} SHARED
${${PROJECT_NAME}_HDR_FILES}
${${PROJECT_NAME}_SRC_FILES}
${${PROJECT_NAME}_NVS_FILES}
)
set_target_properties( ${PROJECT_NAME}
PROPERTIES
VERSION ${_PROJECT_VERSION}
SOVERSION ${_PROJECT_SOVERSION}
)
if ( WIN32 )
target_link_libraries( ${PROJECT_NAME}
PUBLIC
Dbghelp
)
else ()
target_link_libraries( ${PROJECT_NAME}
PRIVATE
dl
)
endif ()
endif ()
add_library( crg::${PROJECT_NAME}
ALIAS
${PROJECT_NAME}
)
target_add_coverage_flags( ${PROJECT_NAME} )
target_sources( ${PROJECT_NAME}
PRIVATE
${CRG_EDITORCONFIG_FILE}
)
target_add_compilation_flags( ${PROJECT_NAME} )
target_compile_options( ${PROJECT_NAME}
PUBLIC
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-poison-system-directories>
$<$<CXX_COMPILER_ID:Clang>:-Wno-poison-system-directories>
)
target_compile_definitions( ${PROJECT_NAME}
PUBLIC
CRG_VERSION_MAJOR=${VERSION_MAJOR}
CRG_VERSION_MINOR=${VERSION_MINOR}
CRG_VERSION_BUILD=${VERSION_BUILD}
)
target_include_directories( ${PROJECT_NAME}
PUBLIC
$<BUILD_INTERFACE:${CRG_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CRG_BINARY_DIR}>
$<BUILD_INTERFACE:${Vulkan_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>
)
find_package( VulkanHeaders CONFIG )
target_link_libraries( ${PROJECT_NAME}
PRIVATE
Vulkan::Headers
)
set_target_properties( ${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 20
FOLDER "${CRG_BASE_DIR}/Core"
DEBUG_POSTFIX "d"
UNITY_BUILD "${CRG_UNITY_BUILD}"
)
install(
TARGETS ${PROJECT_NAME}
COMPONENT ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
install(
FILES ${CRG_BINARY_DIR}/include/${PROJECT_NAME}/Version.hpp
DESTINATION include/${PROJECT_NAME}
COMPONENT ${PROJECT_NAME}
CONFIGURATIONS Release
)
target_install_headers( ${PROJECT_NAME}
${CRG_SOURCE_DIR}/include/${PROJECT_NAME}
)
install( EXPORT ${PROJECT_NAME}
COMPONENT ${PROJECT_NAME}
FILE ${PROJECT_NAME}Config.cmake
NAMESPACE crg::
DESTINATION share/${PROJECT_NAME}
)
include(CMakePackageConfigHelpers)
write_basic_package_version_file( ${PROJECT_NAME}ConfigVersion.cmake
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}
COMPATIBILITY AnyNewerVersion
)
if ( CRG_BUILD_TESTS )
add_subdirectory( test )
endif ()
else()
message( SEND_ERROR "Please select a build type (Debug or Release)" )
endif()
================================================
FILE: CMakePresets.json
================================================
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "default-base",
"hidden": true,
"displayName": "Default Config",
"description": "Default build configuration",
"installDir": "${sourceDir}/package/RenderGraph",
"cacheVariables": {
"CRG_BUILD_STATIC": false,
"CRG_BUILD_TESTS": true
}
},
{
"name": "dev-base",
"hidden": true,
"displayName": "Developer Visual Studio Config",
"description": "Developer build configuration using Visual Studio",
"inherits": "default-base",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/external/vcpkg/scripts/buildsystems/vcpkg.cmake",
"PROJECTS_WARNINGS_AS_ERRORS": true,
"VCPKG_MANIFEST_FEATURES": "tests"
}
},
{
"name": "default-msvc",
"displayName": "Default Visual Studio Config",
"description": "Default build configuration using Visual Studio",
"inherits": "default-base",
"generator": "Visual Studio 17 2022"
},
{
"name": "default-ninja-base",
"hidden": true,
"displayName": "Default Ninja Config",
"description": "Default build configuration using Ninja",
"inherits": "default-base",
"generator": "Ninja"
},
{
"name": "default-ninja-debug",
"displayName": "Default Ninja Config, Debug",
"description": "Default build configuration using Ninja, Debug",
"inherits": "default-ninja-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "default-ninja-release",
"displayName": "Default Ninja Config, Release",
"description": "Default build configuration using Ninja, Release",
"inherits": "default-ninja-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "dev-msvc",
"displayName": "Developer Visual Studio Config",
"description": "Developer build configuration using Visual Studio",
"inherits": "dev-base",
"generator": "Visual Studio 17 2022"
},
{
"name": "dev-ninja-base",
"hidden": true,
"displayName": "Developer Ninja Config",
"description": "Developer build configuration using Ninja",
"inherits": "dev-base",
"generator": "Ninja"
},
{
"name": "dev-ninja-debug",
"displayName": "Developer Ninja Config, Debug",
"description": "Developer build configuration using Ninja, Debug",
"inherits": "dev-ninja-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "dev-ninja-release",
"displayName": "Developer Ninja Config, Release",
"description": "Developer build configuration using Ninja, Release",
"inherits": "dev-ninja-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "dev-mingw-base",
"hidden": true,
"displayName": "Developer MinGW Config",
"description": "Developer build configuration using Ninja, on MinGW",
"generator": "Ninja",
"inherits": "default-base",
"cacheVariables": {
"PROJECTS_WARNINGS_AS_ERRORS": true,
"CRG_BUILD_TESTS": true
}
},
{
"name": "dev-mingw-debug",
"displayName": "Developer MinGW Config, Debug",
"description": "Developer build configuration using Ninja, on MinGW, Debug",
"inherits": "dev-mingw-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "dev-mingw-release",
"displayName": "Developer MinGW Config, Release",
"description": "Developer build configuration using Ninja, on MinGW, Release",
"inherits": "dev-mingw-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ci",
"installDir": "${sourceDir}/package/Castor3D",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/external/vcpkg/scripts/buildsystems/vcpkg.cmake",
"CRG_BUILD_STATIC": false,
"CRG_UNITY_BUILD": true,
"CRG_BUILD_TESTS": true,
"PROJECTS_WARNINGS_AS_ERRORS": true,
"VCPKG_MANIFEST_FEATURES": "tests"
}
}
]
}
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at dragonjoker59@hotmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2018 Sylvain Doremus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
<p align="center">
<img alt="Vcpkg Version" src="https://img.shields.io/vcpkg/v/rendergraph">
<a href="https://github.com/DragonJoker/RenderGraph/actions/workflows/cmake.yml"><img alt="Build status" src="https://github.com/DragonJoker/RenderGraph/actions/workflows/cmake.yml/badge.svg"></a>
<a href="https://codecov.io/gh/DragonJoker/RenderGraph" ><img src="https://codecov.io/gh/DragonJoker/RenderGraph/graph/badge.svg?token=E0IGAPHLJO"/></a>
</p>
# RenderGraph
This library owes to be used to handle Vulkan render passes and image transitions smoothly.
It allows the user to register its render passes, along with their attachments (input, sampled, colour, depth stencil...), and will generate a runnable graph from that data.
## Current status
- The user can register its passes and their attachments.
- The runnable graph is generated, and image layout transitions are handled.
- The runnable graph commands can be recorded and submitted to a queue.
- Handling of "variants" (optional passes, or paths of a single pass that are triggered by specific conditions).
## Building
RenderGraph uses CMake.
The only dependency is Vulkan-Headers, and the CMake variable holding its folder is VULKAN_HEADERS_INCLUDE_DIRS, which you need to set on command line, or by editing the CMakeCache.txt.
================================================
FILE: include/RenderGraph/Attachment.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "BufferViewData.hpp"
#include "ImageViewData.hpp"
#include <limits>
#ifdef None
#undef None
#endif
namespace crg
{
static constexpr uint32_t InvalidBindingId = std::numeric_limits< uint32_t >::max();
struct SamplerDesc
{
FilterMode magFilter{ FilterMode::eNearest };
FilterMode minFilter{ FilterMode::eNearest };
MipmapMode mipmapMode{ MipmapMode::eNearest };
WrapMode addressModeU{ WrapMode::eClampToEdge };
WrapMode addressModeV{ WrapMode::eClampToEdge };
WrapMode addressModeW{ WrapMode::eClampToEdge };
float mipLodBias{ 0.0f };
float minLod{ -500.0f };
float maxLod{ 500.0f };
explicit constexpr SamplerDesc( FilterMode magFilter = FilterMode::eNearest
, FilterMode minFilter = FilterMode::eNearest
, MipmapMode mipmapMode = MipmapMode::eNearest
, WrapMode addressModeU = WrapMode::eClampToEdge
, WrapMode addressModeV = WrapMode::eClampToEdge
, WrapMode addressModeW = WrapMode::eClampToEdge
, float mipLodBias = 0.0f
, float minLod = -500.0f
, float maxLod = 500.0f )
: magFilter{ magFilter }
, minFilter{ minFilter }
, mipmapMode{ mipmapMode }
, addressModeU{ addressModeU }
, addressModeV{ addressModeV }
, addressModeW{ addressModeW }
, mipLodBias{ mipLodBias }
, minLod{ minLod }
, maxLod{ maxLod }
{
}
private:
friend bool operator==( SamplerDesc const & lhs, SamplerDesc const & rhs ) = default;
};
/**
*\brief
* An image attachment.
*/
struct ImageAttachment
{
friend struct Attachment;
friend struct FramePass;
/**
*\brief
* The flags qualifying the attachment.
*/
using FlagKind = uint16_t;
enum class Flag : FlagKind
{
None = 0x00,
Sampled = 0x01 << 0,
Storage = 0x01 << 1,
Transfer = 0x01 << 2,
Depth = 0x01 << 3,
Stencil = 0x01 << 4,
StencilClearing = 0x01 << 5,
StencilInput = 0x01 << 6,
StencilOutput = 0x01 << 7,
Transition = 0x01 << 8,
DepthStencil = Depth | Stencil,
StencilInOut = StencilInput | StencilOutput,
};
/**
*\name
* Getters.
*/
/**@{*/
CRG_API ImageViewId view( uint32_t index = 0u )const;
CRG_API ImageLayout getImageLayout( bool separateDepthStencilLayouts
, bool isInput
, bool isOutput )const;
CRG_API AccessFlags getAccessMask( bool isInput
, bool isOutput )const;
CRG_API PipelineStageFlags getPipelineStageFlags( bool isCompute )const;
FlagKind getFlags()const
{
return flags;
}
FlagKind getFormatFlags()const
{
return FlagKind( flags & FlagKind( Flag::DepthStencil ) );
}
uint32_t getViewCount()const
{
return uint32_t( views.size() );
}
bool hasFlag( Flag flag )const
{
return Flag( flags & FlagKind( flag ) ) == flag;
}
bool isSampledView()const
{
return hasFlag( Flag::Sampled );
}
bool isStorageView()const
{
return hasFlag( Flag::Storage );
}
bool isTransferView()const
{
return hasFlag( Flag::Transfer );
}
bool isTransitionView()const
{
return hasFlag( Flag::Transition );
}
bool isDepthTarget()const
{
return hasFlag( Flag::Depth ) && !isTransitionView();
}
bool isStencilTarget()const
{
return hasFlag( Flag::Stencil ) && !isTransitionView();
}
bool isDepthStencilTarget()const
{
return isDepthTarget() && isStencilTarget();
}
bool isColourTarget()const
{
return !isSampledView()
&& !isTransitionView()
&& !isStorageView()
&& !isTransferView()
&& !isDepthTarget()
&& !isStencilTarget();
}
bool isStencilClearingTarget()const
{
return hasFlag( Flag::StencilClearing );
}
bool isStencilInputTarget()const
{
return hasFlag( Flag::StencilInput );
}
bool isStencilOutputTarget()const
{
return hasFlag( Flag::StencilOutput );
}
/**@}*/
public:
ImageViewIdArray views{};
AttachmentLoadOp loadOp{};
AttachmentStoreOp storeOp{};
AttachmentLoadOp stencilLoadOp{};
AttachmentStoreOp stencilStoreOp{};
ClearValue clearValue{};
PipelineColorBlendAttachmentState blendState = DefaultBlendState;
ImageLayout wantedLayout{};
FlagKind flags{};
private:
ImageAttachment() = default;
CRG_API explicit ImageAttachment( ImageViewIdArray view );
CRG_API ImageAttachment( FlagKind flags
, ImageViewIdArray views
, AttachmentLoadOp loadOp
, AttachmentStoreOp storeOp
, AttachmentLoadOp stencilLoadOp
, AttachmentStoreOp stencilStoreOp
, ClearValue clearValue
, PipelineColorBlendAttachmentState blendState
, ImageLayout wantedLayout );
friend bool operator==( ImageAttachment const & lhs
, ImageAttachment const & rhs )noexcept
{
return lhs.flags == rhs.flags
&& lhs.views == rhs.views
&& lhs.loadOp == rhs.loadOp
&& lhs.storeOp == rhs.storeOp
&& lhs.stencilLoadOp == rhs.stencilLoadOp
&& lhs.stencilStoreOp == rhs.stencilStoreOp
&& lhs.clearValue == rhs.clearValue
&& lhs.blendState == rhs.blendState;
}
};
/**
*\brief
* A buffer (uniform or storage) attachment.
*/
struct BufferAttachment
{
friend struct Attachment;
friend struct FramePass;
/**
*\brief
* The flags qualifying a buffer attachment.
*/
using FlagKind = uint16_t;
enum class Flag : FlagKind
{
None = 0x00,
Uniform = 0x01 << 0,
Storage = 0x01 << 1,
Transfer = 0x01 << 2,
View = 0x01 << 3,
Transition = 0x01 << 4,
UniformView = Uniform | View,
StorageView = Storage | View,
TransitionView = Transition | View,
};
CRG_API BufferViewId buffer( uint32_t index = 0u )const;
CRG_API AccessFlags getAccessMask( bool isInput
, bool isOutput )const;
CRG_API PipelineStageFlags getPipelineStageFlags( bool isCompute )const;
CRG_API uint32_t getBufferCount()const;
FlagKind getFlags()const
{
return flags;
}
FlagKind getFormatFlags()const
{
return FlagKind( flags & FlagKind( Flag::View ) );
}
bool hasFlag( Flag flag )const
{
return Flag( flags & FlagKind( flag ) ) == flag;
}
bool isUniform()const
{
return hasFlag( Flag::Uniform );
}
bool isStorage()const
{
return hasFlag( Flag::Storage );
}
bool isTransfer()const
{
return hasFlag( Flag::Transfer );
}
bool isTransition()const
{
return hasFlag( Flag::Transition );
}
bool isView()const
{
return hasFlag( Flag::View );
}
bool isUniformView()const
{
return isUniform() && isView();
}
bool isStorageView()const
{
return isStorage() && isView();
}
bool isTransitionView()const
{
return isTransition() && isView();
}
public:
BufferViewIdArray buffers;
FlagKind flags{};
AccessState wantedAccess{};
private:
BufferAttachment() = default;
CRG_API explicit BufferAttachment( BufferViewIdArray view );
CRG_API BufferAttachment( FlagKind flags
, BufferViewIdArray views
, AccessState access = {} );
friend bool operator==( BufferAttachment const & lhs
, BufferAttachment const & rhs )noexcept
{
return lhs.flags == rhs.flags
&& lhs.buffers == rhs.buffers;
}
};
/**
*\brief
* An attachment to a pass.
*/
struct Attachment
{
friend struct FramePass;
friend class FrameGraph;
class Token
{
friend struct Attachment;
friend struct FramePass;
private:
Token() noexcept = default;
};
struct Source
{
Source( Attachment const * parent
, FramePass const * pass
, ImageAttachment const & imgAttach )
: parent{ parent }
, pass{ pass }
, imageAttach{ &imgAttach }
{
}
Source( Attachment const * parent
, FramePass const * pass
, BufferAttachment const & bufAttach )
: parent{ parent }
, pass{ pass }
, bufferAttach{ &bufAttach }
{
}
explicit Source( AttachmentPtr sourceAttach )
: pass{ sourceAttach->pass }
, imageAttach{ sourceAttach->isImage() ? &sourceAttach->imageAttach : nullptr }
, bufferAttach{ sourceAttach->isBuffer() ? &sourceAttach->bufferAttach : nullptr }
, attach{ std::move( sourceAttach ) }
{
}
Attachment const * parent{};
FramePass const * pass{};
ImageAttachment const * imageAttach{};
BufferAttachment const * bufferAttach{};
AttachmentPtr attach;
};
/**
*\brief
* The flags qualifying an Attachment.
*/
using FlagKind = uint16_t;
enum class Flag : FlagKind
{
None = 0x00,
Input = 0x01 << 0,
Output = 0x01 << 1,
Image = 0x01 << 2,
Buffer = 0x01 << 3,
NoTransition = 0x01 << 4,
Clearable = 0x01 << 5,
InOut = Input | Output,
};
CRG_API Attachment( Attachment const & rhs );
CRG_API Attachment & operator=( Attachment const & rhs );
Attachment( Attachment && rhs )noexcept = default;
Attachment & operator=( Attachment && rhs )noexcept = default;
/**
*\name
* Getters.
*/
/**@{*/
CRG_API uint32_t getViewCount()const;
CRG_API uint32_t getBufferCount()const;
CRG_API ImageViewId view( uint32_t index = 0u )const;
CRG_API BufferViewId buffer( uint32_t index = 0u )const;
CRG_API ImageLayout getImageLayout( bool separateDepthStencilLayouts )const;
CRG_API AccessFlags getAccessMask()const;
CRG_API PipelineStageFlags getPipelineStageFlags( bool isCompute )const;
CRG_API Attachment const * getSource( uint32_t index )const;
FlagKind getFlags()const
{
return flags;
}
bool hasFlag( Flag flag )const
{
return Flag( flags & FlagKind( flag ) ) == flag;
}
bool isNoTransition()const
{
return hasFlag( Flag::NoTransition );
}
bool isInput()const
{
return hasFlag( Flag::Input );
}
bool isOutput()const
{
return hasFlag( Flag::Output );
}
bool isInOut()const
{
return isInput() && isOutput();
}
bool isImage()const
{
return hasFlag( Flag::Image );
}
bool isBuffer()const
{
return hasFlag( Flag::Buffer );
}
bool isClearable()const
{
return hasFlag( Flag::Clearable );
}
bool isUniformBuffer()const
{
return isBuffer() && bufferAttach.isUniform();
}
bool isUniformBufferView()const
{
return isBuffer() && bufferAttach.isUniformView();
}
bool isStorageBuffer()const
{
return isBuffer() && bufferAttach.isStorage();
}
bool isTransferBuffer()const
{
return isBuffer() && bufferAttach.isTransfer();
}
bool isTransferInputBuffer()const
{
return isInput() && isTransferBuffer();
}
bool isTransferOutputBuffer()const
{
return isOutput() && isTransferBuffer();
}
bool isClearableBuffer()const
{
return isBuffer()
&& isOutput()
&& isClearable();
}
bool isClearableImage()const
{
return isImage()
&& isOutput()
&& isClearable();
}
bool isStorageBufferView()const
{
return isBuffer() && bufferAttach.isStorageView();
}
bool isTransitionBuffer()const
{
return isBuffer() && bufferAttach.isTransition();
}
bool isTransitionBufferView()const
{
return isBuffer() && bufferAttach.isTransitionView();
}
bool isBufferView()const
{
return isBuffer() && bufferAttach.isView();
}
bool isSampledImageView()const
{
return isImage() && imageAttach.isSampledView();
}
bool isStorageImageView()const
{
return isImage() && imageAttach.isStorageView();
}
bool isTransferImageView()const
{
return isImage() && imageAttach.isTransferView();
}
bool isTransitionImageView()const
{
return isImage() && imageAttach.isTransitionView();
}
bool isDepthImageTarget()const
{
return isImage() && imageAttach.isDepthTarget();
}
bool isStencilImageTarget()const
{
return isImage() && imageAttach.isStencilTarget();
}
bool isColourImageTarget()const
{
return !isSampledImageView()
&& !isTransitionImageView()
&& !isStorageImageView()
&& !isTransferImageView()
&& !isDepthImageTarget()
&& !isStencilImageTarget();
}
bool isColourInputImageTarget()const
{
return isInput() && isColourImageTarget();
}
bool isColourOutputImageTarget()const
{
return isOutput() && isColourImageTarget();
}
bool isColourInOutImageTarget()const
{
return isInput() && isOutput() && isColourImageTarget();
}
bool isDepthInputImageTarget()const
{
return isInput() && isDepthImageTarget();
}
bool isDepthOutputImageTarget()const
{
return isOutput() && isDepthImageTarget();
}
bool isDepthInOutImageTarget()const
{
return isInput() && isOutput() && isDepthImageTarget();
}
bool isStencilClearingImageTarget()const
{
return isImage() && imageAttach.isStencilClearingTarget();
}
bool isStencilInputImageTarget()const
{
return isImage() && imageAttach.isStencilInputTarget();
}
bool isStencilOutputImageTarget()const
{
return isImage() && imageAttach.isStencilOutputTarget();
}
bool isStencilInOutImageTarget()const
{
return isStencilInputImageTarget() && isStencilOutputImageTarget();
}
bool isDepthStencilInputImageTarget()const
{
return isDepthInputImageTarget() && isStencilInputImageTarget();
}
bool isDepthStencilOutputImageTarget()const
{
return isDepthOutputImageTarget() && isStencilOutputImageTarget();
}
bool isDepthStencilInOutImageTarget()const
{
return isDepthInOutImageTarget() && isStencilInOutImageTarget();
}
bool isTransferInputImageView()const
{
return isInput() && isTransferImageView();
}
bool isTransferOutputImageView()const
{
return isOutput() && isTransferImageView();
}
bool isStorageInputImageView()const
{
return isInput() && isStorageImageView();
}
bool isStorageOutputImageView()const
{
return isOutput() && isStorageImageView();
}
BufferSubresourceRange const & getBufferRange()const
{
return getSubresourceRange( bufferAttach.buffer() );
}
ClearValue const & getClearValue()const
{
return imageAttach.clearValue;
}
AttachmentLoadOp getLoadOp()const
{
return imageAttach.loadOp;
}
AttachmentLoadOp getStencilLoadOp()const
{
return imageAttach.stencilLoadOp;
}
AttachmentStoreOp getStoreOp()const
{
return imageAttach.storeOp;
}
AttachmentStoreOp getStencilStoreOp()const
{
return imageAttach.stencilStoreOp;
}
PipelineColorBlendAttachmentState getBlendState()const
{
return imageAttach.blendState;
}
/**@}*/
/**
*\brief
* Creates a default empty attachment.
*/
static Attachment createDefault( ImageViewIdArray views )
{
return Attachment{ std::move( views ) };
}
static Attachment createDefault( BufferViewIdArray views )
{
return Attachment{ std::move( views ) };
}
static Attachment createDefault( ImageViewId view )
{
return createDefault( ImageViewIdArray{ view } );
}
static Attachment createDefault( BufferViewId view )
{
return createDefault( BufferViewIdArray{ view } );
}
/**
*\name
* Members.
*/
/**@[*/
FramePass const * pass{};
std::string name{};
ImageAttachment imageAttach{};
BufferAttachment bufferAttach{};
std::vector< Source > source{};
FlagKind flags{};
/**@}*/
CRG_API Attachment( ImageViewId view
, Attachment const & origin );
CRG_API Attachment( BufferViewId view
, Attachment const & origin );
CRG_API explicit Attachment( ImageViewIdArray view );
CRG_API explicit Attachment( BufferViewIdArray view );
Attachment( FlagKind flags
, std::string name
, FramePass const * pass
, ImageAttachment attach
, Token token );
Attachment( FlagKind flags
, std::string name
, FramePass const * pass
, BufferAttachment attach
, Token token );
Attachment( FlagKind flags
, FramePass const & pass
, std::string name
, ImageAttachment::FlagKind imageFlags
, ImageViewIdArray views
, AttachmentLoadOp loadOp
, AttachmentStoreOp storeOp
, AttachmentLoadOp stencilLoadOp
, AttachmentStoreOp stencilStoreOp
, ClearValue clearValue
, PipelineColorBlendAttachmentState blendState
, ImageLayout wantedLayout
, Token token );
Attachment( FlagKind flags
, FramePass const & pass
, std::string name
, BufferAttachment::FlagKind bufferFlags
, BufferViewIdArray views
, AccessState wantedAccess
, Token token );
private:
void initSources();
friend bool operator==( Attachment const & lhs
, Attachment const & rhs )
{
return lhs.pass == rhs.pass
&& lhs.flags == rhs.flags
&& lhs.imageAttach == rhs.imageAttach
&& lhs.bufferAttach == rhs.bufferAttach;
}
};
}
================================================
FILE: include/RenderGraph/AttachmentTransition.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "Attachment.hpp"
#include <vector>
namespace crg
{
template< typename DataT >
struct DataTransitionT
{
DataTransitionT( DataT data, Attachment outputAttach, Attachment inputAttach )noexcept
: data{ std::move( data ) }
, outputAttach{ std::move( outputAttach ) }
, inputAttach{ std::move( inputAttach ) }
{
}
DataT data;
Attachment outputAttach;
Attachment inputAttach;
private:
friend bool operator==( DataTransitionT const & lhs, DataTransitionT const & rhs )
{
return match( lhs.data, rhs.data )
&& lhs.outputAttach == rhs.outputAttach
&& lhs.inputAttach == rhs.inputAttach;
}
};
struct AttachmentTransitions
{
ImageTransitionArray imageTransitions;
BufferTransitionArray bufferTransitions;
};
AttachmentTransitions mergeIdenticalTransitions( AttachmentTransitions value );
}
================================================
FILE: include/RenderGraph/BufferData.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "Id.hpp"
namespace crg
{
/**
*\brief
* Basic buffer data, from which buffers will be created.
*/
struct BufferData
{
std::string name;
BufferCreateInfo info;
explicit BufferData( std::string name = {}
, BufferCreateFlags flags = {}
, DeviceSize size = {}
, BufferUsageFlags usage = {}
, MemoryPropertyFlags memory = MemoryPropertyFlags::eDeviceLocal )
: name{ std::move( name ) }
, info{ flags, size, usage, memory }
{
}
private:
friend bool operator==( BufferData const & lhs, BufferData const & rhs ) = default;
};
}
================================================
FILE: include/RenderGraph/BufferViewData.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "Id.hpp"
namespace crg
{
/**
*\brief
* Basic buffer view data, from which views will be created.
*/
struct BufferViewData
{
std::string name;
BufferId buffer;
BufferViewCreateInfo info;
BufferViewIdArray source{};
explicit BufferViewData( std::string name = {}
, BufferId buffer = BufferId{}
, BufferSubresourceRange subresourceRange = {}
, PixelFormat format = PixelFormat::eUNDEFINED )
: name{ std::move( name ) }
, buffer{ std::move( buffer ) }
, info{ format, subresourceRange }
{
}
private:
friend bool operator==( BufferViewData const & lhs, BufferViewData const & rhs )
{
return lhs.buffer == rhs.buffer
&& lhs.info == rhs.info;
}
};
struct VertexBuffer
{
explicit VertexBuffer( BufferViewId pbuffer = BufferViewId{}
, VkVertexInputAttributeDescriptionArray pvertexAttribs = {}
, VkVertexInputBindingDescriptionArray pvertexBindings = {} )
: buffer{ std::move( pbuffer ) }
, vertexAttribs{ std::move( pvertexAttribs ) }
, vertexBindings{ std::move( pvertexBindings ) }
{
doUpdateState();
}
VertexBuffer( VertexBuffer const & rhs )
: buffer{ rhs.buffer }
, vertexAttribs{ rhs.vertexAttribs }
, vertexBindings{ rhs.vertexBindings }
{
doUpdateState();
}
VertexBuffer( VertexBuffer && rhs )noexcept
: buffer{ std::move( rhs.buffer ) }
, vertexAttribs{ std::move( rhs.vertexAttribs ) }
, vertexBindings{ std::move( rhs.vertexBindings ) }
{
doUpdateState();
}
VertexBuffer & operator=( VertexBuffer const & rhs )
{
buffer = rhs.buffer;
vertexAttribs = rhs.vertexAttribs;
vertexBindings = rhs.vertexBindings;
doUpdateState();
return *this;
}
VertexBuffer & operator=( VertexBuffer && rhs )noexcept
{
buffer = std::move( rhs.buffer );
vertexAttribs = std::move( rhs.vertexAttribs );
vertexBindings = std::move( rhs.vertexBindings );
doUpdateState();
return *this;
}
BufferViewId buffer;
VkVertexInputAttributeDescriptionArray vertexAttribs;
VkVertexInputBindingDescriptionArray vertexBindings;
VkPipelineVertexInputStateCreateInfo inputState{ VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, nullptr, {}, {}, {}, {}, {} };
private:
void doUpdateState()
{
inputState.vertexAttributeDescriptionCount = uint32_t( vertexAttribs.size() );
inputState.pVertexAttributeDescriptions = vertexAttribs.data();
inputState.vertexBindingDescriptionCount = uint32_t( vertexBindings.size() );
inputState.pVertexBindingDescriptions = vertexBindings.data();
}
};
struct IndexBuffer
{
explicit IndexBuffer( BufferViewId pbuffer = BufferViewId{} )
: buffer{ std::move( pbuffer ) }
{
}
BufferViewId buffer;
private:
friend bool operator==( IndexBuffer const & lhs, IndexBuffer const & rhs ) = default;
};
struct IndirectBuffer
{
explicit IndirectBuffer( BufferViewId pbuffer
, uint32_t pstride )
: buffer{ std::move( pbuffer ) }
, stride{ pstride }
{
}
BufferViewId buffer;
uint32_t stride;
private:
friend bool operator==( IndirectBuffer const & lhs, IndirectBuffer const & rhs ) = default;
};
template<>
struct DefaultValueGetterT< VertexBuffer >
{
static VertexBuffer get()
{
VertexBuffer const result{};
return result;
}
};
template<>
struct DefaultValueGetterT< IndexBuffer >
{
static IndexBuffer get()
{
IndexBuffer const result{ BufferViewId{} };
return result;
}
};
template<>
struct DefaultValueGetterT< IndirectBuffer >
{
static IndirectBuffer get()
{
IndirectBuffer const result{ BufferViewId{}, 0u };
return result;
}
};
}
================================================
FILE: include/RenderGraph/DotExport.hpp
================================================
/*
See LICENSE file in root folder.
*/
#pragma once
#include "RenderGraph/FrameGraphPrerequisites.hpp"
#pragma warning( push )
#pragma warning( disable: 4365 )
#pragma warning( disable: 5262 )
#include <map>
#include <ostream>
#include <string>
#include <sstream>
#pragma warning( pop )
namespace crg::dot
{
struct Config
{
bool withColours{};
bool withIds{};
bool withGroups{};
bool splitGroups{};
std::string toRemove{};
};
using DisplayResult = std::map< std::string, std::stringstream, std::less<> >;
CRG_API DisplayResult displayPasses( RunnableGraph const & value
, Config const & config );
CRG_API DisplayResult displayTransitions( RunnableGraph const & value
, Config const & config );
CRG_API void displayPasses( std::ostream & stream
, RunnableGraph const & value
, Config const & config );
CRG_API void displayTransitions( std::ostream & stream
, RunnableGraph const & value
, Config const & config );
}
================================================
FILE: include/RenderGraph/Exception.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "RenderGraph/FrameGraphPrerequisites.hpp"
#include <exception>
namespace crg
{
class Exception
: public std::exception
{
public:
Exception( std::string const & text
, std::string const & file
, int line )
: text{ file + ":" + std::to_string( line ) + " - " + text }
{
}
char const * what()const noexcept override
{
return text.c_str();
}
private:
std::string text;
};
#define CRG_Exception( text )\
throw crg::Exception{ text, __FILE__, __LINE__ }
}
================================================
FILE: include/RenderGraph/FrameGraph.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "Attachment.hpp"
#include "BufferData.hpp"
#include "BufferViewData.hpp"
#include "FramePassGroup.hpp"
#include "GraphNode.hpp"
#include "ImageData.hpp"
#include "ImageViewData.hpp"
#include "RecordContext.hpp"
#include <map>
#include <vector>
namespace crg
{
class FrameGraph
{
friend class RunnableGraph;
public:
/**
*\name
* Construction/Destruction.
*/
/**@{*/
FrameGraph( FrameGraph const & ) = delete;
FrameGraph & operator=( FrameGraph const & ) = delete;
FrameGraph & operator=( FrameGraph && )noexcept = delete;
FrameGraph( FrameGraph && )noexcept = default;
~FrameGraph()noexcept = default;
CRG_API explicit FrameGraph( ResourceHandler & handler
, std::string name = "FrameGraph" );
/**@}*/
/**
*\name
* Resource creation.
*/
/**@{*/
CRG_API BufferId createBuffer( BufferData const & img );
CRG_API BufferViewId createView( BufferViewData const & view );
CRG_API ImageId createImage( ImageData const & img );
CRG_API ImageViewId createView( ImageViewData const & view );
/**@}*/
/**
*\name
* Views merging.
*/
/**@{*/
/**
*\brief
* Creates a view which represents the given views merging.
*/
CRG_API ImageViewId mergeViews( ImageViewIdArray const & views
, bool mergeMipLevels = true
, bool mergeArrayLayers = true );
/**
*\brief
* Creates a view which represents the given views merging.
*/
CRG_API BufferViewId mergeViews( BufferViewIdArray const & views );
/**@}*/
/**
*\name
* Attachments merging.
*/
/**@{*/
/**
*\brief
* Creates a view which represents the given views merging.
*/
CRG_API Attachment const * mergeAttachments( AttachmentArray const & attachments
, bool mergeMipLevels = true
, bool mergeArrayLayers = true );
/**@}*/
/**
*\name
* Passes and groups.
*/
/**@{*/
CRG_API FramePass & createPass( std::string const & name
, RunnablePassCreator runnableCreator );
CRG_API FramePassGroup & createPassGroup( std::string const & name );
/**@}*/
/**
*\name
* Compilation.
*/
/**@{*/
CRG_API RunnableGraphPtr compile( GraphContext & context );
/**@}*/
/**
*\name
* Dependencies.
*/
/**@[*/
void addDependency( FrameGraph const & pgraph )
{
m_depends.push_back( &pgraph );
}
/**@}*/
/**
*\name
* Getters.
*/
/**@{*/
CRG_API LayoutState getFinalLayoutState( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & range )const;
CRG_API LayoutState getFinalLayoutState( ImageViewId view
, uint32_t passIndex = 0u )const;
CRG_API AccessState const & getFinalAccessState( BufferId buffer
, BufferSubresourceRange const & range )const;
CRG_API AccessState const & getFinalAccessState( BufferViewId view
, uint32_t passIndex = 0u )const;
CRG_API void addInput( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & range
, LayoutState const & outputLayout );
CRG_API void addInput( ImageViewId view
, LayoutState const & outputLayout );
CRG_API LayoutState getInputLayoutState( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & range )const;
CRG_API LayoutState getInputLayoutState( ImageViewId view )const;
CRG_API void addOutput( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & range
, LayoutState const & outputLayout );
CRG_API void addOutput( ImageViewId view
, LayoutState const & outputLayout );
CRG_API LayoutState getOutputLayoutState( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & range )const;
CRG_API LayoutState getOutputLayoutState( ImageViewId view )const;
CRG_API LayerLayoutStatesMap const & getOutputLayoutStates()const;
ResourceHandler & getHandler()noexcept
{
return m_handler;
}
std::string const & getName()const noexcept
{
return m_name;
}
FrameGraphArray const & getDependencies()const noexcept
{
return m_depends;
}
RecordContext const & getFinalStates()const noexcept
{
return m_finalState;
}
FramePassGroup & getDefaultGroup()const noexcept
{
return *m_defaultGroup;
}
/**@}*/
private:
void registerFinalState( RecordContext const & context );
private:
ResourceHandler & m_handler;
std::string m_name;
FramePassGroupPtr m_defaultGroup;
std::set< BufferId > m_buffers;
std::set< BufferViewId > m_bufferViews;
std::set< ImageId > m_images;
std::set< ImageViewId > m_imageViews;
std::map< std::string, ImageViewId, std::less<> > m_attachViews;
RecordContext m_finalState;
FrameGraphArray m_depends;
LayerLayoutStatesHandler m_inputs;
LayerLayoutStatesHandler m_outputs;
std::unordered_map< size_t, AttachmentPtr > m_mergedAttachments;
};
}
================================================
FILE: include/RenderGraph/FrameGraphBase.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#pragma warning( push )
#pragma warning( disable: 4365 )
#pragma warning( disable: 4865 )
#pragma warning( disable: 5262 )
#include <vulkan/vulkan.h>
#include <algorithm>
#include <bit>
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <set>
#include <unordered_map>
#include <vector>
#pragma warning( pop )
#if !defined( _WIN32 ) || defined( CRG_BUILD_STATIC )
# define CRG_API
#else
# if defined( RenderGraph_EXPORTS )
# define CRG_API __declspec( dllexport )
# else
# define CRG_API __declspec( dllimport )
# endif
#endif
namespace crg
{
struct Attachment;
struct AttachmentTransitions;
struct BufferData;
struct BufferViewData;
struct FramePass;
struct FramePassGroup;
struct GraphContext;
struct GraphNode;
struct ImageData;
struct ImageViewData;
struct IndexBuffer;
struct IndirectBuffer;
struct LayoutState;
struct PipelineState;
struct RootNode;
struct SamplerDesc;
struct SemaphoreWait;
struct Texcoord;
struct VertexBuffer;
struct WriteDescriptorSet;
class ContextResourcesCache;
class Exception;
class Fence;
class FrameGraph;
class FramePassTimer;
class GraphVisitor;
class ImageCopy;
class PipelinePass;
class RecordContext;
class RenderPass;
class RenderQuad;
class ResourceHandler;
class ResourcesCache;
class RunnableGraph;
class RunnablePass;
template< typename DataT >
struct Id;
template< typename DataT >
struct DataTransitionT;
template< typename DataT >
using DataTransitionArrayT = std::vector< DataTransitionT< DataT > >;
template< typename VkTypeT >
struct ContextObjectT;
template< typename TypeT >
struct DefaultValueGetterT;
template< typename TypeT >
struct RawTyperT;
using BufferId = Id< BufferData >;
using BufferViewId = Id< BufferViewData >;
using ImageId = Id< ImageData >;
using ImageViewId = Id< ImageViewData >;
using AccessState = PipelineState;
using DependencyCache = std::unordered_map< size_t, bool >;
using PassDependencyCache = std::unordered_map< FramePass const *, DependencyCache >;
using DeviceSize = VkDeviceSize;
using AttachmentPtr = std::unique_ptr< Attachment >;
using FramePassPtr = std::unique_ptr< FramePass >;
using FramePassGroupPtr = std::unique_ptr< FramePassGroup >;
using GraphNodePtr = std::unique_ptr< GraphNode >;
using RunnableGraphPtr = std::unique_ptr< RunnableGraph >;
using RunnablePassPtr = std::unique_ptr< RunnablePass >;
using VertexBufferPtr = std::unique_ptr< VertexBuffer >;
using GraphAdjacentNode = GraphNode *;
using ConstGraphAdjacentNode = GraphNode const *;
/**
*\brief
* The transition between two states of an image view.
*/
using ImageTransition = DataTransitionT< ImageViewId >;
using ImageTransitionArray = DataTransitionArrayT< ImageViewId >;
/**
*\brief
* The transition between two states of a buffer.
*/
using BufferTransition = DataTransitionT< BufferViewId >;
using BufferTransitionArray = DataTransitionArrayT< BufferViewId >;
using AttachmentArray = std::vector< Attachment const * >;
using BufferViewIdArray = std::vector< BufferViewId >;
using FramePassPtrArray = std::vector< FramePassPtr >;
using FramePassGroupPtrArray = std::vector< FramePassGroupPtr >;
using FrameGraphArray = std::vector< FrameGraph const * >;
using FramePassArray = std::vector< FramePass const * >;
using GraphAdjacentNodeArray = std::vector< GraphAdjacentNode >;
using ConstGraphAdjacentNodeArray = std::vector< ConstGraphAdjacentNode >;
using GraphNodePtrArray = std::vector< GraphNodePtr >;
using WriteDescriptorSetArray = std::vector< WriteDescriptorSet >;
using AttachmentsNodeMap = std::map< ConstGraphAdjacentNode, AttachmentTransitions >;
using BufferMemoryMap = std::map< BufferId, std::pair< VkBuffer, VkDeviceMemory > >;
using BufferViewMap = std::map< BufferViewId, VkBufferView >;
using ImageMemoryMap = std::map< ImageId, std::pair< VkImage, VkDeviceMemory > >;
using ImageViewMap = std::map< ImageViewId, VkImageView >;
using ImageViewIdArray = std::vector< ImageViewId >;
using SemaphoreWaitArray = std::vector< SemaphoreWait >;
template< typename DataT >
using IdDataOwnerCont = std::map< Id< DataT >, std::unique_ptr< DataT > >;
using BufferIdDataOwnerCont = IdDataOwnerCont< BufferData >;
using BufferViewIdDataOwnerCont = IdDataOwnerCont< BufferViewData >;
using ImageIdDataOwnerCont = IdDataOwnerCont< ImageData >;
using ImageViewIdDataOwnerCont = IdDataOwnerCont< ImageViewData >;
using VkAttachmentDescriptionArray = std::vector< VkAttachmentDescription >;
using VkAttachmentReferenceArray = std::vector< VkAttachmentReference >;
using VkBufferArray = std::vector< VkBuffer >;
using VkBufferViewArray = std::vector< VkBufferView >;
using VkDescriptorBufferInfoArray = std::vector< VkDescriptorBufferInfo >;
using VkDescriptorImageInfoArray = std::vector< VkDescriptorImageInfo >;
using VkDescriptorSetLayoutBindingArray = std::vector< VkDescriptorSetLayoutBinding >;
using VkDescriptorPoolSizeArray = std::vector< VkDescriptorPoolSize >;
using VkImageViewArray = std::vector< VkImageView >;
using VkPipelineColorBlendAttachmentStateArray = std::vector< VkPipelineColorBlendAttachmentState >;
using VkPipelineShaderStageCreateInfoArray = std::vector< VkPipelineShaderStageCreateInfo >;
using VkPushConstantRangeArray = std::vector< VkPushConstantRange >;
using VkScissorArray = std::vector< VkRect2D >;
using VkSubpassDependencyArray = std::vector< VkSubpassDependency >;
using VkVertexInputAttributeDescriptionArray = std::vector< VkVertexInputAttributeDescription >;
using VkVertexInputBindingDescriptionArray = std::vector< VkVertexInputBindingDescription >;
using VkViewportArray = std::vector< VkViewport >;
using VkWriteDescriptorSetArray = std::vector< VkWriteDescriptorSet >;
using MipLayoutStates = std::map< uint32_t, LayoutState >;
using LayerLayoutStates = std::map< uint32_t, MipLayoutStates >;
using LayoutStateMap = std::unordered_map< uint32_t, LayerLayoutStates >;
using LayerLayoutStatesMap = std::map< uint32_t, LayerLayoutStates >;
using AccessStateMap = std::unordered_map< uint32_t, AccessState >;
using ViewsLayout = LayoutStateMap;
using BuffersLayout = AccessStateMap;
using ViewsLayoutPtr = std::unique_ptr< ViewsLayout >;
using BuffersLayoutPtr = std::unique_ptr< BuffersLayout >;
using ViewsLayouts = std::vector< ViewsLayoutPtr >;
using BuffersLayouts = std::vector< BuffersLayoutPtr >;
using ViewLayoutIterators = std::map< uint32_t, ViewsLayouts::iterator >;
using BufferLayoutIterators = std::map< uint32_t, BuffersLayouts::iterator >;
}
================================================
FILE: include/RenderGraph/FrameGraphEnums.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "FrameGraphBase.hpp"
#define CRG_MakeFlags( FlagBits )\
constexpr FlagBits operator|( FlagBits lhs, FlagBits rhs ) { return FlagBits( std::underlying_type_t< FlagBits >( lhs ) | std::underlying_type_t< FlagBits >( rhs ) ); }\
constexpr FlagBits operator&( FlagBits lhs, FlagBits rhs ) { return FlagBits( std::underlying_type_t< FlagBits >( lhs ) & std::underlying_type_t< FlagBits >( rhs ) ); }\
constexpr FlagBits operator^( FlagBits lhs, FlagBits rhs ) { return FlagBits( std::underlying_type_t< FlagBits >( lhs ) ^ std::underlying_type_t< FlagBits >( rhs ) ); }\
constexpr FlagBits & operator|=( FlagBits & lhs, FlagBits rhs ) { return lhs = lhs | rhs; }\
constexpr FlagBits & operator&=( FlagBits & lhs, FlagBits rhs ) { return lhs = lhs & rhs; }\
constexpr FlagBits & operator^=( FlagBits & lhs, FlagBits rhs ) { return lhs = lhs ^ rhs; }\
constexpr bool checkFlag( FlagBits lhs, FlagBits rhs ) { return ( lhs & rhs ) == rhs; }
namespace crg
{
enum class PixelFormat : int32_t
{
#define RGPF_ENUM_VALUE( name, value, components, alpha, colour, depth, stencil, compressed ) e##name = value,
#define RGPF_ENUM_NON_VALUE( name, value ) e##name = value,
#include "PixelFormat.inl"
};
enum class ImageType : int32_t
{
e1D = 0,
e2D = 1,
e3D = 2,
};
enum class SampleCount : int32_t
{
e1 = 0x00000001,
e2 = 0x00000002,
e4 = 0x00000004,
e8 = 0x00000008,
e16 = 0x00000010,
e32 = 0x00000020,
e64 = 0x00000040,
};
enum class ImageTiling : int32_t
{
eOptimal = 0,
eLinear = 1,
eDRMFormatModifier = 1000158000,
};
enum class ImageViewType : int32_t
{
e1D = 0,
e2D = 1,
e3D = 2,
eCube = 3,
e1DArray = 4,
e2DArray = 5,
eCubeArray = 6,
};
enum class ImageLayout : int32_t
{
eUndefined = 0,
eGeneral = 1,
eColorAttachment = 2,
eDepthStencilAttachment = 3,
eDepthStencilReadOnly = 4,
eShaderReadOnly = 5,
eTransferSrc = 6,
eTransferDst = 7,
ePreinitialized = 8,
eDepthReadOnlyStencilAttachment = 1000117000,
eDepthAttachmentStencilReadOnly = 1000117001,
eDepthAttachment = 1000241000,
eDepthReadOnly = 1000241001,
eStencilAttachment = 1000241002,
eStencilReadOnly = 1000241003,
eReadOnly = 1000314000,
eAttachment = 1000314001,
eRenderingLocalRead = 1000232000,
ePresentSrc = 1000001002,
eVideoDecodeDst = 1000024000,
eVideoDecodeSrc = 1000024001,
eVideoDecodeDpb = 1000024002,
eSharedPresent = 1000111000,
eFragmentDensityMap = 1000218000,
eFragmentShadingRateAttachment = 1000164003,
eVideoEncodeDst = 1000299000,
eVideoEncodeSrc = 1000299001,
eVideoEncodeDpb = 1000299002,
eAttachmentFeedbackLoop = 1000339000,
eVideoEncodeQuantizationMap = 1000553000,
};
enum class FilterMode : int32_t
{
eNearest,
eLinear,
};
enum class MipmapMode : int32_t
{
eNearest,
eLinear,
};
enum class WrapMode : int32_t
{
eRepeat,
eMirroredRepeat,
eClampToEdge,
eClampToBorder,
eMirrorClampToEdge,
};
enum class AttachmentLoadOp : int32_t
{
eLoad = 0,
eClear = 1,
eDontCare = 2,
eNone = 1000400000,
};
enum class AttachmentStoreOp : int32_t
{
eStore = 0,
eDontCare = 1,
eNone = 1000301000,
};
enum class BlendFactor : int32_t
{
eZero = 0,
eOne = 1,
eSrcColor = 2,
eOneMinusSrcColor = 3,
eDstColor = 4,
eOneMinusDstColor = 5,
eSrcAlpha = 6,
eOneMinusSrcAlpha = 7,
eDstAlpha = 8,
eOneMinusDstAlpha = 9,
eConstantColor = 10,
eOneMinusConstantColor = 11,
eConstantAlpha = 12,
eOneMinusConstantAlpha = 13,
eSrcAlphaSaturate = 14,
eSrc1Color = 15,
eOneMinusSrc1Color = 16,
eSrc1Alpha = 17,
eOneMinusSrc1Alpha = 18,
};
enum class BlendOp : int32_t
{
eAdd = 0,
eSubtract = 1,
eReverse_subtract = 2,
eMin = 3,
eMax = 4,
eZero = 1000148000,
eSrc = 1000148001,
eDst = 1000148002,
eSrcOver = 1000148003,
eDstOver = 1000148004,
eSrcIn = 1000148005,
eDstIn = 1000148006,
eSrcOut = 1000148007,
eDstOut = 1000148008,
eSrcAtop = 1000148009,
eDstAtop = 1000148010,
eXor = 1000148011,
eMultiply = 1000148012,
eScreen = 1000148013,
eOverlay = 1000148014,
eDarken = 1000148015,
eLighten = 1000148016,
eColordodge = 1000148017,
eColorburn = 1000148018,
eHardlight = 1000148019,
eSoftlight = 1000148020,
eDifference = 1000148021,
eExclusion = 1000148022,
eInvert = 1000148023,
eInvertRGB = 1000148024,
eLineardodge = 1000148025,
eLinearburn = 1000148026,
eVividlight = 1000148027,
eLinearlight = 1000148028,
ePinlight = 1000148029,
eHardmix = 1000148030,
eHSLHue = 1000148031,
eHSLSaturation = 1000148032,
eHSLColor = 1000148033,
eHSLLuminosity = 1000148034,
ePlus = 1000148035,
ePlusClamped = 1000148036,
ePlusClamped_alpha = 1000148037,
ePlusDarker = 1000148038,
eMinus = 1000148039,
eMinus_clamped = 1000148040,
eContrast = 1000148041,
eInvertOVG = 1000148042,
eRed = 1000148043,
eGreen = 1000148044,
eBlue = 1000148045,
};
enum class BufferCreateFlags : int32_t
{
eNone = 0x00000000,
eSparseBinding = 0x00000001,
eSparseResidency = 0x00000002,
eSparseAliased = 0x00000004,
eProtected = 0x00000008,
eDeviceAddressCaptureReplay = 0x00000010,
eDescriptorBufferCaptureReplay = 0x00000020,
eVideoProfileIndependent = 0x00000040,
};
CRG_MakeFlags( BufferCreateFlags )
enum class BufferUsageFlags : int32_t
{
eNone = 0x00000000,
eTransferSrc = 0x00000001,
eTransferDst = 0x00000002,
eUniformTexelBuffer = 0x00000004,
eStorageTexelBuffer = 0x00000008,
eUniformBuffer = 0x00000010,
eStorageBuffer = 0x00000020,
eIndexBuffer = 0x00000040,
eVertexBuffer = 0x00000080,
eIndirectBuffer = 0x00000100,
eShaderDeviceAddress = 0x00020000,
eVideoDecodeSrc = 0x00002000,
eVideoDecodeDst = 0x00004000,
eTransformFeedbackBuffer = 0x00000800,
eTransformFeedbackCounterBuffer = 0x00001000,
eConditionalRendering = 0x00000200,
eAccelerationStructureBuildInputReadOnly = 0x00080000,
eAccelerationStructureStorage = 0x00100000,
eShaderBindingTable = 0x00000400,
eVideoEncodeDst = 0x00008000,
eVideoEncodeSrc = 0x00010000,
eSamplerDescriptorBuffer = 0x00200000,
eResourceDescriptorBuffer = 0x00400000,
ePushDescriptorsDescriptorBuffer = 0x04000000,
eMicromapBuildInputReadOnly = 0x00800000,
eMicromapStorage = 0x01000000,
eTileMemory = 0x08000000,
};
CRG_MakeFlags( BufferUsageFlags )
enum class MemoryPropertyFlags : int32_t
{
eNone = 0x0000000,
eDeviceLocal = 0x00000001,
eHostVisible = 0x00000002,
eHostCoherent = 0x00000004,
eHostCached = 0x00000008,
eLazilyAllocated = 0x00000010,
eProtected = 0x00000020,
eDeviceCoherent = 0x00000040,
eDeviceUncached = 0x00000080,
eRdmaCapable = 0x00000100,
};
CRG_MakeFlags( MemoryPropertyFlags )
enum class ImageCreateFlags : int32_t
{
eNone = 0,
eSparseBinding = 0x00000001,
eSparseResidency = 0x00000002,
eSparseAliased = 0x00000004,
eMutableFormat = 0x00000008,
eCubeCompatible = 0x00000010,
eAlias = 0x00000400,
eSplitInstanceBindRegions = 0x00000040,
e2DArrayCompatible = 0x00000020,
eBlockTexelViewCompatible = 0x00000080,
eExtendedUsage = 0x00000100,
eProtected = 0x00000800,
eDisjoint = 0x00000200,
eCornerSampled = 0x00002000,
eSampleLocationsCompatibleDepth = 0x00001000,
eSubsampled = 0x00004000,
eDescriptorBufferCaptureReplay = 0x00010000,
eMultisampledRenderToSingleSampled = 0x00040000,
e2DViewCompatible = 0x00020000,
eVideoProfileIndependent = 0x00100000,
eFragmentDensityMapOffset = 0x00008000,
};
CRG_MakeFlags( ImageCreateFlags )
enum class ImageUsageFlags : int32_t
{
eNone = 0,
eTransferSrc = 0x00000001,
eTransferDst = 0x00000002,
eSampled = 0x00000004,
eStorage = 0x00000008,
eColorAttachment = 0x00000010,
eDepthStencilAttachment = 0x00000020,
eTransientAttachment = 0x00000040,
eInputAttachment = 0x00000080,
eHostTransfer = 0x00400000,
eVideoDecodeDst = 0x00000400,
eVideoDecodeSrc = 0x00000800,
eVideoDecodeDpb = 0x00001000,
eFragmentDensityMap = 0x00000200,
eFragmentShadingRateAttachment = 0x00000100,
eVideoEncodeDst = 0x00002000,
eVideoEncodeSrc = 0x00004000,
eVideoEncodeDpb = 0x00008000,
eAttachmentFeedbackLoop = 0x00080000,
eInvocationMask = 0x00040000,
eSampleWeight = 0x00100000,
eSampleBlockMatch = 0x00200000,
eTileMemory = 0x08000000,
eVideoEncodeQuantizationDeltaMap = 0x02000000,
eVideoEncodeEmphasisMap = 0x04000000,
};
CRG_MakeFlags( ImageUsageFlags )
enum class ImageViewCreateFlags : int32_t
{
eNone = 0,
eFragmentDensityMapDynamic = 0x00000001,
eDescriptorBufferCaptureReplay = 0x00000004,
eFragmentDensityMapDeferred = 0x00000002,
};
CRG_MakeFlags( ImageViewCreateFlags )
enum class ImageAspectFlags : int32_t
{
eNone = 0,
eColor = 0x00000001,
eDepth = 0x00000002,
eStencil = 0x00000004,
eDepthStencil = eDepth | eStencil,
eMetadata = 0x00000008,
ePlane0 = 0x00000010,
ePlane1 = 0x00000020,
ePlane2 = 0x00000040,
eMemoryPlane0 = 0x00000080,
eMemoryPlane1 = 0x00000100,
eMemoryPlane2 = 0x00000200,
eMemoryPlane3 = 0x00000400,
};
CRG_MakeFlags( ImageAspectFlags )
enum class PipelineStageFlags : int32_t
{
eNone = 0,
eTopOfPipe = 0x00000001,
eDrawIndirect = 0x00000002,
eVertexInput = 0x00000004,
eVertexShader = 0x00000008,
eTessellationControlShader = 0x00000010,
eTessellationEvaluationShader = 0x00000020,
eGeometryShader = 0x00000040,
eFragmentShader = 0x00000080,
eEarlyFragmentTests = 0x00000100,
eLateFragmentTests = 0x00000200,
eColorAttachmentOutput = 0x00000400,
eComputeShader = 0x00000800,
eTransfer = 0x00001000,
eBottomOfPipe = 0x00002000,
eHost = 0x00004000,
eAllGraphics = 0x00008000,
eAllCommands = 0x00010000,
eTransformFeedback = 0x01000000,
eConditionalRendering = 0x00040000,
eAccelerationStructureBuild = 0x02000000,
eRayTracingShader = 0x00200000,
eFragmentDensityProcess = 0x00800000,
eFragmentShadingRateAttachment = 0x00400000,
eTaskShader = 0x00080000,
eMeshShader = 0x00100000,
eCommandPreprocess = 0x00020000,
};
CRG_MakeFlags( PipelineStageFlags )
enum class AccessFlags : int32_t
{
eNone = 0,
eIndirectCommandRead = 0x00000001,
eIndexRead = 0x00000002,
eVertexAttributeRead = 0x00000004,
eUniformRead = 0x00000008,
eInputAttachmentRead = 0x00000010,
eShaderRead = 0x00000020,
eShaderWrite = 0x00000040,
eColorAttachmentRead = 0x00000080,
eColorAttachmentWrite = 0x00000100,
eDepthStencilAttachmentRead = 0x00000200,
eDepthStencilAttachmentWrite = 0x00000400,
eTransferRead = 0x00000800,
eTransferWrite = 0x00001000,
eHostRead = 0x00002000,
eHostWrite = 0x00004000,
eMemoryRead = 0x00008000,
eMemoryWrite = 0x00010000,
eTransformFeedbackWrite = 0x02000000,
eTransformFeedbackCounterRead = 0x04000000,
eTransformFeedbackCounterWrite = 0x08000000,
eConditionalRenderingRead = 0x00100000,
eColorAttachmentReadNonCoherent = 0x00080000,
eAccelerationStructureRead = 0x00200000,
eAccelerationStructureWrite = 0x00400000,
eFragmentDensityMapRead = 0x01000000,
eFragmentShadingRateAttachmentRead = 0x00800000,
eCommandPreprocessRead = 0x00020000,
eCommandPreprocessWrite = 0x00040000,
};
CRG_MakeFlags( AccessFlags )
enum class ColorComponentFlags : int32_t
{
eNone = 0,
eR = 0x00000001,
eG = 0x00000002,
eB = 0x00000004,
eA = 0x00000008,
};
CRG_MakeFlags( ColorComponentFlags )
}
================================================
FILE: include/RenderGraph/FrameGraphFunctions.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "FrameGraphStructs.hpp"
#include <assert.h>
namespace crg
{
CRG_API std::string_view getName( PixelFormat v );
CRG_API std::string_view getName( FilterMode v );
CRG_API std::string_view getName( MipmapMode v );
CRG_API std::string_view getName( WrapMode v );
CRG_API ImageCreateFlags getImageCreateFlags( ImageId const & image )noexcept;
CRG_API ImageCreateFlags getImageCreateFlags( ImageViewId const & image )noexcept;
CRG_API Extent3D const & getExtent( ImageId const & image )noexcept;
CRG_API Extent3D const & getExtent( ImageViewId const & image )noexcept;
CRG_API DeviceSize getSize( BufferId const & image )noexcept;
CRG_API DeviceSize getSize( BufferViewId const & image )noexcept;
CRG_API Extent3D getMipExtent( ImageViewId const & image )noexcept;
CRG_API PixelFormat getFormat( ImageId const & image )noexcept;
CRG_API PixelFormat getFormat( ImageViewId const & image )noexcept;
CRG_API ImageType getImageType( ImageId const & image )noexcept;
CRG_API ImageType getImageType( ImageViewId const & image )noexcept;
CRG_API ImageViewType getImageViewType( ImageViewId const & image )noexcept;
CRG_API uint32_t getMipLevels( ImageId const & image )noexcept;
CRG_API uint32_t getMipLevels( ImageViewId const & image )noexcept;
CRG_API uint32_t getArrayLayers( ImageId const & image )noexcept;
CRG_API uint32_t getArrayLayers( ImageViewId const & image )noexcept;
CRG_API ImageAspectFlags getAspectFlags( ImageViewId const & image )noexcept;
CRG_API ImageSubresourceRange const & getSubresourceRange( ImageViewId const & image )noexcept;
CRG_API BufferSubresourceRange const & getSubresourceRange( BufferViewId const & buffer )noexcept;
CRG_API AccessFlags getAccessMask( ImageLayout layout )noexcept;
CRG_API PipelineStageFlags getStageMask( ImageLayout layout )noexcept;
CRG_API PipelineState getPipelineState( PipelineStageFlags flags )noexcept;
CRG_API LayoutState makeLayoutState( ImageLayout layout )noexcept;
CRG_API ImageAspectFlags getAspectMask( PixelFormat format )noexcept;
CRG_API LayoutState const & addSubresourceRangeLayout( LayerLayoutStates & ranges
, ImageSubresourceRange const & range
, LayoutState const & newLayout );
CRG_API LayoutState getSubresourceRangeLayout( LayerLayoutStates const & ranges
, ImageSubresourceRange const & range );
CRG_API ImageSubresourceRange getVirtualRange( ImageId const & image
, ImageViewType viewType
, ImageSubresourceRange const & range )noexcept;
CRG_API bool match( ImageViewId const & lhs, ImageViewId const & rhs )noexcept;
CRG_API bool match( BufferViewId const & lhs, BufferViewId const & rhs )noexcept;
CRG_API ImageViewId const & resolveView( ImageViewId const & view
, uint32_t passIndex );
CRG_API BufferViewId const & resolveView( BufferViewId const & view
, uint32_t passIndex );
CRG_API void convert( SemaphoreWaitArray const & toWait
, std::vector< VkSemaphore > & semaphores
, std::vector< VkPipelineStageFlags > & dstStageMasks );
CRG_API std::vector< VkClearValue > convert( std::vector< ClearValue > const & v );
CRG_API VkQueryPool createQueryPool( GraphContext & context
, std::string const & name
, uint32_t passesCount );
CRG_API ClearColorValue getClearColorValue( ClearValue const & v );
CRG_API ClearDepthStencilValue getClearDepthStencilValue( ClearValue const & v );
constexpr VkFormat convert( PixelFormat v )noexcept
{
return VkFormat( v );
}
constexpr PixelFormat convert( VkFormat v )noexcept
{
return PixelFormat( v );
}
constexpr bool isDepthFormat( PixelFormat fmt )noexcept
{
return fmt == PixelFormat::eD16_UNORM
|| fmt == PixelFormat::eX8_D24_UNORM
|| fmt == PixelFormat::eD32_SFLOAT
|| fmt == PixelFormat::eD16_UNORM_S8_UINT
|| fmt == PixelFormat::eD24_UNORM_S8_UINT
|| fmt == PixelFormat::eD32_SFLOAT_S8_UINT;
}
constexpr bool isStencilFormat( PixelFormat fmt )noexcept
{
return fmt == PixelFormat::eS8_UINT
|| fmt == PixelFormat::eD16_UNORM_S8_UINT
|| fmt == PixelFormat::eD24_UNORM_S8_UINT
|| fmt == PixelFormat::eD32_SFLOAT_S8_UINT;
}
constexpr bool isColourFormat( PixelFormat fmt )noexcept
{
return !isDepthFormat( fmt ) && !isStencilFormat( fmt );
}
constexpr bool isDepthStencilFormat( PixelFormat fmt )noexcept
{
return isDepthFormat( fmt ) && isStencilFormat( fmt );
}
constexpr bool isDepthOrStencilFormat( PixelFormat fmt )noexcept
{
return isDepthFormat( fmt ) || isStencilFormat( fmt );
}
constexpr VkImageType convert( ImageType v )noexcept
{
return VkImageType( v );
}
constexpr ImageType convert( VkImageType v )noexcept
{
return ImageType( v );
}
constexpr VkSampleCountFlagBits convert( SampleCount v )noexcept
{
return VkSampleCountFlagBits( v );
}
constexpr SampleCount convert( VkSampleCountFlagBits v )noexcept
{
return SampleCount( v );
}
constexpr VkImageTiling convert( ImageTiling v )noexcept
{
return VkImageTiling( v );
}
constexpr ImageTiling convert( VkImageTiling v )noexcept
{
return ImageTiling( v );
}
constexpr VkImageViewType convert( ImageViewType v )noexcept
{
return VkImageViewType( v );
}
constexpr ImageViewType convert( VkImageViewType v )noexcept
{
return ImageViewType( v );
}
constexpr VkImageLayout convert( ImageLayout v )noexcept
{
return VkImageLayout( v );
}
constexpr ImageLayout convert( VkImageLayout v )noexcept
{
return ImageLayout( v );
}
constexpr VkFilter convert( FilterMode v )noexcept
{
return VkFilter( v );
}
constexpr FilterMode convert( VkFilter v )noexcept
{
return FilterMode( v );
}
constexpr VkSamplerMipmapMode convert( MipmapMode v )noexcept
{
return VkSamplerMipmapMode( v );
}
constexpr MipmapMode convert( VkSamplerMipmapMode v )noexcept
{
return MipmapMode( v );
}
constexpr VkSamplerAddressMode convert( WrapMode v )noexcept
{
return VkSamplerAddressMode( v );
}
constexpr WrapMode convert( VkSamplerAddressMode v )noexcept
{
return WrapMode( v );
}
constexpr VkAttachmentLoadOp convert( AttachmentLoadOp v )noexcept
{
return VkAttachmentLoadOp( v );
}
constexpr AttachmentLoadOp convert( VkAttachmentLoadOp v )noexcept
{
return AttachmentLoadOp( v );
}
constexpr VkBlendFactor convert( BlendFactor v )noexcept
{
return VkBlendFactor( v );
}
constexpr BlendFactor convert( VkBlendFactor v )noexcept
{
return BlendFactor( v );
}
constexpr VkBlendOp convert( BlendOp v )noexcept
{
return VkBlendOp( v );
}
constexpr BlendOp convert( VkBlendOp v )noexcept
{
return BlendOp( v );
}
constexpr VkAttachmentStoreOp convert( AttachmentStoreOp v )noexcept
{
return VkAttachmentStoreOp( v );
}
constexpr AttachmentStoreOp convert( VkAttachmentStoreOp v )noexcept
{
return AttachmentStoreOp( v );
}
constexpr VkBufferCreateFlags getBufferCreateFlags( BufferCreateFlags v )noexcept
{
return VkBufferCreateFlags( v );
}
constexpr BufferCreateFlags getBufferCreateFlags( VkBufferCreateFlags v )noexcept
{
return BufferCreateFlags( v );
}
constexpr VkBufferUsageFlags getBufferUsageFlags( BufferUsageFlags v )noexcept
{
return VkBufferUsageFlags( v );
}
constexpr BufferUsageFlags getBufferUsageFlags( VkBufferUsageFlags v )noexcept
{
return BufferUsageFlags( v );
}
constexpr VkMemoryPropertyFlags getMemoryPropertyFlags( MemoryPropertyFlags v )noexcept
{
return VkMemoryPropertyFlags( v );
}
constexpr MemoryPropertyFlags getMemoryPropertyFlags( VkMemoryPropertyFlags v )noexcept
{
return MemoryPropertyFlags( v );
}
constexpr VkImageCreateFlags getImageCreateFlags( ImageCreateFlags v )noexcept
{
return VkImageCreateFlags( v );
}
constexpr ImageCreateFlags getImageCreateFlags( VkImageCreateFlags v )noexcept
{
return ImageCreateFlags( v );
}
constexpr VkImageUsageFlags getImageUsageFlags( ImageUsageFlags v )noexcept
{
return VkImageUsageFlags( v );
}
constexpr ImageUsageFlags getImageUsageFlags( VkImageUsageFlags v )noexcept
{
return ImageUsageFlags( v );
}
constexpr VkImageViewCreateFlags getImageViewCreateFlags( ImageViewCreateFlags v )noexcept
{
return VkImageViewCreateFlags( v );
}
constexpr ImageViewCreateFlags getImageViewCreateFlags( VkImageViewCreateFlags v )noexcept
{
return ImageViewCreateFlags( v );
}
constexpr VkImageAspectFlags getImageAspectFlags( ImageAspectFlags v )noexcept
{
return VkImageAspectFlags( v );
}
constexpr ImageAspectFlags getImageAspectFlags( VkImageAspectFlags v )noexcept
{
return ImageAspectFlags( v );
}
constexpr VkPipelineStageFlags getPipelineStageFlags( PipelineStageFlags v )noexcept
{
return VkPipelineStageFlags( v );
}
constexpr PipelineStageFlags getPipelineStageFlags( VkPipelineStageFlags v )noexcept
{
return PipelineStageFlags( v );
}
constexpr VkAccessFlags getAccessFlags( AccessFlags v )noexcept
{
return VkAccessFlags( v );
}
constexpr AccessFlags getAccessFlags( VkAccessFlags v )noexcept
{
return AccessFlags( v );
}
constexpr VkColorComponentFlags getColorComponentFlags( ColorComponentFlags v )noexcept
{
return VkColorComponentFlags( v );
}
constexpr ColorComponentFlags getColorComponentFlags( VkColorComponentFlags v )noexcept
{
return ColorComponentFlags( v );
}
constexpr VkExtent2D convert( Extent2D const & v )noexcept
{
return std::bit_cast< VkExtent2D >( v );
}
constexpr Extent2D convert( VkExtent2D const & v )noexcept
{
return std::bit_cast< Extent2D >( v );
}
constexpr VkOffset2D convert( Offset2D const & v )noexcept
{
return std::bit_cast< VkOffset2D >( v );
}
constexpr Offset2D convert( VkOffset2D const & v )noexcept
{
return std::bit_cast< Offset2D >( v );
}
constexpr VkRect2D convert( Rect2D const & v )noexcept
{
return std::bit_cast< VkRect2D >( v );
}
constexpr Rect2D convert( VkRect2D const & v )noexcept
{
return std::bit_cast< Rect2D >( v );
}
constexpr VkExtent3D convert( Extent3D const & v )noexcept
{
return std::bit_cast< VkExtent3D >( v );
}
constexpr Extent3D convert( VkExtent3D const & v )noexcept
{
return std::bit_cast< Extent3D >( v );
}
constexpr VkOffset3D convert( Offset3D const & v )noexcept
{
return std::bit_cast< VkOffset3D >( v );
}
constexpr Offset3D convert( VkOffset3D const & v )noexcept
{
return std::bit_cast< Offset3D >( v );
}
constexpr VkImageSubresourceRange convert( ImageSubresourceRange const & v )noexcept
{
return std::bit_cast< VkImageSubresourceRange >( v );
}
constexpr ImageSubresourceRange convert( VkImageSubresourceRange const & v )noexcept
{
return std::bit_cast< ImageSubresourceRange >( v );
}
constexpr VkPipelineColorBlendAttachmentState convert( PipelineColorBlendAttachmentState const & v )noexcept
{
return std::bit_cast< VkPipelineColorBlendAttachmentState >( v );
}
constexpr PipelineColorBlendAttachmentState convert( VkPipelineColorBlendAttachmentState const & v )noexcept
{
return std::bit_cast< PipelineColorBlendAttachmentState >( v );
}
constexpr VkClearDepthStencilValue convert( ClearDepthStencilValue const & v )noexcept
{
return std::bit_cast< VkClearDepthStencilValue >( v );
}
constexpr VkClearColorValue convert( ClearColorValue const & v )noexcept
{
if ( v.isFloat32() )
{
VkClearColorValue result;
result.float32[0] = v.float32()[0];
result.float32[1] = v.float32()[1];
result.float32[2] = v.float32()[2];
result.float32[3] = v.float32()[3];
return result;
}
if ( v.isInt32() )
{
VkClearColorValue result;
result.int32[0] = v.int32()[0];
result.int32[1] = v.int32()[1];
result.int32[2] = v.int32()[2];
result.int32[3] = v.int32()[3];
return result;
}
VkClearColorValue result;
result.uint32[0] = v.uint32()[0];
result.uint32[1] = v.uint32()[1];
result.uint32[2] = v.uint32()[2];
result.uint32[3] = v.uint32()[3];
return result;
}
constexpr VkClearValue convert( ClearValue const & v )noexcept
{
if ( v.isColor() )
{
VkClearValue result;
result.color = convert( v.color() );
return result;
}
VkClearValue result;
result.depthStencil = convert( v.depthStencil() );
return result;
}
constexpr VkBufferViewCreateInfo convert( BufferViewCreateInfo const & v )noexcept
{
return VkBufferViewCreateInfo{ VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO, nullptr
, 0, VkBuffer{}, convert( v.format )
, v.subresourceRange.offset, v.subresourceRange.size };
}
constexpr BufferViewCreateInfo convert( VkBufferViewCreateInfo const & v )noexcept
{
return BufferViewCreateInfo{ convert( v.format )
, { v.offset, v.range } };
}
constexpr VkBufferCreateInfo convert( BufferCreateInfo const & v )noexcept
{
return VkBufferCreateInfo{ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, nullptr
, getBufferCreateFlags( v.flags ), v.size
, getBufferUsageFlags( v.usage )
, VK_SHARING_MODE_EXCLUSIVE, 0u, nullptr };
}
constexpr BufferCreateInfo convert( VkBufferCreateInfo const & v )noexcept
{
return BufferCreateInfo{ getBufferCreateFlags( v.flags )
, v.size
, getBufferUsageFlags( v.usage ) };
}
constexpr VkImageViewCreateInfo convert( ImageViewCreateInfo const & v )noexcept
{
return VkImageViewCreateInfo{ VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, nullptr
, getImageViewCreateFlags( v.flags ), VkImage{}, convert( v.viewType ), convert( v.format )
, { VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY }
, convert( v.subresourceRange ) };
}
constexpr ImageViewCreateInfo convert( VkImageViewCreateInfo const & v )noexcept
{
return ImageViewCreateInfo{ getImageViewCreateFlags( v.flags ), convert( v.viewType ), convert( v.format )
, convert( v.subresourceRange ) };
}
constexpr VkImageCreateInfo convert( ImageCreateInfo const & v )noexcept
{
return VkImageCreateInfo{ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, nullptr
, getImageCreateFlags( v.flags ), convert( v.imageType ), convert( v.format )
, convert( v.extent ), v.mipLevels, v.arrayLayers, convert( v.samples )
, convert( v.tiling ), getImageUsageFlags( v.usage )
, VK_SHARING_MODE_EXCLUSIVE, 0u, nullptr
, VK_IMAGE_LAYOUT_UNDEFINED };
}
constexpr ImageCreateInfo convert( VkImageCreateInfo const & v )noexcept
{
return ImageCreateInfo{ getImageCreateFlags( v.flags ), convert( v.imageType ), convert( v.format )
, convert( v.extent ), v.mipLevels, v.arrayLayers, convert( v.samples )
, convert( v.tiling ), getImageUsageFlags( v.usage ) };
}
inline VkImageSubresourceLayers getSubresourceLayers( ImageSubresourceRange const & range
, uint32_t layerCount )
{
return VkImageSubresourceLayers{ getImageAspectFlags( range.aspectMask )
, range.baseMipLevel
, range.baseArrayLayer
, layerCount };
}
inline VkImageSubresourceLayers getSubresourceLayers( ImageSubresourceRange const & range )
{
return getSubresourceLayers( range, range.layerCount );
}
inline VkImageSubresourceLayers getSubresourceLayer( ImageSubresourceRange const & range )
{
return getSubresourceLayers( range, 1u );
}
}
================================================
FILE: include/RenderGraph/FrameGraphPrerequisites.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "FrameGraphFunctions.hpp"
namespace crg
{
static constexpr PipelineColorBlendAttachmentState DefaultBlendState;
template< typename TypeT >
static inline const TypeT defaultV = DefaultValueGetterT< TypeT >::get();
template< typename TypeT >
static inline TypeT getDefaultV()
{
return DefaultValueGetterT< TypeT >::get();
}
template<>
struct DefaultValueGetterT< VkPipelineVertexInputStateCreateInfo >
{
static VkPipelineVertexInputStateCreateInfo get()
{
VkPipelineVertexInputStateCreateInfo const result{ []()
{
return VkPipelineVertexInputStateCreateInfo{ VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
, nullptr
, {}
, {}
, {}
, {}
, {} };
}() };
return result;
}
};
template< typename TypeT >
using RawTypeT = typename RawTyperT< TypeT >::Type;
}
================================================
FILE: include/RenderGraph/FrameGraphStructs.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "FrameGraphEnums.hpp"
#include <array>
#include <variant>
namespace crg
{
struct Offset2D
{
int32_t x{};
int32_t y{};
private:
friend bool operator==( Offset2D const & lhs, Offset2D const & rhs )noexcept = default;
};
struct Extent2D
{
uint32_t width{};
uint32_t height{};
private:
friend bool operator==( Extent2D const & lhs, Extent2D const & rhs )noexcept = default;
};
struct Rect2D
{
Offset2D offset{};
Extent2D extent{};
private:
friend bool operator==( Rect2D const & lhs, Rect2D const & rhs )noexcept = default;
};
struct Offset3D
{
int32_t x{};
int32_t y{};
int32_t z{};
private:
friend bool operator==( Offset3D const & lhs, Offset3D const & rhs )noexcept = default;
};
struct Extent3D
{
uint32_t width{};
uint32_t height{};
uint32_t depth{};
private:
friend bool operator==( Extent3D const & lhs, Extent3D const & rhs )noexcept = default;
};
struct Rect3D
{
Offset3D offset{};
Extent3D extent{};
private:
friend bool operator==( Rect3D const & lhs, Rect3D const & rhs )noexcept = default;
};
struct BufferSubresourceRange
{
DeviceSize offset{};
DeviceSize size{};
private:
friend bool operator==( BufferSubresourceRange const & lhs, BufferSubresourceRange const & rhs )noexcept = default;
friend std::strong_ordering operator<=>( BufferSubresourceRange const & lhs, BufferSubresourceRange const & rhs )noexcept
{
if ( auto c = lhs.offset <=> rhs.offset; c != std::strong_ordering::equal )
return c;
return lhs.size <=> rhs.size;
}
};
struct ImageSubresourceRange
{
ImageAspectFlags aspectMask{};
uint32_t baseMipLevel{};
uint32_t levelCount{};
uint32_t baseArrayLayer{};
uint32_t layerCount{};
private:
friend bool operator==( ImageSubresourceRange const & lhs, ImageSubresourceRange const & rhs )noexcept = default;
friend std::strong_ordering operator<=>( ImageSubresourceRange const & lhs, ImageSubresourceRange const & rhs )noexcept
{
if ( auto c = lhs.aspectMask <=> rhs.aspectMask; c != std::strong_ordering::equal )
return c;
if ( auto c = lhs.baseArrayLayer <=> rhs.baseArrayLayer; c != std::strong_ordering::equal )
return c;
if ( auto c = lhs.layerCount <=> rhs.layerCount; c != std::strong_ordering::equal )
return c;
if ( auto c = lhs.baseMipLevel <=> rhs.baseMipLevel; c != std::strong_ordering::equal )
return c;
return lhs.levelCount <=> rhs.levelCount;
}
};
struct BufferCreateInfo
{
BufferCreateFlags flags{};
DeviceSize size{};
BufferUsageFlags usage{};
MemoryPropertyFlags memory{};
private:
friend bool operator==( BufferCreateInfo const & lhs, BufferCreateInfo const & rhs )noexcept = default;
};
struct BufferViewCreateInfo
{
PixelFormat format{};
BufferSubresourceRange subresourceRange{};
private:
friend bool operator==( BufferViewCreateInfo const & lhs, BufferViewCreateInfo const & rhs )noexcept = default;
};
struct ImageCreateInfo
{
ImageCreateFlags flags{};
ImageType imageType{};
PixelFormat format{};
Extent3D extent{};
uint32_t mipLevels{};
uint32_t arrayLayers{};
SampleCount samples{};
ImageTiling tiling{};
ImageUsageFlags usage{};
MemoryPropertyFlags memory{};
private:
friend bool operator==( ImageCreateInfo const & lhs, ImageCreateInfo const & rhs )noexcept = default;
};
struct ImageViewCreateInfo
{
ImageViewCreateFlags flags{};
ImageViewType viewType{};
PixelFormat format{};
ImageSubresourceRange subresourceRange{};
private:
friend bool operator==( ImageViewCreateInfo const & lhs, ImageViewCreateInfo const & rhs )noexcept = default;
};
struct ClearColorValue
{
enum class ValueIndex
{
eFloat32,
eInt32,
eUInt32,
};
template< typename ValueT >
constexpr ClearColorValue( ValueT r, ValueT g, ValueT b, ValueT a )noexcept
: m_value{ std::array< ValueT, 4u >{ r, g, b, a } }
{
}
constexpr explicit ClearColorValue( std::array< float, 4u > v = { 0.0f, 0.0f, 0.0f, 0.0f } )noexcept
: m_value{ std::move( v ) }
{
}
constexpr explicit ClearColorValue( std::array< int32_t, 4u > v )noexcept
: m_value{ std::move( v ) }
{
}
constexpr explicit ClearColorValue( std::array< uint32_t, 4u > v )noexcept
: m_value{ std::move( v ) }
{
}
constexpr bool isFloat32()const noexcept
{
return m_value.index() == uint32_t( ValueIndex::eFloat32 );
}
constexpr bool isInt32()const noexcept
{
return m_value.index() == uint32_t( ValueIndex::eInt32 );
}
constexpr bool isUInt32()const noexcept
{
return m_value.index() == uint32_t( ValueIndex::eUInt32 );
}
constexpr std::array< float, 4u > const & float32()const noexcept
{
return std::get< uint32_t( ValueIndex::eFloat32 ) >( m_value );
}
constexpr std::array< int32_t, 4u > const & int32()const noexcept
{
return std::get< uint32_t( ValueIndex::eInt32 ) >( m_value );
}
constexpr std::array< uint32_t, 4u > const & uint32()const noexcept
{
return std::get< uint32_t( ValueIndex::eUInt32 ) >( m_value );
}
private:
std::variant< std::array< float, 4u >
, std::array< int32_t, 4u >
, std::array< uint32_t, 4u > > m_value;
friend bool operator==( ClearColorValue const & lhs, ClearColorValue const & rhs )noexcept = default;
};
struct ClearDepthStencilValue
{
float depth{};
uint32_t stencil{};
private:
friend bool operator==( ClearDepthStencilValue const & lhs, ClearDepthStencilValue const & rhs )noexcept = default;
};
struct ClearValue
{
enum class ValueIndex
{
eColor,
eDepthStencil,
};
constexpr explicit ClearValue( ClearColorValue v = ClearColorValue{} )noexcept
: m_value{ std::move( v ) }
{
}
constexpr explicit ClearValue( ClearDepthStencilValue v )noexcept
: m_value{ std::move( v ) }
{
}
constexpr bool isColor()const noexcept
{
return m_value.index() == uint32_t( ValueIndex::eColor );
}
constexpr bool isDepthStencil()const noexcept
{
return m_value.index() == uint32_t( ValueIndex::eDepthStencil );
}
constexpr ClearColorValue const & color()const noexcept
{
return std::get< uint32_t( ValueIndex::eColor ) >( m_value );
}
constexpr ClearDepthStencilValue const & depthStencil()const noexcept
{
return std::get< uint32_t( ValueIndex::eDepthStencil ) >( m_value );
}
private:
std::variant< ClearColorValue, ClearDepthStencilValue > m_value;
friend bool operator==( ClearValue const & lhs, ClearValue const & rhs )noexcept = default;
};
struct PipelineColorBlendAttachmentState
{
uint32_t blendEnable{ VK_FALSE };
BlendFactor srcColorBlendFactor{ BlendFactor::eOne };
BlendFactor dstColorBlendFactor{ BlendFactor::eZero };
BlendOp colorBlendOp{ BlendOp::eAdd };
BlendFactor srcAlphaBlendFactor{ BlendFactor::eOne };
BlendFactor dstAlphaBlendFactor{ BlendFactor::eZero };
BlendOp alphaBlendOp{ BlendOp::eAdd };
ColorComponentFlags colorWriteMask{ ColorComponentFlags::eR | ColorComponentFlags::eG | ColorComponentFlags::eB | ColorComponentFlags::eA };
private:
friend bool operator==( PipelineColorBlendAttachmentState const & lhs, PipelineColorBlendAttachmentState const & rhs )noexcept = default;
};
struct PipelineState
{
AccessFlags access{};
PipelineStageFlags pipelineStage{};
private:
friend bool operator==( PipelineState const & lhs, PipelineState const & rhs )noexcept = default;
};
struct LayoutState
{
ImageLayout layout{};
PipelineState state{};
};
template< typename VkTypeT >
struct ContextObjectT
{
ContextObjectT( ContextObjectT const & rhs ) = delete;
ContextObjectT( ContextObjectT && rhs )noexcept = delete;
ContextObjectT & operator=( ContextObjectT const & rhs ) = delete;
ContextObjectT & operator=( ContextObjectT && rhs )noexcept = delete;
explicit ContextObjectT( GraphContext & ctx
, VkTypeT obj = {}
, void( *dtor )( GraphContext &, VkTypeT & )noexcept = nullptr )
: context{ ctx }
, object{ obj }
, destroy{ dtor }
{
}
~ContextObjectT()noexcept
{
if ( destroy && object )
{
destroy( context, object );
}
}
GraphContext & context;
VkTypeT object;
void ( *destroy )( GraphContext &, VkTypeT & )noexcept;
};
struct SemaphoreWait
{
VkSemaphore semaphore{};
PipelineStageFlags dstStageMask{};
};
template< typename TypeT >
struct RawTyperT
{
using Type = TypeT;
};
}
================================================
FILE: include/RenderGraph/FramePass.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "RenderGraph/Attachment.hpp"
#include "RenderGraph/WriteDescriptorSet.hpp"
#include <functional>
#include <optional>
#include <unordered_map>
namespace crg
{
using RunnablePassCreator = std::function< RunnablePassPtr( FramePass const &
, GraphContext &
, RunnableGraph & ) >;
struct FramePass
{
public:
struct SampledAttachment
{
SampledAttachment( Attachment const * attach, SamplerDesc sampler )noexcept
: attach{ attach }
, sampler{ std::move( sampler ) }
{
}
Attachment const * attach;
SamplerDesc sampler;
};
public:
/**
*\name
* Dependencies.
*/
/**@{*/
/**
*\brief
* Gets the attachment parent from the givent one.
*\param[in] attach
* The child attachment.
*/
CRG_API Attachment const * getParentAttachment( Attachment const & attach )const;
/**@}*/
#pragma region Attachments
/**
*\name
* Attachments
*/
/**@{*/
# pragma region Uniform
/**
*\name
* Uniform
*/
/**@{*/
/**
*\brief
* Creates a uniform buffer multi-pass attachment.
*/
CRG_API void addInputUniformBuffer( BufferViewIdArray buffers
, uint32_t binding );
/**
*\brief
* Creates a uniform buffer single-pass attachment.
*/
template< typename EnumT >
void addInputUniformBufferT( BufferViewIdArray buffers
, EnumT binding )
{
addInputUniformBuffer( std::move( buffers ), uint32_t( binding ) );
}
/**
*\brief
* Creates a uniform buffer single-pass attachment.
*/
void addInputUniformBuffer( BufferViewId buffer
, uint32_t binding )
{
addInputUniformBuffer( BufferViewIdArray{ buffer }, binding );
}
/**
*\brief
* Creates a uniform buffer single-pass attachment.
*/
template< typename EnumT >
void addInputUniformBufferT( BufferViewId buffer
, EnumT binding )
{
addInputUniformBufferT( BufferViewIdArray{ buffer }, binding );
}
/**
*\brief
* Creates a sampled image multi-pass attachment.
*/
CRG_API void addInputSampledImage( ImageViewIdArray views
, uint32_t binding
, SamplerDesc samplerDesc = SamplerDesc{} );
/**
*\brief
* Creates a sampled image single-pass attachment.
*/
template< typename EnumT >
void addInputSampledImageT( ImageViewIdArray views
, EnumT binding
, SamplerDesc samplerDesc = SamplerDesc{} )
{
addInputSampledImage( std::move( views ), uint32_t( binding ), std::move( samplerDesc ) );
}
/**
*\brief
* Creates a sampled image single-pass attachment.
*/
void addInputSampledImage( ImageViewId view
, uint32_t binding
, SamplerDesc samplerDesc = SamplerDesc{} )
{
addInputSampledImage( ImageViewIdArray{ view }, binding, std::move( samplerDesc ) );
}
/**
*\brief
* Creates a sampled image single-pass attachment.
*/
template< typename EnumT >
void addInputSampledImageT( ImageViewId view
, EnumT binding
, SamplerDesc samplerDesc = SamplerDesc{} )
{
addInputSampledImageT( ImageViewIdArray{ view }, binding, std::move( samplerDesc ) );
}
/**
*\brief
* Creates an input uniform attachment.
*/
CRG_API void addInputUniform( Attachment const & attach
, uint32_t binding );
/**
*\brief
* Creates an input uniform attachment.
*/
template< typename EnumT >
void addInputUniformT( Attachment const & attach
, EnumT binding )
{
addInputUniform( attach, uint32_t( binding ) );
}
/**
*\brief
* Creates a sampled image attachment.
*/
CRG_API void addInputSampled( Attachment const & attach
, uint32_t binding
, SamplerDesc samplerDesc = SamplerDesc{} );
/**
*\brief
* Creates a sampled image attachment.
*/
template< typename EnumT >
void addInputSampledT( Attachment const & attach
, EnumT binding
, SamplerDesc samplerDesc = SamplerDesc{} )
{
addInputSampled( attach, uint32_t( binding ), std::move( samplerDesc ) );
}
/**@}*/
# pragma endregion
# pragma region Storage
/**
*\name
* Storage
*/
/**@{*/
/**
*\brief
* Creates a storage buffer multi-pass attachment.
*/
CRG_API void addInputStorageBuffer( BufferViewIdArray buffers
, uint32_t binding );
/**
*\brief
* Creates a storage buffer multi-pass attachment.
*/
template< typename EnumT >
void addInputStorageBufferT( BufferViewIdArray buffers
, EnumT binding )
{
addInputStorageBuffer( std::move( buffers ), uint32_t( binding ) );
}
/**
*\brief
* Creates a storage buffer single-pass attachment.
*/
void addInputStorageBuffer( BufferViewId buffer
, uint32_t binding )
{
addInputStorageBuffer( BufferViewIdArray{ buffer }, binding );
}
/**
*\brief
* Creates a storage buffer single-pass attachment.
*/
template< typename EnumT >
void addInputStorageBufferT( BufferViewId buffer
, EnumT binding )
{
addInputStorageBufferT( BufferViewIdArray{ buffer }, binding );
}
/**
*\brief
* Creates an input storage attachment.
*/
CRG_API void addInputStorageImage( ImageViewIdArray views
, uint32_t binding );
/**
*\brief
* Creates an input storage attachment.
*/
template< typename EnumT >
void addInputStorageImageT( ImageViewIdArray views
, EnumT binding )
{
addInputStorageImage( std::move( views ), uint32_t( binding ) );
}
/**
*\brief
* Creates an input storage attachment.
*/
void addInputStorageImage( ImageViewId view
, uint32_t binding )
{
addInputStorageImage( ImageViewIdArray{ view }, binding );
}
/**
*\brief
* Creates an input storage attachment.
*/
template< typename EnumT >
void addInputStorageImageT( ImageViewId view
, EnumT binding )
{
addInputStorageImageT( ImageViewIdArray{ view }, binding );
}
/**
*\brief
* Creates an input storage attachment.
*/
CRG_API void addInputStorage( Attachment const & attach
, uint32_t binding );
/**
*\brief
* Creates an input storage attachment.
*/
template< typename EnumT >
void addInputStorageT( Attachment const & attach
, EnumT binding )
{
addInputStorage( attach, uint32_t( binding ) );
}
/**
*\brief
* Creates an input/output storage attachment.
*/
CRG_API Attachment const * addInOutStorage( Attachment const & attach
, uint32_t binding );
/**
*\brief
* Creates an input/output storage attachment.
*/
template< typename EnumT >
Attachment const * addInOutStorageT( Attachment const & attach
, EnumT binding )
{
return addInOutStorage( attach, uint32_t( binding ) );
}
/**
*\brief
* Creates an output storage buffer multi-pass attachment.
*/
CRG_API Attachment const * addOutputStorageBuffer( BufferViewIdArray buffers
, uint32_t binding );
/**
*\brief
* Creates an output storage buffer multi-pass attachment.
*/
template< typename EnumT >
Attachment const * addOutputStorageBufferT( BufferViewIdArray buffers
, EnumT binding )
{
return addOutputStorageBuffer( std::move( buffers ), uint32_t( binding ) );
}
/**
*\brief
* Creates an output storage buffer single-pass attachment.
*/
Attachment const * addOutputStorageBuffer( BufferViewId buffer
, uint32_t binding )
{
return addOutputStorageBuffer( BufferViewIdArray{ buffer }, binding );
}
/**
*\brief
* Creates an output storage buffer single-pass attachment.
*/
template< typename EnumT >
Attachment const * addOutputStorageBufferT( BufferViewId buffer
, EnumT binding )
{
return addOutputStorageBufferT( BufferViewIdArray{ buffer }, binding );
}
/**
*\brief
* Creates a storage buffer multi-pass attachment that will be cleared a the beginning of the pass.
*/
CRG_API Attachment const * addClearableOutputStorageBuffer( BufferViewIdArray buffers
, uint32_t binding );
/**
*\brief
* Creates a storage buffer multi-pass attachment that will be cleared a the beginning of the pass.
*/
template< typename EnumT >
Attachment const * addClearableOutputStorageBufferT( BufferViewIdArray buffers
, EnumT binding )
{
return addClearableOutputStorageBuffer( std::move( buffers ), uint32_t( binding ) );
}
/**
*\brief
* Creates a storage buffer single-pass attachment that will be cleared a the beginning of the pass.
*/
Attachment const * addClearableOutputStorageBuffer( BufferViewId buffer
, uint32_t binding )
{
return addClearableOutputStorageBuffer( BufferViewIdArray{ buffer }, binding );
}
/**
*\brief
* Creates a storage buffer single-pass attachment that will be cleared a the beginning of the pass.
*/
template< typename EnumT >
Attachment const * addClearableOutputStorageBufferT( BufferViewId buffer
, EnumT binding )
{
return addClearableOutputStorageBufferT( BufferViewIdArray{ buffer }, binding );
}
/**
*\brief
* Creates a storage image multi-pass attachment.
*/
CRG_API Attachment const * addOutputStorageImage( ImageViewIdArray view
, uint32_t binding );
/**
*\brief
* Creates a storage image multi-pass attachment.
*/
template< typename EnumT >
Attachment const * addOutputStorageImageT( ImageViewIdArray views
, EnumT binding )
{
return addOutputStorageImage( std::move( views ), uint32_t( binding ) );
}
/**
*\brief
* Creates a storage image single-pass attachment.
*/
Attachment const * addOutputStorageImage( ImageViewId view
, uint32_t binding )
{
return addOutputStorageImage( ImageViewIdArray{ view }, binding );
}
/**
*\brief
* Creates a storage image single-pass attachment.
*/
template< typename EnumT >
Attachment const * addOutputStorageImageT( ImageViewId view
, EnumT binding )
{
return addOutputStorageImageT( ImageViewIdArray{ view }, binding );
}
/**
*\brief
* Creates a storage image multi-pass attachment.
*/
CRG_API Attachment const * addClearableOutputStorageImage( ImageViewIdArray views
, uint32_t binding
, ClearValue clearValue = ClearValue{} );
/**
*\brief
* Creates a storage image multi-pass attachment.
*/
template< typename EnumT >
Attachment const * addClearableOutputStorageImageT( ImageViewIdArray views
, EnumT binding
, ClearValue clearValue = ClearValue{} )
{
return addClearableOutputStorageImage( std::move( views )
, uint32_t( binding )
, std::move( clearValue ) );
}
/**
*\brief
* Creates a storage image single-pass attachment.
*/
Attachment const * addClearableOutputStorageImage( ImageViewId view
, uint32_t binding
, ClearValue clearValue = ClearValue{} )
{
return addClearableOutputStorageImage( ImageViewIdArray{ view }
, binding
, std::move( clearValue ) );
}
/**
*\brief
* Creates a storage image single-pass attachment.
*/
template< typename EnumT >
Attachment const * addClearableOutputStorageImageT( ImageViewId view
, EnumT binding
, ClearValue clearValue = ClearValue{} )
{
return addClearableOutputStorageImageT( ImageViewIdArray{ view }
, binding
, std::move( clearValue ) );
}
/**@}*/
# pragma endregion
# pragma region Transfer
/**
*\name
* Transfer
*/
/**@{*/
/**
*\brief
* Creates a transfer input external buffer.
*/
CRG_API void addInputTransferBuffer( BufferViewIdArray views );
/**
*\brief
* Creates a transfer input external buffer.
*/
void addInputTransferBuffer( BufferViewId view )
{
addInputTransferBuffer( BufferViewIdArray{ view } );
}
/**
*\brief
* Creates a transfer input external image.
*/
CRG_API void addInputTransferImage( ImageViewIdArray views );
/**
*\brief
* Creates a transfer input external image.
*/
void addInputTransferImage( ImageViewId view )
{
addInputTransferImage( ImageViewIdArray{ view } );
}
/**
*\brief
* Creates a transfer input attachment.
*/
CRG_API void addInputTransfer( Attachment const & attach );
/**
*\brief
* Creates a transfer input/output attachment.
*/
CRG_API Attachment const * addInOutTransfer( Attachment const & attach
, Attachment::Flag flag = {} );
/**
*\brief
* Creates a transfer output buffer multi-pass attachment.
*/
CRG_API Attachment const * addOutputTransferBuffer( BufferViewIdArray buffers );
/**
*\brief
* Creates a transfer output buffer single-pass attachment.
*/
Attachment const * addOutputTransferBuffer( BufferViewId buffer )
{
return addOutputTransferBuffer( BufferViewIdArray{ buffer } );
}
/**
*\brief
* Creates a transfer output multi-pass attachment.
*/
CRG_API Attachment const * addOutputTransferImage( ImageViewIdArray view );
/**
*\brief
* Creates an transfer output single-pass attachment.
*/
Attachment const * addOutputTransferImage( ImageViewId view )
{
return addOutputTransferImage( ImageViewIdArray{ view } );
}
/**@}*/
# pragma endregion
# pragma region Target
/**
*\name
* Target
*/
/**@{*/
/**
*\brief
* Creates an input colour attachment.
*/
CRG_API void addInputColourTargetImage( ImageViewIdArray views );
/**
*\brief
* Creates an input colour attachment.
*/
void addInputColourTargetImage( ImageViewId view )
{
return addInputColourTargetImage( ImageViewIdArray{ view } );
}
/**
*\brief
* Creates an input depth attachment.
*/
CRG_API void addInputDepthTargetImage( ImageViewIdArray views );
/**
*\brief
* Creates an input depth attachment.
*/
void addInputDepthTargetImage( ImageViewId view )
{
return addInputDepthTargetImage( ImageViewIdArray{ view } );
}
/**
*\brief
* Creates an input stencil attachment.
*/
CRG_API void addInputStencilTargetImage( ImageViewIdArray views );
/**
*\brief
* Creates an input stencil attachment.
*/
void addInputStencilTargetImage( ImageViewId view )
{
return addInputStencilTargetImage( ImageViewIdArray{ view } );
}
/**
*\brief
* Creates an input depth and stencil attachment.
*/
CRG_API void addInputDepthStencilTargetImage( ImageViewIdArray views );
/**
*\brief
* Creates an input depth and stencil attachment.
*/
void addInputDepthStencilTargetImage( ImageViewId view )
{
return addInputDepthStencilTargetImage( ImageViewIdArray{ view } );
}
/**
*\brief
* Creates an input colour attachment.
*/
CRG_API void addInputColourTarget( Attachment const & attach );
/**
*\brief
* Creates an input depth attachment.
*/
CRG_API void addInputDepthTarget( Attachment const & attach );
/**
*\brief
* Creates an input stencil attachment.
*/
CRG_API void addInputStencilTarget( Attachment const & attach );
/**
*\brief
* Creates an input depth and stencil attachment.
*/
CRG_API void addInputDepthStencilTarget( Attachment const & attach );
/**
*\brief
* Creates an in/out colour attachment.
*/
CRG_API Attachment const * addInOutColourTarget( Attachment const & attach
, PipelineColorBlendAttachmentState blendState = DefaultBlendState );
/**
*\brief
* Creates an in/out depth attachment.
*/
CRG_API Attachment const * addInOutDepthTarget( Attachment const & attach );
/**
*\brief
* Creates an in/out stencil attachment.
*/
CRG_API Attachment const * addInOutStencilTarget( Attachment const & attach );
/**
*\brief
* Creates an in/out depth and stencil attachment.
*/
CRG_API Attachment const * addInOutDepthStencilTarget( Attachment const & attach );
/**
*\brief
* Creates an output colour multi-pass attachment.
*/
CRG_API Attachment const * addOutputColourTarget( ImageViewIdArray views
, ClearColorValue clearValue = ClearColorValue{} );
/**
*\brief
* Creates an output colour single-pass attachment.
*/
Attachment const * addOutputColourTarget( ImageViewId view
, ClearColorValue clearValue = ClearColorValue{} )
{
return addOutputColourTarget( ImageViewIdArray{ view }
, std::move( clearValue ) );
}
/**
*\brief
* Creates an output depth multi-pass attachment.
*/
CRG_API Attachment const * addOutputDepthTarget( ImageViewIdArray views
, ClearDepthStencilValue clearValue = ClearDepthStencilValue{} );
/**
*\brief
* Creates an output depth single-pass attachment.
*/
Attachment const * addOutputDepthTarget( ImageViewId view
, ClearDepthStencilValue clearValue = ClearDepthStencilValue{} )
{
return addOutputDepthTarget( ImageViewIdArray{ view }
, std::move( clearValue ) );
}
/**
*\brief
* Creates an output stencil multi-pass attachment.
*/
CRG_API Attachment const * addOutputStencilTarget( ImageViewIdArray views
, ClearDepthStencilValue clearValue = ClearDepthStencilValue{} );
/**
*\brief
* Creates an output stencil single-pass attachment.
*/
Attachment const * addOutputStencilTarget( ImageViewId view
, ClearDepthStencilValue clearValue = ClearDepthStencilValue{} )
{
return addOutputStencilTarget( ImageViewIdArray{ view }
, std::move( clearValue ) );
}
/**
*\brief
* Creates an output depth and stencil multi-pass attachment.
*/
CRG_API Attachment const * addOutputDepthStencilTarget( ImageViewIdArray views
, ClearDepthStencilValue clearValue = ClearDepthStencilValue{} );
/**
*\brief
* Creates an output depth and stencil single-pass attachment.
*/
Attachment const * addOutputDepthStencilTarget( ImageViewId view
, ClearDepthStencilValue clearValue = ClearDepthStencilValue{} )
{
return addOutputDepthStencilTarget( ImageViewIdArray{ view }
, std::move( clearValue ) );
}
/**@}*/
/**@}*/
# pragma endregion
# pragma region Implicit
/**
*\name
* Implicit
*/
/**@{*/
/**
*\brief
* Creates an implicit attachment.
*\remarks
* This attachment will only be used to compute dependencies, and is considered an input, in that goal.
*/
CRG_API void addImplicit( Attachment const & attach
, AccessState wantedAccess );
/**
*\brief
* Creates an implicit attachment.
*\remarks
* This attachment will only be used to compute dependencies, and is considered an input, in that goal.
*/
CRG_API void addImplicit( Attachment const & attach
, ImageLayout wantedLayout );
/**@}*/
# pragma endregion
/**@}*/
#pragma endregion
/**
*\name
* Graph compilation.
*/
/**@{*/
CRG_API RunnablePassPtr createRunnable( GraphContext & context
, RunnableGraph & graph )const;
/**@}*/
CRG_API std::string getFullName()const;
CRG_API std::string getGroupName()const;
std::string const & getName()const
{
return m_name;
}
auto begin()const
{
return m_ownAttaches.cbegin();
}
auto end()const
{
return m_ownAttaches.cend();
}
FramePassGroup const & getGroup()const noexcept
{
return m_group;
}
FrameGraph const & getGraph()const noexcept
{
return m_graph;
}
uint32_t getId()const noexcept
{
return m_id;
}
std::map< uint32_t, Attachment const * > const & getUniforms()const noexcept
{
return m_uniforms;
}
std::map< uint32_t, SampledAttachment > const & getSampled()const noexcept
{
return m_sampled;
}
std::map< uint32_t, Attachment const * > const & getInputs()const noexcept
{
return m_inputs;
}
std::map< uint32_t, Attachment const * > const & getInouts()const noexcept
{
return m_inouts;
}
std::map< uint32_t, Attachment const * > const & getOutputs()const noexcept
{
return m_outputs;
}
std::vector< Attachment const * > const & getTargets()const noexcept
{
return m_targets;
}
protected:
friend struct FramePassGroup;
/**
*\name
* Construction.
*/
/**@{*/
CRG_API FramePass( FramePassGroup const & group
, FrameGraph & graph
, uint32_t id
, std::string const & name
, RunnablePassCreator runnableCreator );
/**@}*/
private:
CRG_API Attachment const * addColourTarget( std::string const & name
, Attachment::FlagKind flags
, ImageViewIdArray views
, AttachmentLoadOp loadOp
, AttachmentStoreOp storeOp
, ImageLayout wantedLayout = ImageLayout::eUndefined
, ClearColorValue clearValue = ClearColorValue{}
, PipelineColorBlendAttachmentState blendState = DefaultBlendState );
CRG_API Attachment const * addDepthTarget( std::string const & name
, Attachment::FlagKind flags
, ImageViewIdArray views
, AttachmentLoadOp loadOp
, AttachmentStoreOp storeOp
, ImageLayout wantedLayout = ImageLayout::eUndefined
, ClearDepthStencilValue clearValue = ClearDepthStencilValue{} );
CRG_API Attachment const * addStencilTarget( std::string const & name
, Attachment::FlagKind flags
, ImageAttachment::FlagKind stencilFlags
, ImageViewIdArray views
, AttachmentLoadOp stencilLoadOp
, AttachmentStoreOp stencilStoreOp
, ImageLayout wantedLayout = ImageLayout::eUndefined
, ClearDepthStencilValue clearValue = ClearDepthStencilValue{} );
CRG_API Attachment const * addDepthStencilTarget( std::string const & name
, Attachment::FlagKind flags
, ImageAttachment::FlagKind stencilFlags
, ImageViewIdArray views
, AttachmentLoadOp loadOp
, AttachmentStoreOp storeOp
, AttachmentLoadOp stencilLoadOp
, AttachmentStoreOp stencilStoreOp
, ImageLayout wantedLayout = ImageLayout::eUndefined
, ClearDepthStencilValue clearValue = ClearDepthStencilValue{} );
Attachment const * addOwnAttach( ImageViewIdArray views
, std::string attachName
, Attachment::FlagKind flags
, ImageAttachment::FlagKind imageFlags
, AttachmentLoadOp loadOp
, AttachmentStoreOp storeOp
, AttachmentLoadOp stencilLoadOp
, AttachmentStoreOp stencilStoreOp
, ClearValue clearValue
, PipelineColorBlendAttachmentState blendState
, ImageLayout wantedLayout
, Attachment const * parent );
Attachment const * addOwnAttach( BufferViewIdArray views
, std::string attachName
, Attachment::FlagKind flags
, BufferAttachment::FlagKind bufferFlags
, AccessState access
, Attachment const * parent );
Attachment * addOwnAttach( Attachment * mine
, Attachment const * parent );
private:
FramePassGroup const & m_group;
FrameGraph & m_graph;
uint32_t m_id;
std::map< uint32_t, Attachment const * > m_uniforms;
std::map< uint32_t, SampledAttachment > m_sampled;
std::map< uint32_t, Attachment const * > m_inputs;
std::map< uint32_t, Attachment const * > m_inouts;
std::map< uint32_t, Attachment const * > m_outputs;
std::vector< Attachment const * > m_targets;
RunnablePassCreator m_runnableCreator;
std::string m_name;
struct OwnAttachment
{
AttachmentPtr mine{};
Attachment const * parent{};
};
std::unordered_map< Attachment const *, OwnAttachment > m_ownAttaches;
};
}
================================================
FILE: include/RenderGraph/FramePassGroup.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "RenderGraph/FramePass.hpp"
#include <unordered_set>
namespace crg
{
struct FramePassGroup
{
friend class FrameGraph;
class Token
{
friend class FrameGraph;
friend struct FramePassGroup;
private:
Token() noexcept = default;
};
/**
*\name
* Construction.
*/
/**@{*/
CRG_API FramePassGroup( FrameGraph & graph
, uint32_t id
, std::string const & name
, Token token );
CRG_API FramePassGroup( FramePassGroup & parent
, uint32_t id
, std::string const & name
, Token token );
/**@}*/
public:
/**
*\name
* Passes.
*/
/**@{*/
CRG_API FramePass & createPass( std::string const & name
, RunnablePassCreator runnableCreator );
CRG_API FramePassGroup & createPassGroup( std::string const & name );
CRG_API bool hasPass( std::string const & name )const;
CRG_API void listPasses( FramePassArray & result )const;
/**@}*/
/**
*\name
* Group I/O.
*/
/**@{*/
CRG_API void addGroupInput( ImageViewId view );
CRG_API void addGroupOutput( ImageViewId view );
/**@}*/
/**
*\name
* Graph interface.
*/
/**@{*/
/**
*\copydoc crg::FrameGraph::getFinalLayoutState
*/
CRG_API LayoutState getFinalLayoutState( ImageViewId view
, uint32_t passIndex = 0u )const;
/**
*\copydoc crg::FrameGraph::createBuffer
*/
CRG_API BufferId createBuffer( BufferData const & img )const;
/**
*\copydoc crg::FrameGraph::createView
*/
CRG_API BufferViewId createView( BufferViewData const & view )const;
/**
*\copydoc crg::FrameGraph::createImage
*/
CRG_API ImageId createImage( ImageData const & img )const;
/**
*\copydoc crg::FrameGraph::createView
*/
CRG_API ImageViewId createView( ImageViewData const & view )const;
/**
*\copydoc crg::FrameGraph::addInput
*/
CRG_API void addInput( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & range
, LayoutState const & outputLayout );
/**
*\copydoc crg::FrameGraph::addInput
*/
CRG_API void addInput( ImageViewId view
, LayoutState const & outputLayout );
/**
*\copydoc crg::FrameGraph::addOutput
*/
CRG_API void addOutput( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & range
, LayoutState const & outputLayout );
/**
*\copydoc crg::FrameGraph::addOutput
*/
CRG_API void addOutput( ImageViewId view
, LayoutState const & outputLayout );
/**
*\copydoc crg::FrameGraph::mergeViews
*/
CRG_API ImageViewId mergeViews( ImageViewIdArray const & views
, bool mergeMipLevels = true
, bool mergeArrayLayers = true );
/**
*\copydoc crg::FrameGraph::mergeViews
*/
CRG_API BufferViewId mergeViews( BufferViewIdArray const & views );
/**
*\copydoc crg::FrameGraph::mergeAttachments
*/
CRG_API Attachment const * mergeAttachments( AttachmentArray const & attachments
, bool mergeMipLevels = true
, bool mergeArrayLayers = true );
/**@}*/
CRG_API std::string getFullName()const;
std::string const & getName()const noexcept
{
return m_name;
}
FramePassGroupPtrArray const & getGroups()const noexcept
{
return m_groups;
}
FramePassPtrArray const & getPasses()const noexcept
{
return m_passes;
}
FramePassGroup const * getParent()const noexcept
{
return m_parent;
}
uint32_t getId()const noexcept
{
return m_id;
}
private:
uint32_t m_id;
FramePassPtrArray m_passes;
FramePassGroupPtrArray m_groups;
FramePassGroup * m_parent{};
std::string m_name;
FrameGraph & m_graph;
std::unordered_set< uint32_t > m_inputs;
std::unordered_set< uint32_t > m_outputs;
};
}
================================================
FILE: include/RenderGraph/FramePassTimer.hpp
================================================
/*
See LICENSE file in root folder
*/
#ifndef ___CRG_RenderPassTimer_H___
#define ___CRG_RenderPassTimer_H___
#include "FrameGraphPrerequisites.hpp"
#include "Signal.hpp"
#include <array>
#include <chrono>
namespace crg
{
using Clock = std::chrono::high_resolution_clock;
using Nanoseconds = std::chrono::nanoseconds;
using FramePassDestroyFunc = std::function< void( FramePassTimer & ) >;
using OnFramePassDestroy = Signal< FramePassDestroyFunc >;
using OnFramePassDestroyConnection = SignalConnection< OnFramePassDestroy >;
using PassColour = std::array< float, 4u >;
enum class TimerScope
{
eGraph,
ePass,
eUpdate,
};
class FramePassTimerBlock
{
public:
CRG_API explicit FramePassTimerBlock( FramePassTimer & timer );
CRG_API FramePassTimerBlock( FramePassTimerBlock && rhs )noexcept;
FramePassTimerBlock & operator=( FramePassTimerBlock && rhs )noexcept = delete;
FramePassTimerBlock( FramePassTimerBlock const & ) = delete;
FramePassTimerBlock & operator=( FramePassTimerBlock const & ) = delete;
CRG_API ~FramePassTimerBlock()noexcept;
FramePassTimer * operator->()const
{
return m_timer;
}
private:
FramePassTimer * m_timer;
};
class FramePassTimer
{
friend class FramePassTimerBlock;
public:
FramePassTimer( FramePassTimer const & rhs ) = delete;
FramePassTimer( FramePassTimer && rhs )noexcept = delete;
FramePassTimer & operator=( FramePassTimer const & rhs ) = delete;
FramePassTimer & operator=( FramePassTimer && rhs )noexcept = delete;
/**
*\brief
* Reserves queries from given pool.
*\param[in] device
* The GPU device.
*\param[in] category
* The render pass category.
*\param[in] name
* The timer name.
*/
CRG_API FramePassTimer( GraphContext & context
, std::string const & name
, TimerScope scope
, VkQueryPool timerQueries
, uint32_t & baseQueryOffset );
/**
*\brief
* Owns its query pool.
*\param[in] device
* The GPU device.
*\param[in] category
* The render pass category.
*\param[in] name
* The timer name.
*/
CRG_API FramePassTimer( GraphContext & context
, std::string const & name
, TimerScope scope );
CRG_API ~FramePassTimer()noexcept;
/**
*\brief
* Starts the CPU timer, resets GPU time.
*/
CRG_API FramePassTimerBlock start();
/**
*\brief
* Notifies the given pass render.
*\param[in] passIndex
* The pass index.
*/
CRG_API void notifyPassRender( uint32_t passIndex = 0u )noexcept;
/**
*\brief
* Reset the timer's times.
*/
CRG_API void reset()noexcept;
/**
*\brief
* Writes the timestamp for the beginning of the pass.
*\param[in] cmd
* The command buffer used to record the begin timestamp.
*\param[in] passId
* The pass ID.
*/
CRG_API void beginPass( VkCommandBuffer commandBuffer
, std::string const & groupName
, uint32_t passId )noexcept;
/**
*\brief
* Writes the timestamp for the end of the pass.
*\param[in] cmd
* The command buffer used to record the end timestamp.
*\param[in] passIndex
* The pass index.
*/
CRG_API void endPass( VkCommandBuffer commandBuffer )noexcept;
/**
*\brief
* Retrieves GPU time from the query.
*/
CRG_API void retrieveGpuTime()noexcept;
/**
*\name
* Getters.
*/
/**@{*/
Nanoseconds getCpuTime()const noexcept
{
return m_cpuTime;
}
Nanoseconds getGpuTime()const noexcept
{
return m_gpuTime;
}
std::string const & getName()const noexcept
{
return m_name;
}
PassColour const & getColour()const noexcept
{
return m_colour;
}
TimerScope getScope()const noexcept
{
return m_scope;
}
/**@}*/
OnFramePassDestroy onDestroy;
private:
void stop()noexcept;
private:
GraphContext & m_context;
TimerScope m_scope{};
std::string m_name{};
PassColour m_colour;
Clock::time_point m_cpuSaveTime{};
Nanoseconds m_cpuTime{};
Nanoseconds m_gpuTime{};
VkQueryPool m_timerQueries{};
bool m_ownPool{};
struct Query
{
uint32_t offset{};
bool written{};
bool started{};
};
std::array< Query, 2u > m_queries;
};
}
#endif
================================================
FILE: include/RenderGraph/GraphContext.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "FrameGraphPrerequisites.hpp"
#include <array>
#include <functional>
#include <string>
#include <unordered_map>
#pragma warning( push )
#pragma warning( disable: 4365 )
#pragma warning( disable: 5262 )
#include <mutex>
#pragma warning( pop )
namespace crg
{
template< typename ObjectT >
struct DebugTypeTraits;
template<>
struct DebugTypeTraits< VkBuffer >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_BUFFER;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT;
#endif
static inline std::string Name{ "VkBuffer" };
};
template<>
struct DebugTypeTraits< VkCommandBuffer >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_COMMAND_BUFFER;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT;
#endif
static inline std::string Name{ "VkCommandBuffer" };
};
template<>
struct DebugTypeTraits< VkDevice >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_PHYSICAL_DEVICE;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT;
#endif
static inline std::string Name{ "VkDevice" };
};
template<>
struct DebugTypeTraits< VkInstance >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_INSTANCE;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT;
#endif
static inline std::string Name{ "VkInstance" };
};
template<>
struct DebugTypeTraits< VkPhysicalDevice >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_PHYSICAL_DEVICE;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT;
#endif
static inline std::string Name{ "VkPhysicalDevice" };
};
template<>
struct DebugTypeTraits< VkQueue >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_QUEUE;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT;
#endif
static inline std::string Name{ "VkQueue" };
};
#if ( VK_USE_64_BIT_PTR_DEFINES == 1 )
template<>
struct DebugTypeTraits< VkBufferView >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_BUFFER_VIEW;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT;
#endif
static inline std::string Name{ "VkBufferView" };
};
template<>
struct DebugTypeTraits< VkCommandPool >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_COMMAND_POOL;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT;
#endif
static inline std::string Name{ "VkCommandPool" };
};
template<>
struct DebugTypeTraits< VkDescriptorPool >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_DESCRIPTOR_POOL;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT;
#endif
static inline std::string Name{ "VkDescriptorPool" };
};
template<>
struct DebugTypeTraits< VkDescriptorSet >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_DESCRIPTOR_SET;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT;
#endif
static inline std::string Name{ "VkDescriptorSet" };
};
template<>
struct DebugTypeTraits< VkDescriptorSetLayout >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT;
#endif
static inline std::string Name{ "VkDescriptorSetLayout" };
};
template<>
struct DebugTypeTraits< VkDeviceMemory >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_DEVICE_MEMORY;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT;
#endif
static inline std::string Name{ "VkDeviceMemory" };
};
template<>
struct DebugTypeTraits< VkEvent >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_EVENT;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT;
#endif
static inline std::string Name{ "VkEvent" };
};
template<>
struct DebugTypeTraits< VkFence >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_FENCE;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT;
#endif
static inline std::string Name{ "VkFence" };
};
template<>
struct DebugTypeTraits< VkFramebuffer >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_FRAMEBUFFER;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT;
#endif
static inline std::string Name{ "VkFramebuffer" };
};
template<>
struct DebugTypeTraits< VkImage >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_IMAGE;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT;
#endif
static inline std::string Name{ "VkImage" };
};
template<>
struct DebugTypeTraits< VkImageView >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_IMAGE_VIEW;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT;
#endif
static inline std::string Name{ "VkImageView" };
};
template<>
struct DebugTypeTraits< VkPipeline >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_PIPELINE;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT;
#endif
static inline std::string Name{ "VkPipeline" };
};
template<>
struct DebugTypeTraits< VkPipelineLayout >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_PIPELINE_LAYOUT;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT;
#endif
static inline std::string Name{ "VkPipelineLayout" };
};
template<>
struct DebugTypeTraits< VkQueryPool >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_QUERY_POOL;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT;
#endif
static inline std::string Name{ "VkQueryPool" };
};
template<>
struct DebugTypeTraits< VkRenderPass >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_RENDER_PASS;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT;
#endif
static inline std::string Name{ "VkRenderPass" };
};
template<>
struct DebugTypeTraits< VkSampler >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_SAMPLER;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT;
#endif
static inline std::string Name{ "VkSampler" };
};
template<>
struct DebugTypeTraits< VkSemaphore >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_SEMAPHORE;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT;
#endif
static inline std::string Name{ "VkSemaphore" };
};
template<>
struct DebugTypeTraits< VkShaderModule >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_SHADER_MODULE;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT;
#endif
static inline std::string Name{ "VkShaderModule" };
};
template<>
struct DebugTypeTraits< VkSurfaceKHR >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_SURFACE_KHR;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT;
#endif
static inline std::string Name{ "VkSurfaceKHR" };
};
template<>
struct DebugTypeTraits< VkSwapchainKHR >
{
#if VK_EXT_debug_utils
static VkObjectType constexpr UtilsValue = VK_OBJECT_TYPE_SWAPCHAIN_KHR;
#endif
#if VK_EXT_debug_report || VK_EXT_debug_marker
static VkDebugReportObjectTypeEXT constexpr ReportValue = VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT;
#endif
static inline std::string Name{ "VkSwapchainKHR" };
};
#endif // ( VK_USE_64_BIT_PTR_DEFINES == 1 )
struct DebugBlockInfo
{
std::string markerName;
std::array< float, 4 > colour;
};
struct DeletionQueue
{
using CDtorFunc = void( GraphContext & );
using DtorFunc = std::function< CDtorFunc >;
using DtorFuncArray = std::vector< DtorFunc >;
public:
void push( DtorFunc func )
{
m_toDelete.push_back( std::move( func ) );
}
void clear( GraphContext & context )
{
DtorFuncArray tmp{ std::move( m_toDelete ) };
for ( DtorFunc const & func : tmp )
{
func( context );
}
}
private:
DtorFuncArray m_toDelete;
};
struct GraphContext
{
GraphContext( GraphContext const & ) = delete;
GraphContext( GraphContext && ) = delete;
GraphContext & operator=( GraphContext const & ) = delete;
GraphContext & operator=( GraphContext && ) = delete;
CRG_API GraphContext( VkDevice device
, VkPipelineCache cache
, VkAllocationCallbacks const * allocator
, VkPhysicalDeviceMemoryProperties memoryProperties
, VkPhysicalDeviceProperties properties
, bool separateDepthStencilLayouts
, PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr );
CRG_API ~GraphContext()noexcept;
VkDevice device{};
VkPipelineCache cache{};
VkAllocationCallbacks const * allocator{};
VkPhysicalDeviceMemoryProperties memoryProperties{};
VkPhysicalDeviceProperties properties{};
VkPhysicalDeviceFeatures features{};
bool separateDepthStencilLayouts;
DeletionQueue delQueue;
#define DECL_vkFunction( name )\
PFN_vk##name vk##name{ nullptr }
DECL_vkFunction( CreateGraphicsPipelines );
DECL_vkFunction( CreateComputePipelines );
DECL_vkFunction( DestroyPipeline );
DECL_vkFunction( CreatePipelineLayout );
DECL_vkFunction( DestroyPipelineLayout );
DECL_vkFunction( CreateDescriptorSetLayout );
DECL_vkFunction( DestroyDescriptorSetLayout );
DECL_vkFunction( CreateDescriptorPool );
DECL_vkFunction( DestroyDescriptorPool );
DECL_vkFunction( AllocateDescriptorSets );
DECL_vkFunction( FreeDescriptorSets );
DECL_vkFunction( CreateBuffer );
DECL_vkFunction( DestroyBuffer );
DECL_vkFunction( CreateBufferView );
DECL_vkFunction( DestroyBufferView );
DECL_vkFunction( GetBufferMemoryRequirements );
DECL_vkFunction( GetImageMemoryRequirements );
DECL_vkFunction( AllocateMemory );
DECL_vkFunction( FreeMemory );
DECL_vkFunction( BindBufferMemory );
DECL_vkFunction( BindImageMemory );
DECL_vkFunction( MapMemory );
DECL_vkFunction( UnmapMemory );
DECL_vkFunction( FlushMappedMemoryRanges );
DECL_vkFunction( InvalidateMappedMemoryRanges );
DECL_vkFunction( CreateRenderPass );
DECL_vkFunction( DestroyRenderPass );
DECL_vkFunction( CreateFramebuffer );
DECL_vkFunction( DestroyFramebuffer );
DECL_vkFunction( CreateImage );
DECL_vkFunction( DestroyImage );
DECL_vkFunction( CreateImageView );
DECL_vkFunction( DestroyImageView );
DECL_vkFunction( CreateSampler );
DECL_vkFunction( DestroySampler );
DECL_vkFunction( CreateCommandPool );
DECL_vkFunction( DestroyCommandPool );
DECL_vkFunction( AllocateCommandBuffers );
DECL_vkFunction( FreeCommandBuffers );
DECL_vkFunction( CreateSemaphore );
DECL_vkFunction( DestroySemaphore );
DECL_vkFunction( UpdateDescriptorSets );
DECL_vkFunction( BeginCommandBuffer );
DECL_vkFunction( EndCommandBuffer );
DECL_vkFunction( QueueSubmit );
DECL_vkFunction( CreateQueryPool );
DECL_vkFunction( DestroyQueryPool );
DECL_vkFunction( GetQueryPoolResults );
DECL_vkFunction( ResetCommandBuffer );
DECL_vkFunction( CreateEvent );
DECL_vkFunction( DestroyEvent );
DECL_vkFunction( ResetEvent );
DECL_vkFunction( SetEvent );
DECL_vkFunction( GetEventStatus );
DECL_vkFunction( CreateFence );
DECL_vkFunction( DestroyFence );
DECL_vkFunction( GetFenceStatus );
DECL_vkFunction( WaitForFences );
DECL_vkFunction( ResetFences );
DECL_vkFunction( CmdBindPipeline );
DECL_vkFunction( CmdBindDescriptorSets );
DECL_vkFunction( CmdBindVertexBuffers );
DECL_vkFunction( CmdBindIndexBuffer );
DECL_vkFunction( CmdClearColorImage );
DECL_vkFunction( CmdClearDepthStencilImage );
DECL_vkFunction( CmdDispatch );
DECL_vkFunction( CmdDispatchIndirect );
DECL_vkFunction( CmdDraw );
DECL_vkFunction( CmdDrawIndexed );
DECL_vkFunction( CmdDrawIndexedIndirect );
DECL_vkFunction( CmdDrawIndirect );
DECL_vkFunction( CmdBeginRenderPass );
DECL_vkFunction( CmdEndRenderPass );
DECL_vkFunction( CmdPushConstants );
DECL_vkFunction( CmdResetQueryPool );
DECL_vkFunction( CmdWriteTimestamp );
DECL_vkFunction( CmdPipelineBarrier );
DECL_vkFunction( CmdBlitImage );
DECL_vkFunction( CmdCopyBuffer );
DECL_vkFunction( CmdCopyBufferToImage );
DECL_vkFunction( CmdCopyImage );
DECL_vkFunction( CmdCopyImageToBuffer );
DECL_vkFunction( CmdExecuteCommands );
DECL_vkFunction( CmdResetEvent );
DECL_vkFunction( CmdSetEvent );
DECL_vkFunction( CmdWaitEvents );
DECL_vkFunction( CmdFillBuffer );
#if VK_EXT_debug_utils || VK_EXT_debug_marker
# if VK_EXT_debug_utils
DECL_vkFunction( SetDebugUtilsObjectNameEXT );
DECL_vkFunction( CmdBeginDebugUtilsLabelEXT );
DECL_vkFunction( CmdEndDebugUtilsLabelEXT );
# endif
# if VK_EXT_debug_marker
DECL_vkFunction( DebugMarkerSetObjectNameEXT );
DECL_vkFunction( CmdDebugMarkerBeginEXT );
DECL_vkFunction( CmdDebugMarkerEndEXT );
# endif
#undef DECL_vkFunction
#if VK_EXT_debug_utils || VK_EXT_debug_marker
/**
*\brief
* Begins a command buffer label.
*\param[in] labelInfo
* The parameters of the label to begin.
*/
CRG_API void vkCmdBeginDebugBlock( VkCommandBuffer commandBuffer
, DebugBlockInfo const & labelInfo )const;
/**
*\brief
* Ends the command label.
*/
CRG_API void vkCmdEndDebugBlock( VkCommandBuffer commandBuffer )const;
#endif
CRG_API std::array< float, 4u > getNextRainbowColour()const;
CRG_API uint32_t deduceMemoryType( uint32_t typeBits
, VkMemoryPropertyFlags requirements )const;
private:
friend class ResourceHandler;
struct ObjectAllocation
{
std::string type;
std::string name;
std::string callstack;
};
using CallstackCallback = std::function< std::string() >;
CallstackCallback m_callstackCallback;
std::mutex m_mutex;
std::unordered_map< size_t, ObjectAllocation > m_allocated;
public:
void setCallstackCallback( CallstackCallback callback )
{
m_callstackCallback = std::move( callback );
}
template< typename ObjectT >
static void stRegisterObject( GraphContext & context
, std::string const & name
, ObjectT object )
{
using MyTraits = DebugTypeTraits< ObjectT >;
context.doRegisterObject( uint64_t( object )
#if VK_EXT_debug_utils
, uint32_t( MyTraits::UtilsValue )
#elif VK_EXT_debug_marker
, uint32_t( MyTraits::ReportValue )
#endif
, name
, MyTraits::Name );
}
template< typename ObjectT >
static void stRegisterObjectName( GraphContext & context
, std::string const & name
, ObjectT object )
{
using MyTraits = DebugTypeTraits< ObjectT >;
context.doRegisterObjectName( uint64_t( object )
#if VK_EXT_debug_utils
, uint32_t( MyTraits::UtilsValue )
#elif VK_EXT_debug_marker
, uint32_t( MyTraits::ReportValue )
#endif
, name );
}
template< typename ObjectT >
static void stUnregisterObject( GraphContext & context, ObjectT object )
{
context.doUnregisterObject( uint64_t( object ) );
}
private:
#if VK_EXT_debug_utils
/**
*\brief
* Begins a command buffer label.
*\param[in] labelInfo
* The parameters of the label to begin.
*/
void doBeginDebugUtilsLabel( VkCommandBuffer commandBuffer
, VkDebugUtilsLabelEXT const & labelInfo )const;
/**
*\brief
* Ends the command label.
*/
void doEndDebugUtilsLabel( VkCommandBuffer commandBuffer )const;
#endif
#if VK_EXT_debug_marker
/**
*\brief
* Begins a command buffer label.
*\param[in] labelInfo
* The parameters of the label to begin.
*/
void doDebugMarkerBegin( VkCommandBuffer commandBuffer
, VkDebugMarkerMarkerInfoEXT const & labelInfo )const;
/**
*\brief
* Ends the command label.
*/
void doDebugMarkerEnd( VkCommandBuffer commandBuffer )const;
#endif
CRG_API void doRegisterObject( uint64_t object
, uint32_t objectType
, std::string const & name
, std::string const & typeName );
CRG_API void doRegisterObjectName( uint64_t object
, uint32_t objectType
, std::string const & name );
CRG_API void doUnregisterObject( uint64_t object );
# define crgRegisterObject( Cont, TypeName, Object )\
crg::GraphContext::stRegisterObject( Cont, TypeName, Object )
# define crgUnregisterObject( Cont, Object )\
crg::GraphContext::stUnregisterObject( Cont, Object )
# define crgRegisterObjectName( Cont, TypeName, Object )\
crg::GraphContext::stRegisterObjectName( Cont, TypeName, Object )
#else
# define crgRegisterObject( Cont, TypeName, Object )
# define crgUnregisterObject( Cont, Object )
# define crgRegisterObjectName( Cont, TypeName, Object )
#endif
};
CRG_API void checkVkResult( VkResult result, char const * const stepName );
CRG_API void checkVkResult( VkResult result, std::string const & stepName );
}
================================================
FILE: include/RenderGraph/GraphNode.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "RenderGraph/AttachmentTransition.hpp"
#include <cassert>
#include <map>
namespace crg
{
/**
*\brief
* Base class for all graph nodes
*\remarks
* It holds a name, the next nodes, and its dependencies from the previous nodes.
*/
struct GraphNode
{
enum class Kind
{
Undefined,
Root,
FramePass,
};
GraphNode & operator=( GraphNode && rhs )noexcept = default;
CRG_API virtual ~GraphNode()noexcept;
CRG_API GraphNode( GraphNode && rhs )noexcept;
CRG_API void attachNode( GraphNode & child );
CRG_API virtual void accept( GraphVisitor * vis )const = 0;
void setTransitions( AttachmentTransitions transitions )noexcept
{
m_transitions = std::move( transitions );
}
template< typename NodeT >
NodeT const & cast()const noexcept
{
assert( kind == NodeT::MyKind );
return static_cast< NodeT const & >( *this );
}
template< typename NodeT >
NodeT & cast()noexcept
{
assert( kind == NodeT::MyKind );
return static_cast< NodeT & >( *this );
}
Kind getKind()const noexcept
{
return kind;
}
std::string const & getName()const noexcept
{
return name;
}
FramePassGroup const & getGroup()const noexcept
{
return *group;
}
uint32_t getId()const noexcept
{
return id;
}
GraphAdjacentNodeArray const & getPredecessors()const noexcept
{
return prev;
}
GraphAdjacentNodeArray & getPredecessors()noexcept
{
return prev;
}
ImageTransitionArray const & getImageTransitions()const noexcept
{
return m_transitions.imageTransitions;
}
BufferTransitionArray const & getBufferTransitions()const noexcept
{
return m_transitions.bufferTransitions;
}
protected:
CRG_API GraphNode( Kind kind
, uint32_t id
, std::string name
, FramePassGroup const & group );
private:
GraphNode( GraphNode const & ) = delete;
GraphNode & operator=( GraphNode const & ) = delete;
private:
Kind kind{};
uint32_t id{};
std::string name{};
FramePassGroup const * group;
GraphAdjacentNodeArray prev{};
AttachmentTransitions m_transitions{};
};
/**
*\brief
* Graph node coming from a render pass
*\remarks
* The node name wil be the FramePass name.
*/
struct FramePassNode
: public GraphNode
{
static constexpr Kind MyKind = Kind::FramePass;
FramePassNode & operator=( FramePassNode && rhs )noexcept = default;
FramePassNode( FramePassNode && rhs )noexcept = default;
CRG_API ~FramePassNode()noexcept override;
CRG_API explicit FramePassNode( FramePass const & pass );
CRG_API void accept( GraphVisitor * vis )const override;
FramePass const & getFramePass()const
{
return *pass;
}
private:
FramePassNode( FramePassNode const & ) = delete;
FramePassNode & operator=( FramePassNode const & ) = delete;
private:
FramePass const * pass;
};
/**
*\brief
* Root node for the graph.
*\remarks
* Logically, it has no dependency with a previous node.
*/
struct RootNode
: public GraphNode
{
static constexpr Kind MyKind = Kind::Root;
RootNode & operator=( RootNode && rhs )noexcept = default;
RootNode( RootNode && rhs )noexcept = default;
CRG_API ~RootNode()noexcept override;
CRG_API explicit RootNode( FrameGraph const & graph );
CRG_API void accept( GraphVisitor * vis )const override;
FrameGraph const & getFrameGraph()const
{
return *graph;
}
private:
RootNode( RootNode const & ) = delete;
RootNode & operator=( RootNode const & ) = delete;
private:
FrameGraph const * graph;
};
CRG_API FramePass const * getFramePass( GraphNode const & node );
inline bool isFramePassNode( GraphNode const & node )
{
return node.getKind() == FramePassNode::MyKind;
}
inline bool isRootNode( GraphNode const & node )
{
return node.getKind() == RootNode::MyKind;
}
inline bool isFramePassNode( ConstGraphAdjacentNode node )
{
return node && isFramePassNode( *node );
}
inline bool isRootNode( ConstGraphAdjacentNode node )
{
return node && isRootNode( *node );
}
template< typename NodeT >
NodeT const & nodeCast( GraphNode const & node )
{
return node.cast< NodeT >();
}
template< typename NodeT >
NodeT & nodeCast( GraphNode & node )
{
return node.cast< NodeT >();
}
}
================================================
FILE: include/RenderGraph/GraphVisitor.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "RenderGraph/GraphNode.hpp"
namespace crg
{
class GraphVisitor
{
public:
virtual ~GraphVisitor()noexcept = default;
CRG_API virtual void visitRootNode( RootNode const * node ) = 0;
CRG_API virtual void visitFramePassNode( FramePassNode const * node ) = 0;
};
}
================================================
FILE: include/RenderGraph/Hash.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
namespace crg
{
template< typename T >
inline size_t hashCombine( size_t hash
, T const & rhs )
{
const uint64_t kMul = 0x9ddfea08eb382d69ULL;
auto seed = hash;
std::hash< T > hasher;
uint64_t a = ( hasher( rhs ) ^ seed ) * kMul;
a ^= ( a >> 47 );
uint64_t b = ( seed ^ a ) * kMul;
b ^= ( b >> 47 );
#pragma warning( push )
#pragma warning( disable: 4068 )
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuseless-cast"
hash = static_cast< std::size_t >( b * kMul );
#pragma GCC diagnostic pop
#pragma clang diagnostic pop
#pragma warning( pop )
return hash;
}
}
================================================
FILE: include/RenderGraph/Id.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "RenderGraph/FrameGraphPrerequisites.hpp"
namespace crg
{
template< typename TypeT >
struct Id
{
uint32_t id;
TypeT const * data;
explicit Id( uint32_t id = 0u
, TypeT const * data = nullptr )
: id{ id }
, data{ data }
{
}
private:
friend bool operator==( Id const & lhs, Id const & rhs )
{
return lhs.id == rhs.id;
}
};
template< typename TypeT >
inline bool operator<( Id< TypeT > const & lhs, Id< TypeT > const & rhs )
{
return lhs.id < rhs.id;
}
template< typename TypeT >
inline bool operator>( Id< TypeT > const & lhs, Id< TypeT > const & rhs )
{
return lhs.id > rhs.id;
}
}
================================================
FILE: include/RenderGraph/ImageData.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "Id.hpp"
namespace crg
{
/**
*\brief
* Basic image data, from which images will be created.
*/
struct ImageData
{
std::string name;
ImageCreateInfo info;
explicit ImageData( std::string name = {}
, ImageCreateFlags flags = {}
, ImageType imageType = {}
, PixelFormat format = {}
, Extent3D extent = {}
, ImageUsageFlags usage = {}
, uint32_t mipLevels = 1u
, uint32_t arrayLayers = 1u
, SampleCount samples = SampleCount::e1
, ImageTiling tiling = ImageTiling::eOptimal
, MemoryPropertyFlags memory = MemoryPropertyFlags::eDeviceLocal )
: name{ std::move( name ) }
, info{ flags, imageType, format
, extent, mipLevels, arrayLayers, samples
, tiling, usage, memory }
{
}
private:
friend bool operator==( ImageData const & lhs, ImageData const & rhs ) = default;
};
}
================================================
FILE: include/RenderGraph/ImageViewData.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "Id.hpp"
namespace crg
{
/**
*\brief
* Basic image view data, from which views will be created.
*/
struct ImageViewData
{
std::string name;
ImageId image;
ImageViewCreateInfo info;
ImageViewIdArray source{};
explicit ImageViewData( std::string name = {}
, ImageId image = ImageId{}
, ImageViewCreateFlags flags = {}
, ImageViewType viewType = {}
, PixelFormat format = {}
, ImageSubresourceRange subresourceRange = {} )
: name{ std::move( name ) }
, image{ std::move( image ) }
, info{ flags, viewType, format, subresourceRange }
{
}
private:
friend bool operator==( ImageViewData const & lhs, ImageViewData const & rhs )
{
return lhs.image == rhs.image
&& lhs.info == rhs.info;
}
};
}
================================================
FILE: include/RenderGraph/LayerLayoutStatesHandler.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "FrameGraphPrerequisites.hpp"
namespace crg
{
struct LayerLayoutStatesHandler
{
LayerLayoutStatesHandler() = default;
CRG_API explicit LayerLayoutStatesHandler( LayerLayoutStatesMap const & rhs );
CRG_API void addStates( LayerLayoutStatesHandler const & data );
CRG_API void setLayoutState( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & subresourceRange
, LayoutState const & layoutState );
CRG_API void setLayoutState( crg::ImageViewId view
, LayoutState const & layoutState );
CRG_API LayoutState getLayoutState( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & subresourceRange )const;
CRG_API LayoutState getLayoutState( ImageViewId view )const;
LayerLayoutStatesMap images;
};
}
================================================
FILE: include/RenderGraph/Log.hpp
================================================
/*
See LICENSE file in root folder
*/
#ifndef ___CRG_Log_H___
#define ___CRG_Log_H___
#include "FrameGraphPrerequisites.hpp"
#pragma warning( push )
#pragma warning( disable: 4365 )
#pragma warning( disable: 5262 )
#include <functional>
#include <memory>
#include <sstream>
#include <string>
#pragma warning( pop )
namespace crg
{
class Logger
{
public:
using LogCallback = void( * )( std::string_view msg, bool newLine )noexcept;
public:
/**
*\brief
* Logs a trace message.
*/
CRG_API static void logTrace( std::string_view message, bool newLine = true )noexcept;
/**
*\brief
* Logs a debug message.
*/
CRG_API static void logDebug( std::string_view message, bool newLine = true )noexcept;
/**
*\brief
* Logs an info message.
*/
CRG_API static void logInfo( std::string_view message, bool newLine = true )noexcept;
/**
*\brief
* Logs a warning message.
*/
CRG_API static void logWarning( std::string_view message, bool newLine = true )noexcept;
/**
*\brief
* Logs an error message.
*/
CRG_API static void logError( std::string_view message, bool newLine = true )noexcept;
/**
*\brief
* Sets the trace callback.
*/
CRG_API static void setTraceCallback( LogCallback callback );
/**
*\brief
* Sets the debug callback.
*/
CRG_API static void setDebugCallback( LogCallback callback );
/**
*\brief
* Sets the info callback.
*/
CRG_API static void setInfoCallback( LogCallback callback );
/**
*\brief
* Sets the warning callback.
*/
CRG_API static void setWarningCallback( LogCallback callback );
/**
*\brief
* Sets the error callback.
*/
CRG_API static void setErrorCallback( LogCallback callback );
private:
Logger();
static Logger & doGetInstance()noexcept;
private:
LogCallback m_trace;
LogCallback m_debug;
LogCallback m_info;
LogCallback m_warning;
LogCallback m_error;
};
}
#endif
================================================
FILE: include/RenderGraph/PixelFormat.inl
================================================
/*
See LICENSE file in root folder
*/
#ifndef RGPF_ENUM_NON_VALUE
# define RGPF_ENUM_NON_VALUE( x, y )
#endif
#ifndef RGPF_ENUM_BEGIN
# define RGPF_ENUM_BEGIN( x )
#endif
#ifndef RGPF_ENUM_END
# define RGPF_ENUM_END( x )
#endif
#ifndef RGPF_ENUM_VALUE
# define RGPF_ENUM_VALUE( name, value, components, alpha, colour, depth, stencil, compressed )
#endif
#ifndef RGPF_ENUM_VALUE_COLOR
# define RGPF_ENUM_VALUE_COLOR( name, value, components, alpha ) RGPF_ENUM_VALUE( name, value, components, alpha, true, false, false, false )
#endif
#ifndef RGPF_ENUM_VALUE_DEPTH_OR_STENCIL
# define RGPF_ENUM_VALUE_DEPTH_OR_STENCIL( name, value, components, depth, stencil ) RGPF_ENUM_VALUE( name, value, 1, false, false, depth, stencil, false )
#endif
#ifndef RGPF_ENUM_VALUE_DEPTH_STENCIL
# define RGPF_ENUM_VALUE_DEPTH_STENCIL( name, value ) RGPF_ENUM_VALUE_DEPTH_OR_STENCIL( name, value, 2, true, true )
#endif
#ifndef RGPF_ENUM_VALUE_DEPTH
# define RGPF_ENUM_VALUE_DEPTH( name, value ) RGPF_ENUM_VALUE_DEPTH_OR_STENCIL( name, value, 1, true, false )
#endif
#ifndef RGPF_ENUM_VALUE_STENCIL
# define RGPF_ENUM_VALUE_STENCIL( name, value ) RGPF_ENUM_VALUE_DEPTH_OR_STENCIL( name, value, 1, false, true )
#endif
#ifndef RGPF_ENUM_VALUE_COMPRESSED
# define RGPF_ENUM_VALUE_COMPRESSED( name, value, components, alpha ) RGPF_ENUM_VALUE( name, value, components, alpha, true, false, false, false )
#endif
RGPF_ENUM_BEGIN( PixelFormat )
RGPF_ENUM_VALUE( UNDEFINED, 0, 0, false, false, false, false, false )
RGPF_ENUM_VALUE_COLOR( R4G4_UNORM, 1, 2, false )
RGPF_ENUM_VALUE_COLOR( R4G4B4A4_UNORM, 2, 4, true )
RGPF_ENUM_VALUE_COLOR( B4G4R4A4_UNORM, 3, 4, true )
RGPF_ENUM_VALUE_COLOR( R5G6B5_UNORM, 4, 3, false )
RGPF_ENUM_VALUE_COLOR( B5G6R5_UNORM, 5, 3, false )
RGPF_ENUM_VALUE_COLOR( R5G5B5A1_UNORM, 6, 4, true )
RGPF_ENUM_VALUE_COLOR( B5G5R5A1_UNORM, 7, 4, true )
RGPF_ENUM_VALUE_COLOR( A1R5G5B5_UNORM, 8, 4, true )
RGPF_ENUM_VALUE_COLOR( R8_UNORM, 9, 1, false )
RGPF_ENUM_VALUE_COLOR( R8_SNORM, 10, 1, false )
RGPF_ENUM_VALUE_COLOR( R8_USCALED, 11, 1, false )
RGPF_ENUM_VALUE_COLOR( R8_SSCALED, 12, 1, false )
RGPF_ENUM_VALUE_COLOR( R8_UINT, 13, 1, false )
RGPF_ENUM_VALUE_COLOR( R8_SINT, 14, 1, false )
RGPF_ENUM_VALUE_COLOR( R8_SRGB, 15, 1, false )
RGPF_ENUM_VALUE_COLOR( R8G8_UNORM, 16, 2, false )
RGPF_ENUM_VALUE_COLOR( R8G8_SNORM, 17, 2, false )
RGPF_ENUM_VALUE_COLOR( R8G8_USCALED, 18, 2, false )
RGPF_ENUM_VALUE_COLOR( R8G8_SSCALED, 19, 2, false )
RGPF_ENUM_VALUE_COLOR( R8G8_UINT, 20, 2, false )
RGPF_ENUM_VALUE_COLOR( R8G8_SINT, 21, 2, false )
RGPF_ENUM_VALUE_COLOR( R8G8_SRGB, 22, 2, false )
RGPF_ENUM_VALUE_COLOR( R8G8B8_UNORM, 23, 3, false )
RGPF_ENUM_VALUE_COLOR( R8G8B8_SNORM, 24, 3, false )
RGPF_ENUM_VALUE_COLOR( R8G8B8_USCALED, 25, 3, false )
RGPF_ENUM_VALUE_COLOR( R8G8B8_SSCALED, 26, 3, false )
RGPF_ENUM_VALUE_COLOR( R8G8B8_UINT, 27, 3, false )
RGPF_ENUM_VALUE_COLOR( R8G8B8_SINT, 28, 3, false )
RGPF_ENUM_VALUE_COLOR( R8G8B8_SRGB, 29, 3, false )
RGPF_ENUM_VALUE_COLOR( B8G8R8_UNORM, 30, 3, false )
RGPF_ENUM_VALUE_COLOR( B8G8R8_SNORM, 31, 3, false )
RGPF_ENUM_VALUE_COLOR( B8G8R8_USCALED, 32, 3, false )
RGPF_ENUM_VALUE_COLOR( B8G8R8_SSCALED, 33, 3, false )
RGPF_ENUM_VALUE_COLOR( B8G8R8_UINT, 34, 3, false )
RGPF_ENUM_VALUE_COLOR( B8G8R8_SINT, 35, 3, false )
RGPF_ENUM_VALUE_COLOR( B8G8R8_SRGB, 36, 3, false )
RGPF_ENUM_VALUE_COLOR( R8G8B8A8_UNORM, 37, 4, true )
RGPF_ENUM_VALUE_COLOR( R8G8B8A8_SNORM, 38, 4, true )
RGPF_ENUM_VALUE_COLOR( R8G8B8A8_USCALED, 39, 4, true )
RGPF_ENUM_VALUE_COLOR( R8G8B8A8_SSCALED, 40, 4, true )
RGPF_ENUM_VALUE_COLOR( R8G8B8A8_UINT, 41, 4, true )
RGPF_ENUM_VALUE_COLOR( R8G8B8A8_SINT, 42, 4, true )
RGPF_ENUM_VALUE_COLOR( R8G8B8A8_SRGB, 43, 4, true )
RGPF_ENUM_VALUE_COLOR( B8G8R8A8_UNORM, 44, 4, true )
RGPF_ENUM_VALUE_COLOR( B8G8R8A8_SNORM, 45, 4, true )
RGPF_ENUM_VALUE_COLOR( B8G8R8A8_USCALED, 46, 4, true )
RGPF_ENUM_VALUE_COLOR( B8G8R8A8_SSCALED, 47, 4, true )
RGPF_ENUM_VALUE_COLOR( B8G8R8A8_UINT, 48, 4, true )
RGPF_ENUM_VALUE_COLOR( B8G8R8A8_SINT, 49, 4, true )
RGPF_ENUM_VALUE_COLOR( B8G8R8A8_SRGB, 50, 4, true )
RGPF_ENUM_VALUE_COLOR( A8B8G8R8_UNORM, 51, 4, true )
RGPF_ENUM_VALUE_COLOR( A8B8G8R8_SNORM, 52, 4, true )
RGPF_ENUM_VALUE_COLOR( A8B8G8R8_USCALED, 53, 4, true )
RGPF_ENUM_VALUE_COLOR( A8B8G8R8_SSCALED, 54, 4, true )
RGPF_ENUM_VALUE_COLOR( A8B8G8R8_UINT, 55, 4, true )
RGPF_ENUM_VALUE_COLOR( A8B8G8R8_SINT, 56, 4, true )
RGPF_ENUM_VALUE_COLOR( A8B8G8R8_SRGB, 57, 4, true )
RGPF_ENUM_VALUE_COLOR( A2R10G10B10_UNORM, 58, 4, true )
RGPF_ENUM_VALUE_COLOR( A2R10G10B10_SNORM, 59, 4, true )
RGPF_ENUM_VALUE_COLOR( A2R10G10B10_USCALED, 60, 4, true )
RGPF_ENUM_VALUE_COLOR( A2R10G10B10_SSCALED, 61, 4, true )
RGPF_ENUM_VALUE_COLOR( A2R10G10B10_UINT, 62, 4, true )
RGPF_ENUM_VALUE_COLOR( A2R10G10B10_SINT, 63, 4, true )
RGPF_ENUM_VALUE_COLOR( A2B10G10R10_UNORM, 64, 4, true )
RGPF_ENUM_VALUE_COLOR( A2B10G10R10_SNORM, 65, 4, true )
RGPF_ENUM_VALUE_COLOR( A2B10G10R10_USCALED, 66, 4, true )
RGPF_ENUM_VALUE_COLOR( A2B10G10R10_SSCALED, 67, 4, true )
RGPF_ENUM_VALUE_COLOR( A2B10G10R10_UINT, 68, 4, true )
RGPF_ENUM_VALUE_COLOR( A2B10G10R10_SINT, 69, 4, true )
RGPF_ENUM_VALUE_COLOR( R16_UNORM, 70, 1, false )
RGPF_ENUM_VALUE_COLOR( R16_SNORM, 71, 1, false )
RGPF_ENUM_VALUE_COLOR( R16_USCALED, 72, 1, false )
RGPF_ENUM_VALUE_COLOR( R16_SSCALED, 73, 1, false )
RGPF_ENUM_VALUE_COLOR( R16_UINT, 74, 1, false )
RGPF_ENUM_VALUE_COLOR( R16_SINT, 75, 1, false )
RGPF_ENUM_VALUE_COLOR( R16_SFLOAT, 76, 1, false )
RGPF_ENUM_VALUE_COLOR( R16G16_UNORM, 77, 2, false )
RGPF_ENUM_VALUE_COLOR( R16G16_SNORM, 78, 2, false )
RGPF_ENUM_VALUE_COLOR( R16G16_USCALED, 79, 2, false )
RGPF_ENUM_VALUE_COLOR( R16G16_SSCALED, 80, 2, false )
RGPF_ENUM_VALUE_COLOR( R16G16_UINT, 81, 2, false )
RGPF_ENUM_VALUE_COLOR( R16G16_SINT, 82, 2, false )
RGPF_ENUM_VALUE_COLOR( R16G16_SFLOAT, 83, 2, false )
RGPF_ENUM_VALUE_COLOR( R16G16B16_UNORM, 84, 3, false )
RGPF_ENUM_VALUE_COLOR( R16G16B16_SNORM, 85, 3, false )
RGPF_ENUM_VALUE_COLOR( R16G16B16_USCALED, 86, 3, false )
RGPF_ENUM_VALUE_COLOR( R16G16B16_SSCALED, 87, 3, false )
RGPF_ENUM_VALUE_COLOR( R16G16B16_UINT, 88, 3, false )
RGPF_ENUM_VALUE_COLOR( R16G16B16_SINT, 89, 3, false )
RGPF_ENUM_VALUE_COLOR( R16G16B16_SFLOAT, 90, 3, false )
RGPF_ENUM_VALUE_COLOR( R16G16B16A16_UNORM, 91, 4, true )
RGPF_ENUM_VALUE_COLOR( R16G16B16A16_SNORM, 92, 4, true )
RGPF_ENUM_VALUE_COLOR( R16G16B16A16_USCALED, 93, 4, true )
RGPF_ENUM_VALUE_COLOR( R16G16B16A16_SSCALED, 94, 4, true )
RGPF_ENUM_VALUE_COLOR( R16G16B16A16_UINT, 95, 4, true )
RGPF_ENUM_VALUE_COLOR( R16G16B16A16_SINT, 96, 4, true )
RGPF_ENUM_VALUE_COLOR( R16G16B16A16_SFLOAT, 97, 4, true )
RGPF_ENUM_VALUE_COLOR( R32_UINT, 98, 1, false )
RGPF_ENUM_VALUE_COLOR( R32_SINT, 99, 1, false )
RGPF_ENUM_VALUE_COLOR( R32_SFLOAT, 100, 1, false )
RGPF_ENUM_VALUE_COLOR( R32G32_UINT, 101, 2, false )
RGPF_ENUM_VALUE_COLOR( R32G32_SINT, 102, 2, false )
RGPF_ENUM_VALUE_COLOR( R32G32_SFLOAT, 103, 2, false )
RGPF_ENUM_VALUE_COLOR( R32G32B32_UINT, 104, 3, false )
RGPF_ENUM_VALUE_COLOR( R32G32B32_SINT, 105, 3, false )
RGPF_ENUM_VALUE_COLOR( R32G32B32_SFLOAT, 106, 3, false )
RGPF_ENUM_VALUE_COLOR( R32G32B32A32_UINT, 107, 4, true )
RGPF_ENUM_VALUE_COLOR( R32G32B32A32_SINT, 108, 4, true )
RGPF_ENUM_VALUE_COLOR( R32G32B32A32_SFLOAT, 109, 4, true )
RGPF_ENUM_VALUE_COLOR( R64_UINT, 110, 1, false )
RGPF_ENUM_VALUE_COLOR( R64_SINT, 111, 1, false )
RGPF_ENUM_VALUE_COLOR( R64_SFLOAT, 112, 1, false )
RGPF_ENUM_VALUE_COLOR( R64G64_UINT, 113, 2, false )
RGPF_ENUM_VALUE_COLOR( R64G64_SINT, 114, 2, false )
RGPF_ENUM_VALUE_COLOR( R64G64_SFLOAT, 115, 2, false )
RGPF_ENUM_VALUE_COLOR( R64G64B64_UINT, 116, 3, false )
RGPF_ENUM_VALUE_COLOR( R64G64B64_SINT, 117, 3, false )
RGPF_ENUM_VALUE_COLOR( R64G64B64_SFLOAT, 118, 3, false )
RGPF_ENUM_VALUE_COLOR( R64G64B64A64_UINT, 119, 4, true )
RGPF_ENUM_VALUE_COLOR( R64G64B64A64_SINT, 120, 4, true )
RGPF_ENUM_VALUE_COLOR( R64G64B64A64_SFLOAT, 121, 4, true )
RGPF_ENUM_VALUE_COLOR( B10G11R11_UFLOAT, 122, 3, false )
RGPF_ENUM_VALUE_COLOR( E5B9G9R9_UFLOAT, 123, 3, false )
RGPF_ENUM_VALUE_DEPTH( D16_UNORM, 124 )
RGPF_ENUM_VALUE_DEPTH( X8_D24_UNORM, 125 )
RGPF_ENUM_VALUE_DEPTH( D32_SFLOAT, 126 )
RGPF_ENUM_VALUE_STENCIL( S8_UINT, 127 )
RGPF_ENUM_VALUE_DEPTH_STENCIL( D16_UNORM_S8_UINT, 128 )
RGPF_ENUM_VALUE_DEPTH_STENCIL( D24_UNORM_S8_UINT, 129 )
RGPF_ENUM_VALUE_DEPTH_STENCIL( D32_SFLOAT_S8_UINT, 130 )
RGPF_ENUM_VALUE_COMPRESSED( BC1_RGB_UNORM_BLOCK, 131, 3, false ) // RGB_DXT1
RGPF_ENUM_VALUE_COMPRESSED( BC1_RGB_SRGB_BLOCK, 132, 3, false ) // RGB_DXT1
RGPF_ENUM_VALUE_COMPRESSED( BC1_RGBA_UNORM_BLOCK, 133, 4, true ) // RGBA_DXT1
RGPF_ENUM_VALUE_COMPRESSED( BC1_RGBA_SRGB_BLOCK, 134, 4, true ) // RGBA_DXT1
RGPF_ENUM_VALUE_COMPRESSED( BC2_UNORM_BLOCK, 135, 4, true ) // RGBA_DXT3
RGPF_ENUM_VALUE_COMPRESSED( BC2_SRGB_BLOCK, 136, 4, true ) // RGBA_DXT3
RGPF_ENUM_VALUE_COMPRESSED( BC3_UNORM_BLOCK, 137, 4, true ) // RGBA_DXT5
RGPF_ENUM_VALUE_COMPRESSED( BC3_SRGB_BLOCK, 138, 4, true ) // RGBA_DXT5
RGPF_ENUM_VALUE_COMPRESSED( BC4_UNORM_BLOCK, 139, 1, false ) // R_ATI1N
RGPF_ENUM_VALUE_COMPRESSED( BC4_SNORM_BLOCK, 140, 1, false ) // R_ATI1N
RGPF_ENUM_VALUE_COMPRESSED( BC5_UNORM_BLOCK, 141, 2, false ) // RG_ATI2N
RGPF_ENUM_VALUE_COMPRESSED( BC5_SNORM_BLOCK, 142, 2, false ) // RG_ATI2N
RGPF_ENUM_VALUE_COMPRESSED( BC6H_UFLOAT_BLOCK, 143, 3, false ) // RGB_BP
RGPF_ENUM_VALUE_COMPRESSED( BC6H_SFLOAT_BLOCK, 144, 3, false ) // RGB_BP
RGPF_ENUM_VALUE_COMPRESSED( BC7_UNORM_BLOCK, 145, 4, true ) // RGBA_BP
RGPF_ENUM_VALUE_COMPRESSED( BC7_SRGB_BLOCK, 146, 4, true ) // RGBA_BP
RGPF_ENUM_VALUE_COMPRESSED( ETC2_R8G8B8_UNORM_BLOCK, 147, 3, false )
RGPF_ENUM_VALUE_COMPRESSED( ETC2_R8G8B8_SRGB_BLOCK, 148, 3, false )
RGPF_ENUM_VALUE_COMPRESSED( ETC2_R8G8B8A1_UNORM_BLOCK, 149, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ETC2_R8G8B8A1_SRGB_BLOCK, 150, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ETC2_R8G8B8A8_UNORM_BLOCK, 151, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ETC2_R8G8B8A8_SRGB_BLOCK, 152, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( EAC_R11_UNORM_BLOCK, 153, 1, false )
RGPF_ENUM_VALUE_COMPRESSED( EAC_R11_SNORM_BLOCK, 154, 1, false )
RGPF_ENUM_VALUE_COMPRESSED( EAC_R11G11_UNORM_BLOCK, 155, 2, false )
RGPF_ENUM_VALUE_COMPRESSED( EAC_R11G11_SNORM_BLOCK, 156, 2, false )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_4x4_UNORM_BLOCK, 157, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_4x4_SRGB_BLOCK, 158, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_5x4_UNORM_BLOCK, 159, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_5x4_SRGB_BLOCK, 160, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_5x5_UNORM_BLOCK, 161, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_5x5_SRGB_BLOCK, 162, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_6x5_UNORM_BLOCK, 163, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_6x5_SRGB_BLOCK, 164, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_6x6_UNORM_BLOCK, 165, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_6x6_SRGB_BLOCK, 166, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_8x5_UNORM_BLOCK, 167, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_8x5_SRGB_BLOCK, 168, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_8x6_UNORM_BLOCK, 169, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_8x6_SRGB_BLOCK, 170, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_8x8_UNORM_BLOCK, 171, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_8x8_SRGB_BLOCK, 172, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_10x5_UNORM_BLOCK, 173, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_10x5_SRGB_BLOCK, 174, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_10x6_UNORM_BLOCK, 175, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_10x6_SRGB_BLOCK, 176, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_10x8_UNORM_BLOCK, 177, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_10x8_SRGB_BLOCK, 178, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_10x10_UNORM_BLOCK, 179, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_10x10_SRGB_BLOCK, 180, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_12x10_UNORM_BLOCK, 181, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_12x10_SRGB_BLOCK, 182, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_12x12_UNORM_BLOCK, 183, 4, true )
RGPF_ENUM_VALUE_COMPRESSED( ASTC_12x12_SRGB_BLOCK, 184, 4, true )
RGPF_ENUM_NON_VALUE( COUNT, 185 )
RGPF_ENUM_END( PixelFormat )
#undef RGPF_ENUM_BEGIN
#undef RGPF_ENUM_END
#undef RGPF_ENUM_NON_VALUE
#undef RGPF_ENUM_VALUE
#undef RGPF_ENUM_VALUE_COLOR
#undef RGPF_ENUM_VALUE_DEPTH_OR_STENCIL
#undef RGPF_ENUM_VALUE_DEPTH_STENCIL
#undef RGPF_ENUM_VALUE_DEPTH
#undef RGPF_ENUM_VALUE_STENCIL
#undef RGPF_ENUM_VALUE_COMPRESSED
================================================
FILE: include/RenderGraph/RecordContext.hpp
================================================
/*
This file belongs to FrameGraph.
See LICENSE file in root folder.
*/
#pragma once
#include "Attachment.hpp"
#include "LayerLayoutStatesHandler.hpp"
#include <functional>
#include <map>
#include <vector>
namespace crg
{
class RecordContext
{
public:
using PassIndexArray = std::vector< uint32_t >;
using GraphIndexMap = std::map< FrameGraph const *, PassIndexArray >;
using ImplicitAction = std::function< void( RecordContext &, VkCommandBuffer, uint32_t ) >;
struct ImplicitImageTransition
{
RunnablePass const * pass;
ImageViewId view;
ImplicitAction action;
};
struct ImplicitBufferTransition
{
RunnablePass const * pass;
BufferViewId view;
ImplicitAction action;
};
public:
CRG_API explicit RecordContext( ContextResourcesCache & resources );
CRG_API explicit RecordContext( ResourceHandler & handler );
/**
*\name States
*/
//@{
CRG_API void addStates( RecordContext const & data );
/**
*\name Pipeline
*/
//@{
CRG_API void setNextPipelineState( PipelineState const & state
, LayerLayoutStatesMap const & imageLayouts );
//@}
/**
*\name Images
*/
//@{
CRG_API void setLayoutState( crg::ImageViewId view
, LayoutState const & layoutState );
CRG_API LayoutState getLayoutState( ImageViewId view )const;
CRG_API void setLayoutState( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & subresourceRange
, LayoutState const & layoutState );
CRG_API LayoutState getLayoutState( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & subresourceRange )const;
CRG_API LayoutState getNextLayoutState( ImageViewId view )const;
CRG_API LayoutState getNextLayoutState( ImageId image
, ImageViewType viewType
, ImageSubresourceRange const & subresourceRange )const;
CRG_API void registerImplicitTransition( RunnablePass const & pass
, crg::ImageViewId view
, ImplicitAction action = []( RecordContext const &, VkCommandBuffer, uint32_t ){} );
CRG_API void registerImplicitTransition( RunnablePass const & pass
, crg::BufferViewId view
, ImplicitAction action = []( RecordContext const &, VkCommandBuffer, uint32_t ){} );
CRG_API void registerImplicitTransition( ImplicitImageTransition transition );
CRG_API void registerImplicitTransition( ImplicitBufferTransition transition );
CRG_API void runImplicitTransition( VkCommandBuffer commandBuffer
, uint32_t index
, crg::ImageViewId view );
CRG_API void runImplicitTransition( VkCommandBuffer commandBuffer
, uint32_t index
, crg::BufferViewId view );
//@}
/**
*\name Buffers
*/
//@{
CRG_API void setAccessState( BufferViewId buffer
, AccessState const & accessState );
CRG_API AccessState getAccessState( BufferViewId view )const;
CRG_API void setAccessState( BufferId buffer
, BufferSubresourceRange const & subresourceRange
, AccessState const & accessState );
CRG_API AccessState const & getAccessState( BufferId buffer
, BufferSubresourceRange const & subresourceRange )const;
//@}
//@}
/**
*\name Memory barriers
*/
//@{
/**
*\name Images
*/
//@{
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, ImageViewId const & view
, ImageLayout initialLayout
, LayoutState const & wantedState
, bool force = false );
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, ImageId const & image
, ImageSubresourceRange const & subresourceRange
, ImageLayout initialLayout
, LayoutState const & wantedState
, bool force = false );
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, ImageId const & image
, ImageViewType viewType
, ImageSubresourceRange const & subresourceRange
, ImageLayout initialLayout
, LayoutState const & wantedState
, bool force = false );
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, ImageViewId const & view
, LayoutState const & wantedState
, bool force = false );
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, ImageId const & image
, ImageSubresourceRange const & subresourceRange
, LayoutState const & wantedState
, bool force = false );
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, ImageId const & image
, ImageViewType viewType
, ImageSubresourceRange const & subresourceRange
, LayoutState const & wantedState
, bool force = false );
//@}
/**
*\name Buffers
*/
//@{
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, BufferId buffer
, BufferSubresourceRange const & subresourceRange
, AccessState const & initialState
, AccessState const & wantedState
, bool force = false );
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, BufferViewId view
, AccessState const & initialState
, AccessState const & wantedState
, bool force = false );
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, BufferId buffer
, BufferSubresourceRange const & subresourceRange
, AccessState const & wantedState
, bool force = false );
CRG_API void memoryBarrier( VkCommandBuffer commandBuffer
, BufferViewId view
, AccessState const & wantedState
, bool force = false );
//@}
//@}
CRG_API GraphContext & getContext()const;
CRG_API ContextResourcesCache & getResources()const;
GraphContext * operator->()const
{
return &getContext();
}
CRG_API void copyImage( VkCommandBuffer commandBuffer
, uint32_t index
, ImageViewId srcView
, ImageViewId dstView
, Extent2D const & extent
, ImageLayout finalLayout = ImageLayout::eUndefined );
CRG_API void blitImage( VkCommandBuffer commandBuffer
, uint32_t index
, ImageViewId srcView
, ImageViewId dstView
, Rect2D const & srcRect
, Rect2D const & dstRect
, FilterMode filter
, ImageLayout finalLayout = ImageLayout::eUndefined );
CRG_API void clearAttachment( VkCommandBuffer commandBuffer
, ImageViewId dstView
, ClearColorValue const & clearValue
, ImageLayout finalLayout = ImageLayout::eUndefined );
CRG_API void clearAttachment( VkCommandBuffer commandBuffer
, ImageViewId dstView
, ClearDepthStencilValue const & clearValue
, ImageLayout finalLayout = ImageLayout::eUndefined );
CRG_API void copyBuffer( VkCommandBuffer commandBuffer
, uint32_t index
, BufferViewId srcView
, BufferViewId dstView
, DeviceSize srcOffset, DeviceSize dstOffset
, DeviceSize size
, AccessState const & finalState = {} );
CRG_API void clearBuffer( VkCommandBuffer commandBuffer
, BufferViewId dstView
, uint32_t clearValue
, AccessState const & finalState = {} );
CRG_API static ImplicitAction copyImage( ImageViewId srcView
, ImageViewId dstView
, Extent2D const & extent
, ImageLayout finalLayout = ImageLayout::eUndefined );
CRG_API static ImplicitAction blitImage( ImageViewId srcView
, ImageViewId dstView
, Rect2D const & srcRect
, Rect2D const & dstRect
, FilterMode filter
, ImageLayout finalLayout = ImageLayout::eUndefined );
CRG_API static ImplicitAction clearAttachment( Attachment const & attach
, ImageLayout finalLayout = ImageLayout::eUndefined );
CRG_API static ImplicitAction clearAttachment( ImageViewId view
, ClearColorValue const & clearValue
, ImageLayout finalLayout = ImageLayout::eUndefined );
CRG_API static ImplicitAction clearAttachment( ImageViewId view
, ClearDepthStencilValue const & clearValue
, ImageLayout finalLayout = ImageLayout::eUndefined );
CRG_API static ImplicitAction clearBuffer( BufferViewId dstView
, AccessState const & finalState = {} );
CRG_API static ImplicitAction clearBuffer( BufferViewId dstView
, uint32_t clearValue
, AccessState const & finalState = {} );
CRG_API static ImplicitAction copyBuffer( BufferViewId srcView
, BufferViewId dstView
, DeviceSize srcOffset, DeviceSize dstOffset
, DeviceSize size
, AccessState const & finalState = {} );
ResourceHandler & getHandler()const
{
return *m_handler;
}
PassIndexArray const & getIndexState()const
{
return m_state;
}
PipelineState const & getPrevPipelineState()const
{
return m_prevPipelineState;
}
PipelineState const & getCurrPipelineState()const
{
return m_currPipelineState;
}
PipelineState const & getNextPipelineState()const
{
return m_nextPipelineState;
}
private:
ResourceHandler * m_handler;
ContextResourcesCache * m_resources;
LayerLayoutStatesHandler m_images;
AccessStateMap m_buffers;
std::vector< ImplicitImageTransition > m_implicitImageTransitions;
std::vector< ImplicitBufferTransition > m_implicitBufferTransitions;
PassIndexArray m_state;
PipelineState m_prevPipelineState{};
PipelineState m_currPipelineState{};
PipelineState m_nextPipelineState{};
LayerLayoutStatesHandler m_nextImages;
};
}
================================================
FILE: include/RenderGraph/ResourceHandler.hpp
================================================
/*
See LICENSE file in root folder.
*/
#pragma once
#include "RenderGraph/FrameGraphPrerequisites.hpp"
#pragma warning( push )
#pragma warning( disable: 4365 )
#pragma warning( disable: 5262 )
#include <mutex>
#pragma warning( pop )
#include <unordered_map>
#include <unordered_set>
namespace crg
{
struct Sampler
{
VkSampler sampler;
std::string name;
};
class ResourceHandler
{
template< typename ValueT >
struct CreatedT
{
bool created{};
ValueT resource{};
VkDeviceMemory memory{};
};
template< typename ValueT >
struct CreatedViewT
{
bool created{};
ValueT view{};
};
public:
ResourceHandler( ResourceHandler const & ) = delete;
ResourceHandler( ResourceHandler && )noexcept = delete;
ResourceHandler & operator=( ResourceHandler const & ) = delete;
ResourceHandler & operator=( ResourceHandler && )noexcept = delete;
ResourceHandler() = default;
CRG_API ~ResourceHandler()noexcept;
CRG_API BufferId createBufferId( BufferData const & img );
CRG_API BufferViewId createViewId( BufferViewData const & view );
CRG_API ImageId createImageId( ImageData const & img );
CRG_API ImageViewId createViewId( ImageViewData const & view );
CRG_API CreatedT< VkBuffer > createBuffer( GraphContext & context
, BufferId bufferId );
CRG_API CreatedViewT< VkBufferView > createBufferView( GraphContext & context
, BufferViewId viewId );
CRG_API CreatedT< VkImage > createImage( GraphContext & context
, ImageId imageId );
CRG_API CreatedViewT< VkImageView > createImageView( GraphContext & context
, ImageViewId viewId );
CRG_API VkSampler createSampler( GraphContext & context
, std::string const & suffix
, SamplerDesc const & samplerDesc );
CRG_API VertexBuffer const * createQuadTriVertexBuffer( GraphContext & context
, std::string const & suffix
, bool texCoords
, Texcoord const & config );
CRG_API void destroyBuffer( GraphContext & context
, BufferId bufferId );
CRG_API void destroyBufferView( GraphContext & context
, BufferViewId viewId );
CRG_API void destroyImage( GraphContext & context
, ImageId imageId );
CRG_API void destroyImageView( GraphContext & context
, ImageViewId viewId );
CRG_API void destroySampler( GraphContext & context
, VkSampler sampler );
CRG_API void destroyVertexBuffer( GraphContext & context
, VertexBuffer const * buffer );
private:
mutable std::mutex m_buffersMutex;
BufferIdDataOwnerCont m_bufferIds;
mutable std::mutex m_bufferViewsMutex;
BufferViewIdDataOwnerCont m_bufferViewIds;
BufferMemoryMap m_buffers;
BufferViewMap m_bufferViews;
mutable std::mutex m_imagesMutex;
ImageIdDataOwnerCont m_imageIds;
mutable std::mutex m_imageViewsMutex;
ImageViewIdDataOwnerCont m_imageViewIds;
ImageMemoryMap m_images;
ImageViewMap m_imageViews;
std::mutex m_samplersMutex;
std::unordered_map< VkSampler, Sampler > m_samplers;
std::mutex m_vertexBuffersMutex;
std::unordered_set< VertexBufferPtr > m_vertexBuffers;
};
class ContextResourcesCache
{
public:
ContextResourcesCache( ContextResourcesCache const & ) = delete;
ContextResourcesCache & operator=( ContextResourcesCache const & ) = delete;
ContextResourcesCache( ContextResourcesCache && )noexcept = delete;
ContextResourcesCache & operator=( ContextResourcesCache && )noexcept = delete;
CRG_API ContextResourcesCache( ResourceHandler & handler
, GraphContext & context );
CRG_API ~ContextResourcesCache()noexcept;
CRG_API VkBuffer createBuffer( BufferId const & bufferId );
CRG_API VkBuffer createBuffer( BufferId const & bufferId, VkDeviceMemory & memory );
CRG_API VkBufferView createBufferView( BufferViewId const & viewId );
CRG_API bool destroyBuffer( BufferId const & imageId );
CRG_API bool destroyBufferView( BufferViewId const & viewId );
CRG_API VkImage createImage( ImageId const & imageId );
CRG_API VkImage createImage( ImageId const & imageId, VkDeviceMemory & memory );
CRG_API VkImageView createImageView( ImageViewId const & viewId );
CRG_API bool destroyImage( ImageId const & imageId );
CRG_API bool destroyImageView( ImageViewId const & viewId );
CRG_API VkSampler createSampler( SamplerDesc const & samplerDesc );
CRG_API VertexBuffer const & createQuadTriVertexBuffer( bool texCoords
, Texcoord const & config );
GraphContext * operator->()const noexcept
{
return &m_context;
}
GraphContext & getContext()const noexcept
{
return m_context;
}
ResourceHandler & getHandler()const
{
return m_handler;
}
private:
using VkBufferIdMap = std::map< BufferId, VkBuffer >;
using VkBufferViewIdMap = std::map< BufferViewId, VkBufferView >;
using VkImageIdMap = std::map< ImageId, VkImage >;
using VkImageViewIdMap = std::map< ImageViewId, VkImageView >;
ResourceHandler & m_handler;
GraphContext & m_context;
VkBufferIdMap m_buffers;
VkBufferViewIdMap m_bufferViews;
VkImageIdMap m_images;
VkImageViewIdMap m_imageViews;
std::unordered_map< size_t, Vk
gitextract_6fjoabne/ ├── .editorconfig ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ └── feature_request.md │ ├── codecov.yml │ └── workflows/ │ └── cmake.yml ├── .gitignore ├── .gitmodules ├── AUTHORS ├── CMakeLists.txt ├── CMakePresets.json ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── include/ │ └── RenderGraph/ │ ├── Attachment.hpp │ ├── AttachmentTransition.hpp │ ├── BufferData.hpp │ ├── BufferViewData.hpp │ ├── DotExport.hpp │ ├── Exception.hpp │ ├── FrameGraph.hpp │ ├── FrameGraphBase.hpp │ ├── FrameGraphEnums.hpp │ ├── FrameGraphFunctions.hpp │ ├── FrameGraphPrerequisites.hpp │ ├── FrameGraphStructs.hpp │ ├── FramePass.hpp │ ├── FramePassGroup.hpp │ ├── FramePassTimer.hpp │ ├── GraphContext.hpp │ ├── GraphNode.hpp │ ├── GraphVisitor.hpp │ ├── Hash.hpp │ ├── Id.hpp │ ├── ImageData.hpp │ ├── ImageViewData.hpp │ ├── LayerLayoutStatesHandler.hpp │ ├── Log.hpp │ ├── PixelFormat.inl │ ├── RecordContext.hpp │ ├── ResourceHandler.hpp │ ├── RunnableGraph.hpp │ ├── RunnablePass.hpp │ ├── RunnablePasses/ │ │ ├── BufferCopy.hpp │ │ ├── BufferToImageCopy.hpp │ │ ├── ComputePass.hpp │ │ ├── GenerateMipmaps.hpp │ │ ├── ImageBlit.hpp │ │ ├── ImageCopy.hpp │ │ ├── ImageToBufferCopy.hpp │ │ ├── PipelineConfig.hpp │ │ ├── PipelineHolder.hpp │ │ ├── RenderMesh.hpp │ │ ├── RenderMeshConfig.hpp │ │ ├── RenderMeshHolder.hpp │ │ ├── RenderPass.hpp │ │ ├── RenderPassHolder.hpp │ │ ├── RenderQuad.hpp │ │ ├── RenderQuadConfig.hpp │ │ └── RenderQuadHolder.hpp │ ├── Signal.hpp │ ├── Version.hpp.in │ └── WriteDescriptorSet.hpp ├── source/ │ ├── CMakeLists.txt │ └── RenderGraph/ │ ├── Attachment.cpp │ ├── AttachmentTransition.cpp │ ├── BuilderCommon.hpp │ ├── DotExport.cpp │ ├── FrameGraph.cpp │ ├── FrameGraph.natvis │ ├── FrameGraphPrerequisites.cpp │ ├── FramePass.cpp │ ├── FramePassGroup.cpp │ ├── FramePassTimer.cpp │ ├── GraphBuilder.cpp │ ├── GraphBuilder.hpp │ ├── GraphContext.cpp │ ├── GraphNode.cpp │ ├── LayerLayoutStatesHandler.cpp │ ├── Log.cpp │ ├── RecordContext.cpp │ ├── ResourceHandler.cpp │ ├── RunnableGraph.cpp │ ├── RunnablePass.cpp │ └── RunnablePasses/ │ ├── BufferCopy.cpp │ ├── BufferToImageCopy.cpp │ ├── ComputePass.cpp │ ├── GenerateMipmaps.cpp │ ├── ImageBlit.cpp │ ├── ImageCopy.cpp │ ├── ImageToBufferCopy.cpp │ ├── PipelineHolder.cpp │ ├── RenderMesh.cpp │ ├── RenderMeshHolder.cpp │ ├── RenderPass.cpp │ ├── RenderPassHolder.cpp │ ├── RenderQuad.cpp │ └── RenderQuadHolder.cpp ├── test/ │ ├── BaseTest.cpp │ ├── BaseTest.hpp │ ├── CMakeLists.txt │ ├── Common.cpp │ ├── Common.hpp │ ├── TestAttachment.cpp │ ├── TestBases.cpp │ ├── TestRenderGraph.cpp │ ├── TestRenderPass.cpp │ └── TestRunnablePass.cpp └── vcpkg.json
SYMBOL INDEX (1360 symbols across 89 files)
FILE: include/RenderGraph/Attachment.hpp
type crg (line 16) | namespace crg
type SamplerDesc (line 20) | struct SamplerDesc
method SamplerDesc (line 32) | explicit constexpr SamplerDesc( FilterMode magFilter = FilterMode::e...
type ImageAttachment (line 60) | struct ImageAttachment
type Flag (line 69) | enum class Flag : FlagKind
method FlagKind (line 97) | FlagKind getFlags()const
method FlagKind (line 102) | FlagKind getFormatFlags()const
method getViewCount (line 107) | uint32_t getViewCount()const
method hasFlag (line 112) | bool hasFlag( Flag flag )const
method isSampledView (line 117) | bool isSampledView()const
method isStorageView (line 122) | bool isStorageView()const
method isTransferView (line 127) | bool isTransferView()const
method isTransitionView (line 132) | bool isTransitionView()const
method isDepthTarget (line 137) | bool isDepthTarget()const
method isStencilTarget (line 142) | bool isStencilTarget()const
method isDepthStencilTarget (line 147) | bool isDepthStencilTarget()const
method isColourTarget (line 152) | bool isColourTarget()const
method isStencilClearingTarget (line 162) | bool isStencilClearingTarget()const
method isStencilInputTarget (line 167) | bool isStencilInputTarget()const
method isStencilOutputTarget (line 172) | bool isStencilOutputTarget()const
method ImageAttachment (line 190) | ImageAttachment() = default;
type BufferAttachment (line 220) | struct BufferAttachment
type Flag (line 229) | enum class Flag : FlagKind
method FlagKind (line 249) | FlagKind getFlags()const
method FlagKind (line 254) | FlagKind getFormatFlags()const
method hasFlag (line 259) | bool hasFlag( Flag flag )const
method isUniform (line 264) | bool isUniform()const
method isStorage (line 269) | bool isStorage()const
method isTransfer (line 274) | bool isTransfer()const
method isTransition (line 279) | bool isTransition()const
method isView (line 284) | bool isView()const
method isUniformView (line 289) | bool isUniformView()const
method isStorageView (line 294) | bool isStorageView()const
method isTransitionView (line 299) | bool isTransitionView()const
method BufferAttachment (line 310) | BufferAttachment() = default;
type Attachment (line 327) | struct Attachment
class Token (line 332) | class Token
method Token (line 338) | Token() noexcept = default;
type Source (line 341) | struct Source
method Source (line 343) | Source( Attachment const * parent
method Source (line 352) | Source( Attachment const * parent
method Source (line 361) | explicit Source( AttachmentPtr sourceAttach )
type Flag (line 380) | enum class Flag : FlagKind
method Attachment (line 394) | Attachment( Attachment && rhs )noexcept = default;
method Attachment (line 395) | Attachment & operator=( Attachment && rhs )noexcept = default;
method FlagKind (line 410) | FlagKind getFlags()const
method hasFlag (line 415) | bool hasFlag( Flag flag )const
method isNoTransition (line 420) | bool isNoTransition()const
method isInput (line 425) | bool isInput()const
method isOutput (line 430) | bool isOutput()const
method isInOut (line 435) | bool isInOut()const
method isImage (line 440) | bool isImage()const
method isBuffer (line 445) | bool isBuffer()const
method isClearable (line 450) | bool isClearable()const
method isUniformBuffer (line 455) | bool isUniformBuffer()const
method isUniformBufferView (line 460) | bool isUniformBufferView()const
method isStorageBuffer (line 465) | bool isStorageBuffer()const
method isTransferBuffer (line 470) | bool isTransferBuffer()const
method isTransferInputBuffer (line 475) | bool isTransferInputBuffer()const
method isTransferOutputBuffer (line 480) | bool isTransferOutputBuffer()const
method isClearableBuffer (line 485) | bool isClearableBuffer()const
method isClearableImage (line 492) | bool isClearableImage()const
method isStorageBufferView (line 499) | bool isStorageBufferView()const
method isTransitionBuffer (line 504) | bool isTransitionBuffer()const
method isTransitionBufferView (line 509) | bool isTransitionBufferView()const
method isBufferView (line 514) | bool isBufferView()const
method isSampledImageView (line 519) | bool isSampledImageView()const
method isStorageImageView (line 524) | bool isStorageImageView()const
method isTransferImageView (line 529) | bool isTransferImageView()const
method isTransitionImageView (line 534) | bool isTransitionImageView()const
method isDepthImageTarget (line 539) | bool isDepthImageTarget()const
method isStencilImageTarget (line 544) | bool isStencilImageTarget()const
method isColourImageTarget (line 549) | bool isColourImageTarget()const
method isColourInputImageTarget (line 559) | bool isColourInputImageTarget()const
method isColourOutputImageTarget (line 564) | bool isColourOutputImageTarget()const
method isColourInOutImageTarget (line 569) | bool isColourInOutImageTarget()const
method isDepthInputImageTarget (line 574) | bool isDepthInputImageTarget()const
method isDepthOutputImageTarget (line 579) | bool isDepthOutputImageTarget()const
method isDepthInOutImageTarget (line 584) | bool isDepthInOutImageTarget()const
method isStencilClearingImageTarget (line 589) | bool isStencilClearingImageTarget()const
method isStencilInputImageTarget (line 594) | bool isStencilInputImageTarget()const
method isStencilOutputImageTarget (line 599) | bool isStencilOutputImageTarget()const
method isStencilInOutImageTarget (line 604) | bool isStencilInOutImageTarget()const
method isDepthStencilInputImageTarget (line 609) | bool isDepthStencilInputImageTarget()const
method isDepthStencilOutputImageTarget (line 614) | bool isDepthStencilOutputImageTarget()const
method isDepthStencilInOutImageTarget (line 619) | bool isDepthStencilInOutImageTarget()const
method isTransferInputImageView (line 624) | bool isTransferInputImageView()const
method isTransferOutputImageView (line 629) | bool isTransferOutputImageView()const
method isStorageInputImageView (line 634) | bool isStorageInputImageView()const
method isStorageOutputImageView (line 639) | bool isStorageOutputImageView()const
method BufferSubresourceRange (line 644) | BufferSubresourceRange const & getBufferRange()const
method ClearValue (line 649) | ClearValue const & getClearValue()const
method AttachmentLoadOp (line 654) | AttachmentLoadOp getLoadOp()const
method AttachmentLoadOp (line 659) | AttachmentLoadOp getStencilLoadOp()const
method AttachmentStoreOp (line 664) | AttachmentStoreOp getStoreOp()const
method AttachmentStoreOp (line 669) | AttachmentStoreOp getStencilStoreOp()const
method PipelineColorBlendAttachmentState (line 674) | PipelineColorBlendAttachmentState getBlendState()const
method Attachment (line 683) | static Attachment createDefault( ImageViewIdArray views )
method Attachment (line 687) | static Attachment createDefault( BufferViewIdArray views )
method Attachment (line 691) | static Attachment createDefault( ImageViewId view )
method Attachment (line 695) | static Attachment createDefault( BufferViewId view )
FILE: include/RenderGraph/AttachmentTransition.hpp
type crg (line 11) | namespace crg
type DataTransitionT (line 14) | struct DataTransitionT
method DataTransitionT (line 16) | DataTransitionT( DataT data, Attachment outputAttach, Attachment inp...
type AttachmentTransitions (line 36) | struct AttachmentTransitions
FILE: include/RenderGraph/BufferData.hpp
type crg (line 9) | namespace crg
type BufferData (line 15) | struct BufferData
method BufferData (line 20) | explicit BufferData( std::string name = {}
FILE: include/RenderGraph/BufferViewData.hpp
type crg (line 9) | namespace crg
type BufferViewData (line 15) | struct BufferViewData
method BufferViewData (line 22) | explicit BufferViewData( std::string name = {}
type VertexBuffer (line 40) | struct VertexBuffer
method VertexBuffer (line 42) | explicit VertexBuffer( BufferViewId pbuffer = BufferViewId{}
method VertexBuffer (line 52) | VertexBuffer( VertexBuffer const & rhs )
method VertexBuffer (line 60) | VertexBuffer( VertexBuffer && rhs )noexcept
method VertexBuffer (line 68) | VertexBuffer & operator=( VertexBuffer const & rhs )
method VertexBuffer (line 78) | VertexBuffer & operator=( VertexBuffer && rhs )noexcept
method doUpdateState (line 94) | void doUpdateState()
type IndexBuffer (line 103) | struct IndexBuffer
method IndexBuffer (line 105) | explicit IndexBuffer( BufferViewId pbuffer = BufferViewId{} )
type IndirectBuffer (line 116) | struct IndirectBuffer
method IndirectBuffer (line 118) | explicit IndirectBuffer( BufferViewId pbuffer
type DefaultValueGetterT< VertexBuffer > (line 133) | struct DefaultValueGetterT< VertexBuffer >
method VertexBuffer (line 135) | static VertexBuffer get()
type DefaultValueGetterT< IndexBuffer > (line 143) | struct DefaultValueGetterT< IndexBuffer >
method IndexBuffer (line 145) | static IndexBuffer get()
type DefaultValueGetterT< IndirectBuffer > (line 153) | struct DefaultValueGetterT< IndirectBuffer >
method IndirectBuffer (line 155) | static IndirectBuffer get()
FILE: include/RenderGraph/DotExport.hpp
type crg::dot (line 17) | namespace crg::dot
type Config (line 19) | struct Config
FILE: include/RenderGraph/Exception.hpp
type crg (line 11) | namespace crg
class Exception (line 13) | class Exception
method Exception (line 17) | Exception( std::string const & text
FILE: include/RenderGraph/FrameGraph.hpp
type crg (line 19) | namespace crg
class FrameGraph (line 21) | class FrameGraph
method FrameGraph (line 31) | FrameGraph( FrameGraph const & ) = delete;
method FrameGraph (line 32) | FrameGraph & operator=( FrameGraph const & ) = delete;
method FrameGraph (line 33) | FrameGraph & operator=( FrameGraph && )noexcept = delete;
method FrameGraph (line 34) | FrameGraph( FrameGraph && )noexcept = default;
method addDependency (line 101) | void addDependency( FrameGraph const & pgraph )
method ResourceHandler (line 142) | ResourceHandler & getHandler()noexcept
method FrameGraphArray (line 152) | FrameGraphArray const & getDependencies()const noexcept
method RecordContext (line 157) | RecordContext const & getFinalStates()const noexcept
method FramePassGroup (line 162) | FramePassGroup & getDefaultGroup()const noexcept
FILE: include/RenderGraph/FrameGraphBase.hpp
type crg (line 34) | namespace crg
type Attachment (line 36) | struct Attachment
type AttachmentTransitions (line 37) | struct AttachmentTransitions
type BufferData (line 38) | struct BufferData
type BufferViewData (line 39) | struct BufferViewData
type FramePass (line 40) | struct FramePass
type FramePassGroup (line 41) | struct FramePassGroup
type GraphContext (line 42) | struct GraphContext
type GraphNode (line 43) | struct GraphNode
type ImageData (line 44) | struct ImageData
type ImageViewData (line 45) | struct ImageViewData
type IndexBuffer (line 46) | struct IndexBuffer
type IndirectBuffer (line 47) | struct IndirectBuffer
type LayoutState (line 48) | struct LayoutState
type PipelineState (line 49) | struct PipelineState
type RootNode (line 50) | struct RootNode
type SamplerDesc (line 51) | struct SamplerDesc
type SemaphoreWait (line 52) | struct SemaphoreWait
type Texcoord (line 53) | struct Texcoord
type VertexBuffer (line 54) | struct VertexBuffer
type WriteDescriptorSet (line 55) | struct WriteDescriptorSet
class ContextResourcesCache (line 57) | class ContextResourcesCache
class Exception (line 58) | class Exception
class Fence (line 59) | class Fence
class FrameGraph (line 60) | class FrameGraph
class FramePassTimer (line 61) | class FramePassTimer
class GraphVisitor (line 62) | class GraphVisitor
class ImageCopy (line 63) | class ImageCopy
class PipelinePass (line 64) | class PipelinePass
class RecordContext (line 65) | class RecordContext
class RenderPass (line 66) | class RenderPass
class RenderQuad (line 67) | class RenderQuad
class ResourceHandler (line 68) | class ResourceHandler
class ResourcesCache (line 69) | class ResourcesCache
class RunnableGraph (line 70) | class RunnableGraph
class RunnablePass (line 71) | class RunnablePass
type Id (line 74) | struct Id
type DataTransitionT (line 76) | struct DataTransitionT
type ContextObjectT (line 80) | struct ContextObjectT
type DefaultValueGetterT (line 82) | struct DefaultValueGetterT
type RawTyperT (line 84) | struct RawTyperT
FILE: include/RenderGraph/FrameGraphEnums.hpp
type crg (line 18) | namespace crg
type PixelFormat (line 20) | enum class PixelFormat : int32_t
type ImageType (line 27) | enum class ImageType : int32_t
type SampleCount (line 34) | enum class SampleCount : int32_t
type ImageTiling (line 45) | enum class ImageTiling : int32_t
type ImageViewType (line 52) | enum class ImageViewType : int32_t
type ImageLayout (line 63) | enum class ImageLayout : int32_t
type FilterMode (line 97) | enum class FilterMode : int32_t
type MipmapMode (line 103) | enum class MipmapMode : int32_t
type WrapMode (line 109) | enum class WrapMode : int32_t
type AttachmentLoadOp (line 118) | enum class AttachmentLoadOp : int32_t
type AttachmentStoreOp (line 126) | enum class AttachmentStoreOp : int32_t
type BlendFactor (line 133) | enum class BlendFactor : int32_t
type BlendOp (line 156) | enum class BlendOp : int32_t
type BufferCreateFlags (line 211) | enum class BufferCreateFlags : int32_t
type BufferUsageFlags (line 224) | enum class BufferUsageFlags : int32_t
type MemoryPropertyFlags (line 256) | enum class MemoryPropertyFlags : int32_t
type ImageCreateFlags (line 271) | enum class ImageCreateFlags : int32_t
type ImageUsageFlags (line 297) | enum class ImageUsageFlags : int32_t
type ImageViewCreateFlags (line 327) | enum class ImageViewCreateFlags : int32_t
type ImageAspectFlags (line 336) | enum class ImageAspectFlags : int32_t
type PipelineStageFlags (line 354) | enum class PipelineStageFlags : int32_t
type AccessFlags (line 386) | enum class AccessFlags : int32_t
type ColorComponentFlags (line 420) | enum class ColorComponentFlags : int32_t
FILE: include/RenderGraph/FrameGraphFunctions.hpp
type crg (line 11) | namespace crg
function VkFormat (line 68) | constexpr VkFormat convert( PixelFormat v )noexcept
function PixelFormat (line 73) | constexpr PixelFormat convert( VkFormat v )noexcept
function isDepthFormat (line 78) | constexpr bool isDepthFormat( PixelFormat fmt )noexcept
function isStencilFormat (line 88) | constexpr bool isStencilFormat( PixelFormat fmt )noexcept
function isColourFormat (line 96) | constexpr bool isColourFormat( PixelFormat fmt )noexcept
function isDepthStencilFormat (line 101) | constexpr bool isDepthStencilFormat( PixelFormat fmt )noexcept
function isDepthOrStencilFormat (line 106) | constexpr bool isDepthOrStencilFormat( PixelFormat fmt )noexcept
function VkImageType (line 111) | constexpr VkImageType convert( ImageType v )noexcept
function ImageType (line 116) | constexpr ImageType convert( VkImageType v )noexcept
function VkSampleCountFlagBits (line 121) | constexpr VkSampleCountFlagBits convert( SampleCount v )noexcept
function SampleCount (line 126) | constexpr SampleCount convert( VkSampleCountFlagBits v )noexcept
function VkImageTiling (line 131) | constexpr VkImageTiling convert( ImageTiling v )noexcept
function ImageTiling (line 136) | constexpr ImageTiling convert( VkImageTiling v )noexcept
function VkImageViewType (line 141) | constexpr VkImageViewType convert( ImageViewType v )noexcept
function ImageViewType (line 146) | constexpr ImageViewType convert( VkImageViewType v )noexcept
function VkImageLayout (line 151) | constexpr VkImageLayout convert( ImageLayout v )noexcept
function ImageLayout (line 156) | constexpr ImageLayout convert( VkImageLayout v )noexcept
function VkFilter (line 161) | constexpr VkFilter convert( FilterMode v )noexcept
function FilterMode (line 166) | constexpr FilterMode convert( VkFilter v )noexcept
function VkSamplerMipmapMode (line 171) | constexpr VkSamplerMipmapMode convert( MipmapMode v )noexcept
function MipmapMode (line 176) | constexpr MipmapMode convert( VkSamplerMipmapMode v )noexcept
function VkSamplerAddressMode (line 181) | constexpr VkSamplerAddressMode convert( WrapMode v )noexcept
function WrapMode (line 186) | constexpr WrapMode convert( VkSamplerAddressMode v )noexcept
function VkAttachmentLoadOp (line 191) | constexpr VkAttachmentLoadOp convert( AttachmentLoadOp v )noexcept
function AttachmentLoadOp (line 196) | constexpr AttachmentLoadOp convert( VkAttachmentLoadOp v )noexcept
function VkBlendFactor (line 201) | constexpr VkBlendFactor convert( BlendFactor v )noexcept
function BlendFactor (line 206) | constexpr BlendFactor convert( VkBlendFactor v )noexcept
function VkBlendOp (line 211) | constexpr VkBlendOp convert( BlendOp v )noexcept
function BlendOp (line 216) | constexpr BlendOp convert( VkBlendOp v )noexcept
function VkAttachmentStoreOp (line 221) | constexpr VkAttachmentStoreOp convert( AttachmentStoreOp v )noexcept
function AttachmentStoreOp (line 226) | constexpr AttachmentStoreOp convert( VkAttachmentStoreOp v )noexcept
function VkBufferCreateFlags (line 231) | constexpr VkBufferCreateFlags getBufferCreateFlags( BufferCreateFlags ...
function BufferCreateFlags (line 236) | constexpr BufferCreateFlags getBufferCreateFlags( VkBufferCreateFlags ...
function VkBufferUsageFlags (line 241) | constexpr VkBufferUsageFlags getBufferUsageFlags( BufferUsageFlags v )...
function BufferUsageFlags (line 246) | constexpr BufferUsageFlags getBufferUsageFlags( VkBufferUsageFlags v )...
function VkMemoryPropertyFlags (line 251) | constexpr VkMemoryPropertyFlags getMemoryPropertyFlags( MemoryProperty...
function MemoryPropertyFlags (line 256) | constexpr MemoryPropertyFlags getMemoryPropertyFlags( VkMemoryProperty...
function VkImageCreateFlags (line 261) | constexpr VkImageCreateFlags getImageCreateFlags( ImageCreateFlags v )...
function ImageCreateFlags (line 266) | constexpr ImageCreateFlags getImageCreateFlags( VkImageCreateFlags v )...
function VkImageUsageFlags (line 271) | constexpr VkImageUsageFlags getImageUsageFlags( ImageUsageFlags v )noe...
function ImageUsageFlags (line 276) | constexpr ImageUsageFlags getImageUsageFlags( VkImageUsageFlags v )noe...
function VkImageViewCreateFlags (line 281) | constexpr VkImageViewCreateFlags getImageViewCreateFlags( ImageViewCre...
function ImageViewCreateFlags (line 286) | constexpr ImageViewCreateFlags getImageViewCreateFlags( VkImageViewCre...
function VkImageAspectFlags (line 291) | constexpr VkImageAspectFlags getImageAspectFlags( ImageAspectFlags v )...
function ImageAspectFlags (line 296) | constexpr ImageAspectFlags getImageAspectFlags( VkImageAspectFlags v )...
function VkPipelineStageFlags (line 301) | constexpr VkPipelineStageFlags getPipelineStageFlags( PipelineStageFla...
function PipelineStageFlags (line 306) | constexpr PipelineStageFlags getPipelineStageFlags( VkPipelineStageFla...
function VkAccessFlags (line 311) | constexpr VkAccessFlags getAccessFlags( AccessFlags v )noexcept
function AccessFlags (line 316) | constexpr AccessFlags getAccessFlags( VkAccessFlags v )noexcept
function VkColorComponentFlags (line 321) | constexpr VkColorComponentFlags getColorComponentFlags( ColorComponent...
function ColorComponentFlags (line 326) | constexpr ColorComponentFlags getColorComponentFlags( VkColorComponent...
function VkExtent2D (line 331) | constexpr VkExtent2D convert( Extent2D const & v )noexcept
function Extent2D (line 336) | constexpr Extent2D convert( VkExtent2D const & v )noexcept
function VkOffset2D (line 341) | constexpr VkOffset2D convert( Offset2D const & v )noexcept
function Offset2D (line 346) | constexpr Offset2D convert( VkOffset2D const & v )noexcept
function VkRect2D (line 351) | constexpr VkRect2D convert( Rect2D const & v )noexcept
function Rect2D (line 356) | constexpr Rect2D convert( VkRect2D const & v )noexcept
function VkExtent3D (line 361) | constexpr VkExtent3D convert( Extent3D const & v )noexcept
function Extent3D (line 366) | constexpr Extent3D convert( VkExtent3D const & v )noexcept
function VkOffset3D (line 371) | constexpr VkOffset3D convert( Offset3D const & v )noexcept
function Offset3D (line 376) | constexpr Offset3D convert( VkOffset3D const & v )noexcept
function VkImageSubresourceRange (line 381) | constexpr VkImageSubresourceRange convert( ImageSubresourceRange const...
function ImageSubresourceRange (line 386) | constexpr ImageSubresourceRange convert( VkImageSubresourceRange const...
function VkPipelineColorBlendAttachmentState (line 391) | constexpr VkPipelineColorBlendAttachmentState convert( PipelineColorBl...
function PipelineColorBlendAttachmentState (line 396) | constexpr PipelineColorBlendAttachmentState convert( VkPipelineColorBl...
function VkClearDepthStencilValue (line 401) | constexpr VkClearDepthStencilValue convert( ClearDepthStencilValue con...
function VkClearColorValue (line 406) | constexpr VkClearColorValue convert( ClearColorValue const & v )noexcept
function VkClearValue (line 437) | constexpr VkClearValue convert( ClearValue const & v )noexcept
function VkBufferViewCreateInfo (line 451) | constexpr VkBufferViewCreateInfo convert( BufferViewCreateInfo const &...
function BufferViewCreateInfo (line 458) | constexpr BufferViewCreateInfo convert( VkBufferViewCreateInfo const &...
function VkBufferCreateInfo (line 464) | constexpr VkBufferCreateInfo convert( BufferCreateInfo const & v )noex...
function BufferCreateInfo (line 472) | constexpr BufferCreateInfo convert( VkBufferCreateInfo const & v )noex...
function VkImageViewCreateInfo (line 479) | constexpr VkImageViewCreateInfo convert( ImageViewCreateInfo const & v...
function ImageViewCreateInfo (line 487) | constexpr ImageViewCreateInfo convert( VkImageViewCreateInfo const & v...
function VkImageCreateInfo (line 493) | constexpr VkImageCreateInfo convert( ImageCreateInfo const & v )noexcept
function ImageCreateInfo (line 503) | constexpr ImageCreateInfo convert( VkImageCreateInfo const & v )noexcept
function VkImageSubresourceLayers (line 510) | inline VkImageSubresourceLayers getSubresourceLayers( ImageSubresource...
function VkImageSubresourceLayers (line 519) | inline VkImageSubresourceLayers getSubresourceLayers( ImageSubresource...
function VkImageSubresourceLayers (line 524) | inline VkImageSubresourceLayers getSubresourceLayer( ImageSubresourceR...
FILE: include/RenderGraph/FrameGraphPrerequisites.hpp
type crg (line 9) | namespace crg
function TypeT (line 17) | static inline TypeT getDefaultV()
type DefaultValueGetterT< VkPipelineVertexInputStateCreateInfo > (line 23) | struct DefaultValueGetterT< VkPipelineVertexInputStateCreateInfo >
method VkPipelineVertexInputStateCreateInfo (line 25) | static VkPipelineVertexInputStateCreateInfo get()
FILE: include/RenderGraph/FrameGraphStructs.hpp
type crg (line 12) | namespace crg
type Offset2D (line 14) | struct Offset2D
type Extent2D (line 23) | struct Extent2D
type Rect2D (line 32) | struct Rect2D
type Offset3D (line 41) | struct Offset3D
type Extent3D (line 51) | struct Extent3D
type Rect3D (line 61) | struct Rect3D
type BufferSubresourceRange (line 70) | struct BufferSubresourceRange
type ImageSubresourceRange (line 86) | struct ImageSubresourceRange
type BufferCreateInfo (line 111) | struct BufferCreateInfo
type BufferViewCreateInfo (line 122) | struct BufferViewCreateInfo
type ImageCreateInfo (line 131) | struct ImageCreateInfo
type ImageViewCreateInfo (line 148) | struct ImageViewCreateInfo
type ClearColorValue (line 159) | struct ClearColorValue
type ValueIndex (line 161) | enum class ValueIndex
method ClearColorValue (line 169) | constexpr ClearColorValue( ValueT r, ValueT g, ValueT b, ValueT a )n...
method ClearColorValue (line 174) | constexpr explicit ClearColorValue( std::array< float, 4u > v = { 0....
method ClearColorValue (line 179) | constexpr explicit ClearColorValue( std::array< int32_t, 4u > v )noe...
method ClearColorValue (line 184) | constexpr explicit ClearColorValue( std::array< uint32_t, 4u > v )no...
method isFloat32 (line 189) | constexpr bool isFloat32()const noexcept
method isInt32 (line 194) | constexpr bool isInt32()const noexcept
method isUInt32 (line 199) | constexpr bool isUInt32()const noexcept
type ClearDepthStencilValue (line 227) | struct ClearDepthStencilValue
type ClearValue (line 236) | struct ClearValue
type ValueIndex (line 238) | enum class ValueIndex
method ClearValue (line 244) | constexpr explicit ClearValue( ClearColorValue v = ClearColorValue{}...
method ClearValue (line 249) | constexpr explicit ClearValue( ClearDepthStencilValue v )noexcept
method isColor (line 254) | constexpr bool isColor()const noexcept
method isDepthStencil (line 259) | constexpr bool isDepthStencil()const noexcept
method ClearColorValue (line 264) | constexpr ClearColorValue const & color()const noexcept
method ClearDepthStencilValue (line 269) | constexpr ClearDepthStencilValue const & depthStencil()const noexcept
type PipelineColorBlendAttachmentState (line 280) | struct PipelineColorBlendAttachmentState
type PipelineState (line 295) | struct PipelineState
type LayoutState (line 304) | struct LayoutState
type ContextObjectT (line 311) | struct ContextObjectT
method ContextObjectT (line 313) | ContextObjectT( ContextObjectT const & rhs ) = delete;
method ContextObjectT (line 314) | ContextObjectT( ContextObjectT && rhs )noexcept = delete;
method ContextObjectT (line 315) | ContextObjectT & operator=( ContextObjectT const & rhs ) = delete;
method ContextObjectT (line 316) | ContextObjectT & operator=( ContextObjectT && rhs )noexcept = delete;
method ContextObjectT (line 318) | explicit ContextObjectT( GraphContext & ctx
type SemaphoreWait (line 340) | struct SemaphoreWait
type RawTyperT (line 347) | struct RawTyperT
FILE: include/RenderGraph/FramePass.hpp
type SampledAttachment (line 23) | struct SampledAttachment
method SampledAttachment (line 25) | SampledAttachment( Attachment const * attach, SamplerDesc sampler )noe...
function addInputUniformBufferT (line 72) | void addInputUniformBufferT( BufferViewIdArray buffers
function addInputUniformBuffer (line 81) | void addInputUniformBuffer( BufferViewId buffer
function addInputUniformBufferT (line 91) | void addInputUniformBufferT( BufferViewId buffer
function addInputSampledImageT (line 108) | void addInputSampledImageT( ImageViewIdArray views
function addInputSampledImage (line 118) | void addInputSampledImage( ImageViewId view
function addInputSampledImageT (line 129) | void addInputSampledImageT( ImageViewId view
function addInputUniformT (line 146) | void addInputUniformT( Attachment const & attach
function addInputSampledT (line 163) | void addInputSampledT( Attachment const & attach
function addInputStorageBufferT (line 188) | void addInputStorageBufferT( BufferViewIdArray buffers
function addInputStorageBuffer (line 197) | void addInputStorageBuffer( BufferViewId buffer
function addInputStorageBufferT (line 207) | void addInputStorageBufferT( BufferViewId buffer
function addInputStorageImageT (line 223) | void addInputStorageImageT( ImageViewIdArray views
function addInputStorageImage (line 232) | void addInputStorageImage( ImageViewId view
function addInputStorageImageT (line 242) | void addInputStorageImageT( ImageViewId view
function addInputStorageT (line 258) | void addInputStorageT( Attachment const & attach
function Attachment (line 274) | Attachment const * addInOutStorageT( Attachment const & attach
function Attachment (line 290) | Attachment const * addOutputStorageBufferT( BufferViewIdArray buffers
function Attachment (line 299) | Attachment const * addOutputStorageBuffer( BufferViewId buffer
function Attachment (line 309) | Attachment const * addOutputStorageBufferT( BufferViewId buffer
function Attachment (line 325) | Attachment const * addClearableOutputStorageBufferT( BufferViewIdArray b...
function Attachment (line 334) | Attachment const * addClearableOutputStorageBuffer( BufferViewId buffer
function Attachment (line 344) | Attachment const * addClearableOutputStorageBufferT( BufferViewId buffer
function Attachment (line 360) | Attachment const * addOutputStorageImageT( ImageViewIdArray views
function Attachment (line 369) | Attachment const * addOutputStorageImage( ImageViewId view
function Attachment (line 379) | Attachment const * addOutputStorageImageT( ImageViewId view
function Attachment (line 396) | Attachment const * addClearableOutputStorageImageT( ImageViewIdArray views
function Attachment (line 408) | Attachment const * addClearableOutputStorageImage( ImageViewId view
function Attachment (line 421) | Attachment const * addClearableOutputStorageImageT( ImageViewId view
function addInputTransferBuffer (line 446) | void addInputTransferBuffer( BufferViewId view )
function addInputTransferImage (line 459) | void addInputTransferImage( ImageViewId view )
function Attachment (line 483) | Attachment const * addOutputTransferBuffer( BufferViewId buffer )
function Attachment (line 496) | Attachment const * addOutputTransferImage( ImageViewId view )
function addInputColourTargetImage (line 517) | void addInputColourTargetImage( ImageViewId view )
function addInputDepthTargetImage (line 530) | void addInputDepthTargetImage( ImageViewId view )
function addInputStencilTargetImage (line 543) | void addInputStencilTargetImage( ImageViewId view )
function addInputDepthStencilTargetImage (line 556) | void addInputDepthStencilTargetImage( ImageViewId view )
function Attachment (line 611) | Attachment const * addOutputColourTarget( ImageViewId view
function Attachment (line 627) | Attachment const * addOutputDepthTarget( ImageViewId view
function Attachment (line 643) | Attachment const * addOutputStencilTarget( ImageViewId view
function Attachment (line 659) | Attachment const * addOutputDepthStencilTarget( ImageViewId view
function begin (line 711) | auto begin()const
function end (line 716) | auto end()const
function FramePassGroup (line 721) | FramePassGroup const & getGroup()const noexcept
function FrameGraph (line 726) | FrameGraph const & getGraph()const noexcept
function getId (line 731) | uint32_t getId()const noexcept
FILE: include/RenderGraph/FramePassGroup.hpp
type crg (line 11) | namespace crg
type FramePassGroup (line 13) | struct FramePassGroup
class Token (line 16) | class Token
method Token (line 22) | Token() noexcept = default;
method FramePassGroupPtrArray (line 134) | FramePassGroupPtrArray const & getGroups()const noexcept
method FramePassPtrArray (line 139) | FramePassPtrArray const & getPasses()const noexcept
method FramePassGroup (line 144) | FramePassGroup const * getParent()const noexcept
method getId (line 149) | uint32_t getId()const noexcept
FILE: include/RenderGraph/FramePassTimer.hpp
type crg (line 13) | namespace crg
type TimerScope (line 22) | enum class TimerScope
class FramePassTimerBlock (line 29) | class FramePassTimerBlock
method FramePassTimerBlock (line 34) | FramePassTimerBlock & operator=( FramePassTimerBlock && rhs )noexcep...
method FramePassTimerBlock (line 35) | FramePassTimerBlock( FramePassTimerBlock const & ) = delete;
method FramePassTimerBlock (line 36) | FramePassTimerBlock & operator=( FramePassTimerBlock const & ) = del...
method FramePassTimer (line 39) | FramePassTimer * operator->()const
class FramePassTimer (line 48) | class FramePassTimer
method FramePassTimer (line 53) | FramePassTimer( FramePassTimer const & rhs ) = delete;
method FramePassTimer (line 54) | FramePassTimer( FramePassTimer && rhs )noexcept = delete;
method FramePassTimer (line 55) | FramePassTimer & operator=( FramePassTimer const & rhs ) = delete;
method FramePassTimer (line 56) | FramePassTimer & operator=( FramePassTimer && rhs )noexcept = delete;
method Nanoseconds (line 133) | Nanoseconds getCpuTime()const noexcept
method Nanoseconds (line 138) | Nanoseconds getGpuTime()const noexcept
method PassColour (line 148) | PassColour const & getColour()const noexcept
method TimerScope (line 153) | TimerScope getScope()const noexcept
type Query (line 174) | struct Query
FILE: include/RenderGraph/GraphContext.hpp
type crg (line 19) | namespace crg
type DebugTypeTraits (line 22) | struct DebugTypeTraits
type DebugTypeTraits< VkBuffer > (line 25) | struct DebugTypeTraits< VkBuffer >
type DebugTypeTraits< VkCommandBuffer > (line 37) | struct DebugTypeTraits< VkCommandBuffer >
type DebugTypeTraits< VkDevice > (line 49) | struct DebugTypeTraits< VkDevice >
type DebugTypeTraits< VkInstance > (line 61) | struct DebugTypeTraits< VkInstance >
type DebugTypeTraits< VkPhysicalDevice > (line 73) | struct DebugTypeTraits< VkPhysicalDevice >
type DebugTypeTraits< VkQueue > (line 85) | struct DebugTypeTraits< VkQueue >
type DebugTypeTraits< VkBufferView > (line 98) | struct DebugTypeTraits< VkBufferView >
type DebugTypeTraits< VkCommandPool > (line 110) | struct DebugTypeTraits< VkCommandPool >
type DebugTypeTraits< VkDescriptorPool > (line 122) | struct DebugTypeTraits< VkDescriptorPool >
type DebugTypeTraits< VkDescriptorSet > (line 134) | struct DebugTypeTraits< VkDescriptorSet >
type DebugTypeTraits< VkDescriptorSetLayout > (line 146) | struct DebugTypeTraits< VkDescriptorSetLayout >
type DebugTypeTraits< VkDeviceMemory > (line 158) | struct DebugTypeTraits< VkDeviceMemory >
type DebugTypeTraits< VkEvent > (line 170) | struct DebugTypeTraits< VkEvent >
type DebugTypeTraits< VkFence > (line 182) | struct DebugTypeTraits< VkFence >
type DebugTypeTraits< VkFramebuffer > (line 194) | struct DebugTypeTraits< VkFramebuffer >
type DebugTypeTraits< VkImage > (line 206) | struct DebugTypeTraits< VkImage >
type DebugTypeTraits< VkImageView > (line 218) | struct DebugTypeTraits< VkImageView >
type DebugTypeTraits< VkPipeline > (line 230) | struct DebugTypeTraits< VkPipeline >
type DebugTypeTraits< VkPipelineLayout > (line 242) | struct DebugTypeTraits< VkPipelineLayout >
type DebugTypeTraits< VkQueryPool > (line 254) | struct DebugTypeTraits< VkQueryPool >
type DebugTypeTraits< VkRenderPass > (line 266) | struct DebugTypeTraits< VkRenderPass >
type DebugTypeTraits< VkSampler > (line 278) | struct DebugTypeTraits< VkSampler >
type DebugTypeTraits< VkSemaphore > (line 290) | struct DebugTypeTraits< VkSemaphore >
type DebugTypeTraits< VkShaderModule > (line 302) | struct DebugTypeTraits< VkShaderModule >
type DebugTypeTraits< VkSurfaceKHR > (line 314) | struct DebugTypeTraits< VkSurfaceKHR >
type DebugTypeTraits< VkSwapchainKHR > (line 326) | struct DebugTypeTraits< VkSwapchainKHR >
type DebugBlockInfo (line 339) | struct DebugBlockInfo
type DeletionQueue (line 345) | struct DeletionQueue
method push (line 352) | void push( DtorFunc func )
method clear (line 357) | void clear( GraphContext & context )
type GraphContext (line 371) | struct GraphContext
method GraphContext (line 373) | GraphContext( GraphContext const & ) = delete;
method GraphContext (line 374) | GraphContext( GraphContext && ) = delete;
method GraphContext (line 375) | GraphContext & operator=( GraphContext const & ) = delete;
method GraphContext (line 376) | GraphContext & operator=( GraphContext && ) = delete;
type ObjectAllocation (line 522) | struct ObjectAllocation
method setCallstackCallback (line 535) | void setCallstackCallback( CallstackCallback callback )
method stRegisterObject (line 541) | static void stRegisterObject( GraphContext & context
method stRegisterObjectName (line 557) | static void stRegisterObjectName( GraphContext & context
method stUnregisterObject (line 572) | static void stUnregisterObject( GraphContext & context, ObjectT obje...
FILE: include/RenderGraph/GraphNode.hpp
type crg (line 12) | namespace crg
type GraphNode (line 20) | struct GraphNode
type Kind (line 22) | enum class Kind
method GraphNode (line 29) | GraphNode & operator=( GraphNode && rhs )noexcept = default;
method setTransitions (line 37) | void setTransitions( AttachmentTransitions transitions )noexcept
method NodeT (line 43) | NodeT const & cast()const noexcept
method NodeT (line 50) | NodeT & cast()noexcept
method Kind (line 56) | Kind getKind()const noexcept
method FramePassGroup (line 66) | FramePassGroup const & getGroup()const noexcept
method getId (line 71) | uint32_t getId()const noexcept
method GraphAdjacentNodeArray (line 76) | GraphAdjacentNodeArray const & getPredecessors()const noexcept
method GraphAdjacentNodeArray (line 81) | GraphAdjacentNodeArray & getPredecessors()noexcept
method ImageTransitionArray (line 86) | ImageTransitionArray const & getImageTransitions()const noexcept
method BufferTransitionArray (line 91) | BufferTransitionArray const & getBufferTransitions()const noexcept
method GraphNode (line 103) | GraphNode( GraphNode const & ) = delete;
method GraphNode (line 104) | GraphNode & operator=( GraphNode const & ) = delete;
type FramePassNode (line 120) | struct FramePassNode
method FramePassNode (line 125) | FramePassNode & operator=( FramePassNode && rhs )noexcept = default;
method FramePassNode (line 126) | FramePassNode( FramePassNode && rhs )noexcept = default;
method FramePass (line 132) | FramePass const & getFramePass()const
method FramePassNode (line 138) | FramePassNode( FramePassNode const & ) = delete;
method FramePassNode (line 139) | FramePassNode & operator=( FramePassNode const & ) = delete;
type RootNode (line 150) | struct RootNode
method RootNode (line 155) | RootNode & operator=( RootNode && rhs )noexcept = default;
method RootNode (line 156) | RootNode( RootNode && rhs )noexcept = default;
method FrameGraph (line 162) | FrameGraph const & getFrameGraph()const
method RootNode (line 168) | RootNode( RootNode const & ) = delete;
method RootNode (line 169) | RootNode & operator=( RootNode const & ) = delete;
function isFramePassNode (line 177) | inline bool isFramePassNode( GraphNode const & node )
function isRootNode (line 182) | inline bool isRootNode( GraphNode const & node )
function isFramePassNode (line 187) | inline bool isFramePassNode( ConstGraphAdjacentNode node )
function isRootNode (line 192) | inline bool isRootNode( ConstGraphAdjacentNode node )
function NodeT (line 198) | NodeT const & nodeCast( GraphNode const & node )
function NodeT (line 204) | NodeT & nodeCast( GraphNode & node )
FILE: include/RenderGraph/GraphVisitor.hpp
type crg (line 9) | namespace crg
class GraphVisitor (line 11) | class GraphVisitor
FILE: include/RenderGraph/Hash.hpp
type crg (line 7) | namespace crg
function hashCombine (line 10) | inline size_t hashCombine( size_t hash
FILE: include/RenderGraph/Id.hpp
type crg (line 9) | namespace crg
type Id (line 12) | struct Id
method Id (line 17) | explicit Id( uint32_t id = 0u
FILE: include/RenderGraph/ImageData.hpp
type crg (line 9) | namespace crg
type ImageData (line 15) | struct ImageData
method ImageData (line 20) | explicit ImageData( std::string name = {}
FILE: include/RenderGraph/ImageViewData.hpp
type crg (line 9) | namespace crg
type ImageViewData (line 15) | struct ImageViewData
method ImageViewData (line 22) | explicit ImageViewData( std::string name = {}
FILE: include/RenderGraph/LayerLayoutStatesHandler.hpp
type crg (line 9) | namespace crg
type LayerLayoutStatesHandler (line 11) | struct LayerLayoutStatesHandler
method LayerLayoutStatesHandler (line 13) | LayerLayoutStatesHandler() = default;
FILE: include/RenderGraph/Log.hpp
type crg (line 18) | namespace crg
class Logger (line 20) | class Logger
FILE: include/RenderGraph/RecordContext.hpp
type crg (line 14) | namespace crg
class RecordContext (line 16) | class RecordContext
type ImplicitImageTransition (line 23) | struct ImplicitImageTransition
type ImplicitBufferTransition (line 30) | struct ImplicitBufferTransition
method GraphContext (line 174) | GraphContext * operator->()const
method ResourceHandler (line 242) | ResourceHandler & getHandler()const
method PassIndexArray (line 247) | PassIndexArray const & getIndexState()const
method PipelineState (line 252) | PipelineState const & getPrevPipelineState()const
method PipelineState (line 257) | PipelineState const & getCurrPipelineState()const
method PipelineState (line 262) | PipelineState const & getNextPipelineState()const
FILE: include/RenderGraph/ResourceHandler.hpp
type crg (line 16) | namespace crg
type Sampler (line 18) | struct Sampler
class ResourceHandler (line 24) | class ResourceHandler
type CreatedT (line 27) | struct CreatedT
type CreatedViewT (line 35) | struct CreatedViewT
method ResourceHandler (line 42) | ResourceHandler( ResourceHandler const & ) = delete;
method ResourceHandler (line 43) | ResourceHandler( ResourceHandler && )noexcept = delete;
method ResourceHandler (line 44) | ResourceHandler & operator=( ResourceHandler const & ) = delete;
method ResourceHandler (line 45) | ResourceHandler & operator=( ResourceHandler && )noexcept = delete;
method ResourceHandler (line 46) | ResourceHandler() = default;
class ContextResourcesCache (line 101) | class ContextResourcesCache
method ContextResourcesCache (line 104) | ContextResourcesCache( ContextResourcesCache const & ) = delete;
method ContextResourcesCache (line 105) | ContextResourcesCache & operator=( ContextResourcesCache const & ) =...
method ContextResourcesCache (line 106) | ContextResourcesCache( ContextResourcesCache && )noexcept = delete;
method ContextResourcesCache (line 107) | ContextResourcesCache & operator=( ContextResourcesCache && )noexcep...
method GraphContext (line 129) | GraphContext * operator->()const noexcept
method GraphContext (line 134) | GraphContext & getContext()const noexcept
method ResourceHandler (line 139) | ResourceHandler & getHandler()const
class ResourcesCache (line 160) | class ResourcesCache
method ResourceHandler (line 201) | ResourceHandler & getHandler()const
FILE: include/RenderGraph/RunnableGraph.hpp
type crg (line 12) | namespace crg
type Texcoord (line 18) | struct Texcoord
type DefaultValueGetterT< Texcoord > (line 33) | struct DefaultValueGetterT< Texcoord >
method Texcoord (line 35) | static Texcoord get()
class RunnableGraph (line 42) | class RunnableGraph
method WriteDescriptorSet (line 91) | WriteDescriptorSet getDescriptorWriteT( Attachment const & attach, E...
method WriteDescriptorSet (line 97) | WriteDescriptorSet getDescriptorWriteT( Attachment const & attach, S...
method ConstGraphAdjacentNode (line 102) | ConstGraphAdjacentNode getNodeGraph()const noexcept
method VkCommandPool (line 112) | VkCommandPool getCommandPool()const noexcept
method VkQueryPool (line 117) | VkQueryPool getTimerQueryPool()const noexcept
method ContextResourcesCache (line 127) | ContextResourcesCache & getResources()noexcept
method Fence (line 132) | Fence & getFence()noexcept
method Fence (line 137) | Fence const & getFence()const noexcept
method FramePassTimer (line 142) | FramePassTimer const & getTimer()const noexcept
method FramePassTimer (line 147) | FramePassTimer & getTimer()noexcept
method GraphContext (line 152) | GraphContext & getContext()const noexcept
FILE: include/RenderGraph/RunnablePass.hpp
type crg (line 14) | namespace crg
type GetValueCallbackT (line 22) | struct GetValueCallbackT
method GetValueCallbackT (line 26) | GetValueCallbackT( GetValueCallbackT && )noexcept = default;
method GetValueCallbackT (line 27) | GetValueCallbackT & operator=( GetValueCallbackT && )noexcept = defa...
method GetValueCallbackT (line 28) | GetValueCallbackT( GetValueCallbackT const & ) = default;
method GetValueCallbackT (line 29) | GetValueCallbackT & operator=( GetValueCallbackT const & ) = default;
method GetValueCallbackT (line 30) | explicit GetValueCallbackT( CallbackT callback = {} )
method ValueT (line 35) | ValueT operator()()const
function makeValueCallback (line 45) | GetValueCallbackT< StrongT, ValueT > makeValueCallback( std::function<...
class Fence (line 50) | class Fence
method Fence (line 57) | Fence( Fence const & ) = delete;
method Fence (line 58) | Fence & operator=( Fence const & ) = delete;
method Fence (line 59) | Fence & operator=( Fence && rhs )noexcept = delete;
method VkFence (line 66) | VkFence getInternal()const noexcept
type ru (line 77) | namespace ru
type Config (line 79) | struct Config
type DefaultValueGetterT< ru::Config > (line 134) | struct DefaultValueGetterT< ru::Config >
method get (line 136) | static ru::Config get()
class RunnablePass (line 146) | class RunnablePass
type LayoutTransition (line 149) | struct LayoutTransition
type AccessTransition (line 159) | struct AccessTransition
type PassIndexT (line 169) | struct PassIndexT
type PipelineStateT (line 172) | struct PipelineStateT
type EnabledT (line 175) | struct EnabledT
type ComputePassT (line 178) | struct ComputePassT
type Callbacks (line 189) | struct Callbacks
method LayoutState (line 258) | LayoutState getLayoutState( crg::ImageViewId view )const
method isEnabled (line 263) | bool isEnabled()const
method getIndex (line 268) | uint32_t getIndex()const
method FramePass (line 273) | FramePass const & getPass()const
method RunnableGraph (line 278) | RunnableGraph & getGraph()const
method FramePassTimer (line 283) | FramePassTimer const & getTimer()const
method FramePassTimer (line 288) | FramePassTimer & getTimer()
method getMaxPassCount (line 293) | uint32_t getMaxPassCount()const
method PipelineState (line 298) | PipelineState const & getPipelineState()const
method LayerLayoutStatesMap (line 303) | LayerLayoutStatesMap const & getImageLayouts()const
type CommandBuffer (line 309) | struct CommandBuffer
type PassData (line 329) | struct PassData
method PassData (line 331) | PassData( PassData const & ) = delete;
method PassData (line 332) | PassData & operator=( PassData const & ) = delete;
method PassData (line 333) | PassData & operator=( PassData && )noexcept = delete;
method PassData (line 334) | PassData( PassData && rhs )noexcept
type DefaultValueGetterT< RunnablePass::InitialiseCallback > (line 380) | struct DefaultValueGetterT< RunnablePass::InitialiseCallback >
method get (line 382) | static RunnablePass::InitialiseCallback get()
type DefaultValueGetterT< RunnablePass::GetPipelineStateCallback > (line 390) | struct DefaultValueGetterT< RunnablePass::GetPipelineStateCallback >
method get (line 392) | static RunnablePass::GetPipelineStateCallback get()
type DefaultValueGetterT< RunnablePass::RecordCallback > (line 400) | struct DefaultValueGetterT< RunnablePass::RecordCallback >
method get (line 402) | static RunnablePass::RecordCallback get()
type DefaultValueGetterT< RunnablePass::GetPassIndexCallback > (line 410) | struct DefaultValueGetterT< RunnablePass::GetPassIndexCallback >
method get (line 412) | static RunnablePass::GetPassIndexCallback get()
type DefaultValueGetterT< RunnablePass::IsEnabledCallback > (line 420) | struct DefaultValueGetterT< RunnablePass::IsEnabledCallback >
method get (line 422) | static RunnablePass::IsEnabledCallback get()
type DefaultValueGetterT< RunnablePass::IsComputePassCallback > (line 430) | struct DefaultValueGetterT< RunnablePass::IsComputePassCallback >
method get (line 432) | static RunnablePass::IsComputePassCallback get()
FILE: include/RenderGraph/RunnablePasses/BufferCopy.hpp
type crg (line 8) | namespace crg
class BufferCopy (line 10) | class BufferCopy
FILE: include/RenderGraph/RunnablePasses/BufferToImageCopy.hpp
type crg (line 8) | namespace crg
class BufferToImageCopy (line 10) | class BufferToImageCopy
FILE: include/RenderGraph/RunnablePasses/ComputePass.hpp
type crg (line 10) | namespace crg
type cp (line 12) | namespace cp
type GroupCountT (line 14) | struct GroupCountT
type ConfigT (line 20) | struct ConfigT
type ConfigT< RawTypeT > (line 241) | struct ConfigT< RawTypeT >
type DefaultValueGetterT < cp::GetGroupCountCallback > (line 263) | struct DefaultValueGetterT < cp::GetGroupCountCallback >
method get (line 265) | static cp::GetGroupCountCallback get()
type DefaultValueGetterT< cp::Config > (line 276) | struct DefaultValueGetterT< cp::Config >
method get (line 278) | static cp::Config get()
class ComputePass (line 288) | class ComputePass
FILE: include/RenderGraph/RunnablePasses/GenerateMipmaps.hpp
type crg (line 8) | namespace crg
class GenerateMipmaps (line 10) | class GenerateMipmaps
FILE: include/RenderGraph/RunnablePasses/ImageBlit.hpp
type crg (line 8) | namespace crg
class ImageBlit (line 10) | class ImageBlit
FILE: include/RenderGraph/RunnablePasses/ImageCopy.hpp
type crg (line 8) | namespace crg
class ImageCopy (line 10) | class ImageCopy
FILE: include/RenderGraph/RunnablePasses/ImageToBufferCopy.hpp
type crg (line 8) | namespace crg
class ImageToBufferCopy (line 10) | class ImageToBufferCopy
FILE: include/RenderGraph/RunnablePasses/PipelineConfig.hpp
type crg (line 11) | namespace crg
type ProgramCreator (line 13) | struct ProgramCreator
type DefaultValueGetterT< std::vector< VkPipelineShaderStageCreateInfoArray > > (line 20) | struct DefaultValueGetterT< std::vector< VkPipelineShaderStageCreateIn...
method get (line 24) | static std::vector< VkPipelineShaderStageCreateInfoArray > get()
type DefaultValueGetterT< std::vector< VkDescriptorSetLayout > > (line 31) | struct DefaultValueGetterT< std::vector< VkDescriptorSetLayout > >
method get (line 35) | static std::vector< VkDescriptorSetLayout > get()
type DefaultValueGetterT< Extent2D > (line 42) | struct DefaultValueGetterT< Extent2D >
method Extent2D (line 46) | static Extent2D get()
type DefaultValueGetterT< Offset2D > (line 53) | struct DefaultValueGetterT< Offset2D >
method Offset2D (line 57) | static Offset2D get()
type DefaultValueGetterT< ProgramCreator > (line 64) | struct DefaultValueGetterT< ProgramCreator >
method ProgramCreator (line 68) | static ProgramCreator get()
type DefaultValueGetterT< VkPipelineDepthStencilStateCreateInfo > (line 75) | struct DefaultValueGetterT< VkPipelineDepthStencilStateCreateInfo >
method VkPipelineDepthStencilStateCreateInfo (line 90) | static VkPipelineDepthStencilStateCreateInfo get()
type DefaultValueGetterT< VkPushConstantRangeArray > (line 97) | struct DefaultValueGetterT< VkPushConstantRangeArray >
method VkPushConstantRangeArray (line 101) | static VkPushConstantRangeArray get()
type DefaultValueGetterT< uint32_t const * > (line 108) | struct DefaultValueGetterT< uint32_t const * >
type DefaultValueGetterT< bool const * > (line 119) | struct DefaultValueGetterT< bool const * >
type pp (line 129) | namespace pp
type ConfigT (line 132) | struct ConfigT
method ConfigT (line 134) | ConfigT( ConfigT && )noexcept = default;
method ConfigT (line 135) | ConfigT & operator=( ConfigT && )noexcept = default;
method ConfigT (line 136) | ConfigT( ConfigT const & ) = default;
method ConfigT (line 137) | ConfigT & operator=( ConfigT const & ) = default;
method ConfigT (line 138) | explicit ConfigT( WrapperT< std::vector< VkPipelineShaderStageCrea...
type DefaultValueGetterT< pp::Config > (line 223) | struct DefaultValueGetterT< pp::Config >
method get (line 227) | static pp::Config get()
FILE: include/RenderGraph/RunnablePasses/PipelineHolder.hpp
type crg (line 8) | namespace crg
class PipelineHolder (line 10) | class PipelineHolder
method PipelineHolder (line 13) | PipelineHolder( PipelineHolder const & )noexcept = delete;
method PipelineHolder (line 14) | PipelineHolder & operator=( PipelineHolder const & )noexcept = delete;
method PipelineHolder (line 15) | PipelineHolder( PipelineHolder && )noexcept = delete;
method PipelineHolder (line 16) | PipelineHolder & operator=( PipelineHolder && )noexcept = delete;
method VkDescriptorSet (line 49) | VkDescriptorSet getDescriptorSet( uint32_t index )
method VkPipelineLayout (line 55) | VkPipelineLayout getPipelineLayout()const
method FramePass (line 60) | FramePass const & getPass()const
method GraphContext (line 65) | GraphContext & getContext()const
type DescriptorSet (line 77) | struct DescriptorSet
class PipelinePassBuilderT (line 98) | class PipelinePassBuilderT
method BuilderT (line 105) | BuilderT & program( VkPipelineShaderStageCreateInfoArray const & con...
method BuilderT (line 114) | BuilderT & programs( std::vector< VkPipelineShaderStageCreateInfoArr...
method BuilderT (line 123) | BuilderT & programCreator( ProgramCreator const & config )
class PipelinePassBuilder (line 174) | class PipelinePassBuilder
FILE: include/RenderGraph/RunnablePasses/RenderMesh.hpp
type crg (line 10) | namespace crg
class RenderMesh (line 12) | class RenderMesh
FILE: include/RenderGraph/RunnablePasses/RenderMeshConfig.hpp
type crg (line 10) | namespace crg
type PrimitiveCountT (line 12) | struct PrimitiveCountT
type VertexCountT (line 15) | struct VertexCountT
type IndexTypeT (line 18) | struct IndexTypeT
type CullModeT (line 21) | struct CullModeT
type rm (line 30) | namespace rm
type ConfigT (line 33) | struct ConfigT
type ConfigT< RawTypeT > (line 234) | struct ConfigT< RawTypeT >
type DefaultValueGetterT< GetPrimitiveCountCallback > (line 256) | struct DefaultValueGetterT< GetPrimitiveCountCallback >
method GetPrimitiveCountCallback (line 258) | static GetPrimitiveCountCallback get()
type DefaultValueGetterT< GetVertexCountCallback > (line 266) | struct DefaultValueGetterT< GetVertexCountCallback >
method GetVertexCountCallback (line 268) | static GetVertexCountCallback get()
type DefaultValueGetterT< GetIndexTypeCallback > (line 276) | struct DefaultValueGetterT< GetIndexTypeCallback >
method GetIndexTypeCallback (line 278) | static GetIndexTypeCallback get()
type DefaultValueGetterT< GetCullModeCallback > (line 286) | struct DefaultValueGetterT< GetCullModeCallback >
method GetCullModeCallback (line 288) | static GetCullModeCallback get()
FILE: include/RenderGraph/RunnablePasses/RenderMeshHolder.hpp
type crg (line 10) | namespace crg
class RenderMeshHolder (line 12) | class RenderMeshHolder
FILE: include/RenderGraph/RunnablePasses/RenderPass.hpp
type crg (line 8) | namespace crg
function makeVkArray (line 14) | inline std::vector< VkType > makeVkArray( std::vector< LibType > const...
class RenderPass (line 27) | class RenderPass
type SubpassContentsT (line 34) | struct SubpassContentsT
type Callbacks (line 37) | struct Callbacks
method VkRenderPass (line 71) | VkRenderPass getRenderPass( uint32_t passIndex )const
method VkPipelineColorBlendStateCreateInfo (line 77) | VkPipelineColorBlendStateCreateInfo doCreateBlendState()
method VkPipelineColorBlendAttachmentStateArray (line 82) | VkPipelineColorBlendAttachmentStateArray const & doGetBlendAttachs()...
method RenderPassHolder (line 87) | RenderPassHolder const & doGetHolder()const
type DefaultValueGetterT< RenderPass::GetSubpassContentsCallback > (line 103) | struct DefaultValueGetterT< RenderPass::GetSubpassContentsCallback >
method get (line 105) | static RenderPass::GetSubpassContentsCallback get()
FILE: include/RenderGraph/RunnablePasses/RenderPassHolder.hpp
type crg (line 8) | namespace crg
class RenderPassHolder (line 10) | class RenderPassHolder
type Entry (line 13) | struct Entry
method Entry (line 15) | Entry( crg::ImageViewId pview
method RenderPassHolder (line 30) | RenderPassHolder( RenderPassHolder const & )noexcept = delete;
method RenderPassHolder (line 31) | RenderPassHolder & operator=( RenderPassHolder const & )noexcept = d...
method RenderPassHolder (line 32) | RenderPassHolder( RenderPassHolder && )noexcept = delete;
method RenderPassHolder (line 33) | RenderPassHolder & operator=( RenderPassHolder && )noexcept = delete;
method VkRenderPass (line 54) | VkRenderPass getRenderPass( uint32_t index )const
method Extent2D (line 59) | Extent2D const & getRenderSize()const
method Rect2D (line 64) | Rect2D const & getRenderArea( uint32_t index )const
method VkPipelineColorBlendAttachmentStateArray (line 74) | VkPipelineColorBlendAttachmentStateArray const & getBlendAttachs()const
type PassData (line 89) | struct PassData
FILE: include/RenderGraph/RunnablePasses/RenderQuad.hpp
type crg (line 10) | namespace crg
class RenderQuad (line 12) | class RenderQuad
method VkPipelineLayout (line 33) | VkPipelineLayout getPipelineLayout()const
class RenderQuadBuilderT (line 51) | class RenderQuadBuilderT
method build (line 148) | std::unique_ptr< RenderQuad > build( FramePass const & pass
class RenderQuadBuilder (line 165) | class RenderQuadBuilder
FILE: include/RenderGraph/RunnablePasses/RenderQuadConfig.hpp
type crg (line 11) | namespace crg
type rq (line 13) | namespace rq
type ConfigT (line 16) | struct ConfigT
type ConfigT< RawTypeT > (line 205) | struct ConfigT< RawTypeT >
type DefaultValueGetterT< rq::Config > (line 224) | struct DefaultValueGetterT< rq::Config >
method get (line 226) | static rq::Config get()
FILE: include/RenderGraph/RunnablePasses/RenderQuadHolder.hpp
type crg (line 10) | namespace crg
class RenderQuadHolder (line 12) | class RenderQuadHolder
method VkPipelineVertexInputStateCreateInfo (line 44) | VkPipelineVertexInputStateCreateInfo const & getInputState()const
method VkPipelineLayout (line 49) | VkPipelineLayout getPipelineLayout()const
method isInitialised (line 54) | bool isInitialised()const
FILE: include/RenderGraph/Signal.hpp
type crg (line 16) | namespace crg
class SignalConnection (line 23) | class SignalConnection
method SignalConnection (line 26) | SignalConnection( SignalConnection< SignalT > const & ) = delete;
method SignalConnection (line 27) | SignalConnection & operator=( SignalConnection< SignalT > const & ) ...
method SignalConnection (line 29) | SignalConnection( uint32_t connection
method SignalConnection (line 42) | SignalConnection()
method SignalConnection (line 47) | SignalConnection( SignalConnection< SignalT > && rhs )noexcept
method SignalConnection (line 53) | SignalConnection( uint32_t connection, SignalT & signal )
method SignalConnection (line 59) | SignalConnection & operator=( SignalConnection< SignalT > && rhs )no...
method disconnect (line 75) | void disconnect()noexcept
method isValid (line 86) | bool isValid()const noexcept
method swap (line 92) | static void swap( SignalConnection & lhs, SignalConnection & rhs )
class Signal (line 117) | class Signal
method Signal (line 125) | Signal( Signal const & )noexcept = delete;
method Signal (line 126) | Signal & operator=( Signal const & )noexcept = delete;
method Signal (line 127) | Signal( Signal && )noexcept = delete;
method Signal (line 128) | Signal & operator=( Signal && )noexcept = delete;
method Signal (line 131) | Signal()noexcept = default;
method my_connection (line 161) | my_connection connect( Function function )
method disconnect (line 210) | void disconnect( uint32_t index )noexcept
method addConnection (line 225) | void addConnection( my_connection & connection )
method remConnection (line 236) | void remConnection( my_connection & connection )noexcept
method adjustSlots (line 251) | void adjustSlots( size_t & size
FILE: include/RenderGraph/WriteDescriptorSet.hpp
type crg (line 9) | namespace crg
type WriteDescriptorSet (line 11) | struct WriteDescriptorSet
method WriteDescriptorSet (line 13) | WriteDescriptorSet( uint32_t dstBinding
method WriteDescriptorSet (line 22) | WriteDescriptorSet( uint32_t dstBinding
method WriteDescriptorSet (line 32) | WriteDescriptorSet( uint32_t dstBinding
method WriteDescriptorSet (line 42) | WriteDescriptorSet( VkDescriptorSet set
method update (line 55) | void update( VkDescriptorSet descriptorSet )const noexcept
method VkWriteDescriptorSet (line 71) | VkWriteDescriptorSet const * operator->()const noexcept
method VkWriteDescriptorSet (line 76) | VkWriteDescriptorSet * operator->()noexcept
FILE: source/RenderGraph/Attachment.cpp
type crg (line 16) | namespace crg
function BufferViewId (line 38) | BufferViewId BufferAttachment::buffer( uint32_t index )const
function AccessFlags (line 45) | AccessFlags BufferAttachment::getAccessMask( bool isInput
function PipelineStageFlags (line 86) | PipelineStageFlags BufferAttachment::getPipelineStageFlags( bool isCom...
function ImageViewId (line 152) | ImageViewId ImageAttachment::view( uint32_t index )const
function ImageLayout (line 159) | ImageLayout ImageAttachment::getImageLayout( bool separateDepthStencil...
function AccessFlags (line 231) | AccessFlags ImageAttachment::getAccessMask( bool isInput
function PipelineStageFlags (line 276) | PipelineStageFlags ImageAttachment::getPipelineStageFlags( bool isComp...
function Attachment (line 322) | Attachment & Attachment::operator=( Attachment const & rhs )
function ImageViewId (line 459) | ImageViewId Attachment::view( uint32_t index )const
function BufferViewId (line 466) | BufferViewId Attachment::buffer( uint32_t index )const
function ImageLayout (line 473) | ImageLayout Attachment::getImageLayout( bool separateDepthStencilLayou...
function AccessFlags (line 481) | AccessFlags Attachment::getAccessMask()const
function PipelineStageFlags (line 493) | PipelineStageFlags Attachment::getPipelineStageFlags( bool isCompute )...
function Attachment (line 503) | Attachment const * Attachment::getSource( uint32_t index )const
FILE: source/RenderGraph/AttachmentTransition.cpp
type crg (line 12) | namespace crg
type attTran (line 14) | namespace attTran
function mergeIdenticalTransitionsT (line 17) | std::vector< TransitionT > mergeIdenticalTransitionsT( std::vector< ...
function AttachmentTransitions (line 34) | AttachmentTransitions mergeIdenticalTransitions( AttachmentTransitions...
FILE: source/RenderGraph/BuilderCommon.hpp
type crg::builder (line 11) | namespace crg::builder
function filter (line 16) | void filter( std::vector< TypeT > const & inputs
function filter (line 35) | void filter( std::vector< TypeT > & inputs
FILE: source/RenderGraph/DotExport.cpp
type crg::dot (line 23) | namespace crg::dot
type dotexp (line 25) | namespace dotexp
type BasicIndentBuffer (line 28) | struct BasicIndentBuffer
method BasicIndentBuffer (line 37) | BasicIndentBuffer( const BasicIndentBuffer< char_type, fill_char, ...
method BasicIndentBuffer (line 41) | explicit BasicIndentBuffer( std::basic_streambuf< char_type, trait...
method indent (line 47) | int indent() const
method indent (line 52) | void indent( long i )
method int_type (line 64) | int_type overflow( int_type c = traits::eof() )override
class BasicIndentBufferManager (line 97) | class BasicIndentBufferManager
method BasicIndentBufferManager (line 108) | BasicIndentBufferManager()
method BasicIndentBufferManager (line 113) | BasicIndentBufferManager( BasicIndentBufferManager< char_type, tra...
method insert (line 134) | bool insert( bos & o_s, bsb * b_s )
method size (line 140) | size_t size()
method bsb (line 146) | bsb * getBuffer( std::ios_base & io_s )
method erase (line 160) | bool erase( std::ios_base & io_s )
method instances (line 167) | static size_t instances()
function getIndent (line 195) | inline long getIndent( std::ios_base & ios )
function addIndent (line 200) | inline void addIndent( std::ios_base & ios, long val )
function BufferType (line 206) | inline BufferType * installIndentBuffer( std::basic_ostream< CharTyp...
function callback (line 215) | inline void callback( std::ios_base::event ev, std::ios_base & ios, ...
type Indent (line 224) | struct Indent
method Indent (line 226) | explicit Indent( long i )
type FramePassGroupStreams (line 256) | struct FramePassGroupStreams
method FramePassGroupStreams (line 260) | explicit FramePassGroupStreams( Config const & config
method emplace (line 269) | std::pair< FramePassGroupStreams *, bool > emplace( FramePassGroup...
method FramePassGroupStreams (line 291) | FramePassGroupStreams * find( FramePassGroup const * group )
method doWriteSplitted (line 311) | void doWriteSplitted( DisplayResult & streams )const
method doWriteUnsplittedWithGroups (line 325) | void doWriteUnsplittedWithGroups( DisplayResult & streams
method doWriteUnsplitted (line 374) | void doWriteUnsplitted( DisplayResult & streams
method write (line 398) | void write( DisplayResult & streams
method FramePassGroupStreams (line 420) | FramePassGroupStreams * getParent()const
method getLevel (line 425) | uint32_t getLevel()const
function displayNode (line 448) | static void displayNode( std::ostream & stream
function FramePassGroupStreams (line 472) | static FramePassGroupStreams & displayGroupNode( FramePassGroup cons...
method FramePassGroupStreams (line 260) | explicit FramePassGroupStreams( Config const & config
method emplace (line 269) | std::pair< FramePassGroupStreams *, bool > emplace( FramePassGroup...
method FramePassGroupStreams (line 291) | FramePassGroupStreams * find( FramePassGroup const * group )
method doWriteSplitted (line 311) | void doWriteSplitted( DisplayResult & streams )const
method doWriteUnsplittedWithGroups (line 325) | void doWriteUnsplittedWithGroups( DisplayResult & streams
method doWriteUnsplitted (line 374) | void doWriteUnsplitted( DisplayResult & streams
method write (line 398) | void write( DisplayResult & streams
method FramePassGroupStreams (line 420) | FramePassGroupStreams * getParent()const
method getLevel (line 425) | uint32_t getLevel()const
function FramePassGroupStreams (line 479) | static FramePassGroupStreams & displayPassNode( uint32_t id
method FramePassGroupStreams (line 260) | explicit FramePassGroupStreams( Config const & config
method emplace (line 269) | std::pair< FramePassGroupStreams *, bool > emplace( FramePassGroup...
method FramePassGroupStreams (line 291) | FramePassGroupStreams * find( FramePassGroup const * group )
method doWriteSplitted (line 311) | void doWriteSplitted( DisplayResult & streams )const
method doWriteUnsplittedWithGroups (line 325) | void doWriteUnsplittedWithGroups( DisplayResult & streams
method doWriteUnsplitted (line 374) | void doWriteUnsplitted( DisplayResult & streams
method write (line 398) | void write( DisplayResult & streams
method FramePassGroupStreams (line 420) | FramePassGroupStreams * getParent()const
method getLevel (line 425) | uint32_t getLevel()const
function displayEdge (line 513) | static void displayEdge( std::ostream & stream
function displayAttachPass (line 532) | static void displayAttachPass( Attachment const & attach
function isIn (line 562) | static bool isIn( FramePassGroupStreams const * inner
function FramePassGroupStreams (line 569) | static FramePassGroupStreams * getCommonGroup( FramePassGroupStreams...
method FramePassGroupStreams (line 260) | explicit FramePassGroupStreams( Config const & config
method emplace (line 269) | std::pair< FramePassGroupStreams *, bool > emplace( FramePassGroup...
method FramePassGroupStreams (line 291) | FramePassGroupStreams * find( FramePassGroup const * group )
method doWriteSplitted (line 311) | void doWriteSplitted( DisplayResult & streams )const
method doWriteUnsplittedWithGroups (line 325) | void doWriteUnsplittedWithGroups( DisplayResult & streams
method doWriteUnsplitted (line 374) | void doWriteUnsplitted( DisplayResult & streams
method write (line 398) | void write( DisplayResult & streams
method FramePassGroupStreams (line 420) | FramePassGroupStreams * getParent()const
method getLevel (line 425) | uint32_t getLevel()const
function displayTransitionEdge (line 583) | static void displayTransitionEdge( std::ostream & stream
class DotTransitionsVisitor (line 632) | class DotTransitionsVisitor
method submit (line 636) | static void submit( DisplayResult & streams
method submit (line 648) | static void submit( DisplayResult & streams
method DotTransitionsVisitor (line 659) | DotTransitionsVisitor( DisplayResult & streams
method submit (line 672) | void submit( ConstGraphAdjacentNode node )
method visitRootNode (line 682) | void visitRootNode( RootNode const * node )override
method visitFramePassNode (line 695) | void visitFramePassNode( FramePassNode const * node )override
function applyRemove (line 738) | static std::string applyRemove( std::string const & text, Config con...
function DisplayResult (line 753) | DisplayResult displayTransitions( RunnableGraph const & value
function displayTransitions (line 761) | void displayTransitions( std::ostream & stream
FILE: source/RenderGraph/FrameGraph.cpp
type crg (line 18) | namespace crg
type fgph (line 20) | namespace fgph
function mergeViewData (line 22) | static void mergeViewData( ImageViewId const & view
function mergeViewData (line 74) | static void mergeViewData( BufferViewId const & view
function makeHash (line 98) | static size_t makeHash( AttachmentArray const & attachments
function AttachmentPtr (line 109) | static AttachmentPtr mergeAttachments( FrameGraph & graph
function AttachmentPtr (line 139) | static AttachmentPtr mergeAttachments( FrameGraph & graph
function FramePass (line 177) | FramePass & FrameGraph::createPass( std::string const & name
function FramePassGroup (line 183) | FramePassGroup & FrameGraph::createPassGroup( std::string const & grou...
function BufferId (line 188) | BufferId FrameGraph::createBuffer( BufferData const & img )
function BufferViewId (line 195) | BufferViewId FrameGraph::createView( BufferViewData const & view )
function ImageId (line 202) | ImageId FrameGraph::createImage( ImageData const & img )
function ImageViewId (line 209) | ImageViewId FrameGraph::createView( ImageViewData const & view )
function ImageViewId (line 216) | ImageViewId FrameGraph::mergeViews( ImageViewIdArray const & views
function BufferViewId (line 253) | BufferViewId FrameGraph::mergeViews( BufferViewIdArray const & views )
function Attachment (line 261) | Attachment const * FrameGraph::mergeAttachments( AttachmentArray const...
function RunnableGraphPtr (line 349) | RunnableGraphPtr FrameGraph::compile( GraphContext & context )
function LayoutState (line 370) | LayoutState FrameGraph::getFinalLayoutState( ImageId image
function LayoutState (line 377) | LayoutState FrameGraph::getFinalLayoutState( ImageViewId view
function AccessState (line 390) | AccessState const & FrameGraph::getFinalAccessState( BufferId buffer
function AccessState (line 396) | AccessState const & FrameGraph::getFinalAccessState( BufferViewId view
function LayoutState (line 428) | LayoutState FrameGraph::getInputLayoutState( ImageId image
function LayoutState (line 437) | LayoutState FrameGraph::getInputLayoutState( ImageViewId view )const
function LayoutState (line 464) | LayoutState FrameGraph::getOutputLayoutState( ImageId image
function LayoutState (line 473) | LayoutState FrameGraph::getOutputLayoutState( ImageViewId view )const
function LayerLayoutStatesMap (line 480) | LayerLayoutStatesMap const & FrameGraph::getOutputLayoutStates()const
FILE: source/RenderGraph/FrameGraphPrerequisites.cpp
type crg (line 9) | namespace crg
type fgph (line 11) | namespace fgph
function match (line 13) | static bool match( ImageSubresourceRange const & lhsRange
function match (line 23) | static bool match( ImageId const & image
function match (line 33) | static bool match( ImageId const & image
function match (line 44) | static bool match( ImageViewData const & lhs, ImageViewData const & ...
function getName (line 53) | std::string_view getName( PixelFormat format )
function getName (line 432) | std::string_view getName( FilterMode v )
function getName (line 441) | std::string_view getName( MipmapMode v )
function getName (line 450) | std::string_view getName( WrapMode v )
function ImageCreateFlags (line 469) | ImageCreateFlags getImageCreateFlags( ImageId const & image )noexcept
function ImageCreateFlags (line 474) | ImageCreateFlags getImageCreateFlags( ImageViewId const & image )noexcept
function Extent3D (line 479) | Extent3D const & getExtent( ImageId const & image )noexcept
function Extent3D (line 484) | Extent3D const & getExtent( ImageViewId const & image )noexcept
function DeviceSize (line 489) | DeviceSize getSize( BufferId const & buffer )noexcept
function DeviceSize (line 494) | DeviceSize getSize( BufferViewId const & buffer )noexcept
function Extent3D (line 499) | Extent3D getMipExtent( ImageViewId const & image )noexcept
function PixelFormat (line 508) | PixelFormat getFormat( ImageId const & image )noexcept
function PixelFormat (line 513) | PixelFormat getFormat( ImageViewId const & image )noexcept
function ImageType (line 518) | ImageType getImageType( ImageId const & image )noexcept
function ImageType (line 523) | ImageType getImageType( ImageViewId const & image )noexcept
function ImageViewType (line 528) | ImageViewType getImageViewType( ImageViewId const & image )noexcept
function getMipLevels (line 533) | uint32_t getMipLevels( ImageId const & image )noexcept
function getMipLevels (line 538) | uint32_t getMipLevels( ImageViewId const & image )noexcept
function getArrayLayers (line 543) | uint32_t getArrayLayers( ImageId const & image )noexcept
function getArrayLayers (line 548) | uint32_t getArrayLayers( ImageViewId const & image )noexcept
function ImageAspectFlags (line 553) | ImageAspectFlags getAspectFlags( ImageViewId const & image )noexcept
function ImageSubresourceRange (line 558) | ImageSubresourceRange const & getSubresourceRange( ImageViewId const &...
function BufferSubresourceRange (line 563) | BufferSubresourceRange const & getSubresourceRange( BufferViewId const...
function AccessFlags (line 568) | AccessFlags getAccessMask( ImageLayout layout )noexcept
function PipelineState (line 618) | PipelineState getPipelineState( PipelineStageFlags flags )noexcept
function LayoutState (line 662) | LayoutState makeLayoutState( ImageLayout layout )noexcept
function PipelineStageFlags (line 669) | PipelineStageFlags getStageMask( ImageLayout layout )noexcept
function ImageAspectFlags (line 716) | ImageAspectFlags getAspectMask( PixelFormat format )noexcept
function LayoutState (line 727) | LayoutState const & addSubresourceRangeLayout( LayerLayoutStates & ranges
function gatherSubresourceRangeLayoutMips (line 744) | static void gatherSubresourceRangeLayoutMips( ImageSubresourceRange co...
function LayoutState (line 767) | LayoutState getSubresourceRangeLayout( LayerLayoutStates const & ranges
function ImageSubresourceRange (line 792) | ImageSubresourceRange getVirtualRange( ImageId const & image
function match (line 809) | bool match( ImageViewId const & lhs, ImageViewId const & rhs )noexcept
function match (line 814) | bool match( BufferViewId const & lhs, BufferViewId const & rhs )noexcept
function ImageViewId (line 819) | ImageViewId const & resolveView( ImageViewId const & view
function BufferViewId (line 827) | BufferViewId const & resolveView( BufferViewId const & view
function ClearColorValue (line 835) | ClearColorValue getClearColorValue( ClearValue const & v )
function ClearDepthStencilValue (line 843) | ClearDepthStencilValue getClearDepthStencilValue( ClearValue const & v )
FILE: source/RenderGraph/FramePass.cpp
type crg (line 12) | namespace crg
type fpass (line 17) | namespace fpass
function adjustName (line 19) | static std::string adjustName( FramePass const & pass
function Attachment (line 47) | Attachment const * FramePass::getParentAttachment( Attachment const & ...
function Attachment (line 178) | Attachment const * FramePass::addInOutStorage( Attachment const & atta...
function Attachment (line 213) | Attachment const * FramePass::addOutputStorageBuffer( BufferViewIdArra...
function Attachment (line 227) | Attachment const * FramePass::addClearableOutputStorageBuffer( BufferV...
function Attachment (line 241) | Attachment const * FramePass::addOutputStorageImage( ImageViewIdArray ...
function Attachment (line 259) | Attachment const * FramePass::addClearableOutputStorageImage( ImageVie...
function Attachment (line 336) | Attachment const * FramePass::addInOutTransfer( Attachment const & att...
function Attachment (line 371) | Attachment const * FramePass::addOutputTransferBuffer( BufferViewIdArr...
function Attachment (line 384) | Attachment const * FramePass::addOutputTransferImage( ImageViewIdArray...
function Attachment (line 529) | Attachment const * FramePass::addInOutColourTarget( Attachment const &...
function Attachment (line 547) | Attachment const * FramePass::addInOutDepthTarget( Attachment const & ...
function Attachment (line 564) | Attachment const * FramePass::addInOutStencilTarget( Attachment const ...
function Attachment (line 581) | Attachment const * FramePass::addInOutDepthStencilTarget( Attachment c...
function Attachment (line 598) | Attachment const * FramePass::addOutputColourTarget( ImageViewIdArray ...
function Attachment (line 616) | Attachment const * FramePass::addOutputDepthTarget( ImageViewIdArray v...
function Attachment (line 634) | Attachment const * FramePass::addOutputStencilTarget( ImageViewIdArray...
function Attachment (line 652) | Attachment const * FramePass::addOutputDepthStencilTarget( ImageViewId...
function RunnablePassPtr (line 700) | RunnablePassPtr FramePass::createRunnable( GraphContext & context
function Attachment (line 716) | Attachment const * FramePass::addOwnAttach( ImageViewIdArray views, st...
function Attachment (line 802) | Attachment const * FramePass::addOwnAttach( BufferViewIdArray views, s...
function Attachment (line 874) | Attachment * FramePass::addOwnAttach( Attachment * mine
FILE: source/RenderGraph/FramePassGroup.cpp
type crg (line 14) | namespace crg
type group (line 16) | namespace group
function FramePassGroup (line 18) | static FramePassGroup const * getOutermost( FramePassGroup const * g...
function countPasses (line 25) | static uint32_t countPasses( FramePassGroup const * group )
function countGroups (line 36) | static uint32_t countGroups( FramePassGroup const * group )
function FramePass (line 69) | FramePass & FramePassGroup::createPass( std::string const & passName
function FramePassGroup (line 87) | FramePassGroup & FramePassGroup::createPassGroup( std::string const & ...
function LayoutState (line 139) | LayoutState FramePassGroup::getFinalLayoutState( ImageViewId view
function BufferId (line 145) | BufferId FramePassGroup::createBuffer( BufferData const & img )const
function BufferViewId (line 150) | BufferViewId FramePassGroup::createView( BufferViewData const & view )...
function ImageId (line 155) | ImageId FramePassGroup::createImage( ImageData const & img )const
function ImageViewId (line 160) | ImageViewId FramePassGroup::createView( ImageViewData const & view )const
function ImageViewId (line 212) | ImageViewId FramePassGroup::mergeViews( ImageViewIdArray const & views
function BufferViewId (line 221) | BufferViewId FramePassGroup::mergeViews( BufferViewIdArray const & vie...
function Attachment (line 226) | Attachment const * FramePassGroup::mergeAttachments( AttachmentArray c...
FILE: source/RenderGraph/FramePassTimer.cpp
type crg (line 7) | namespace crg
function FramePassTimerBlock (line 82) | FramePassTimerBlock FramePassTimer::start()
FILE: source/RenderGraph/GraphBuilder.cpp
type crg::builder (line 13) | namespace crg::builder
type endpoints (line 17) | namespace endpoints
function addAttach (line 19) | static void addAttach( Attachment const & attach
function listAllAttachs (line 28) | static void listAllAttachs( FramePassArray const & passes
function listBuffersRec (line 43) | static void listBuffersRec( Attachment const & attach
function BufferViewIdArray (line 55) | static BufferViewIdArray listBuffers( Attachment const & attach
function listImagesRec (line 63) | static void listImagesRec( Attachment const & attach
function ImageViewIdArray (line 75) | static ImageViewIdArray listImages( Attachment const & attach
function isBufferAttachParent (line 83) | static bool isBufferAttachParent( Attachment const & parent, Attachm...
function isImageAttachParent (line 94) | static bool isImageAttachParent( Attachment const & parent, Attachme...
function isAttachParent (line 105) | static bool isAttachParent( Attachment const * parent, Attachment co...
function isParentAttachForPass (line 120) | static bool isParentAttachForPass( Attachment const * attach, FrameP...
function listNonParentAttachs (line 129) | static void listNonParentAttachs( FramePassArray const & passes
function hasOutput (line 147) | static bool hasOutput( FramePass const & pass )
function addPassInputs (line 160) | static void addPassInputs( FramePass const & pass
function addSinkPassInputs (line 174) | static void addSinkPassInputs( FramePassArray const & passes
function AttachmentArray (line 184) | static AttachmentArray listPassOutputs( FramePass const & pass )
function areAllPassAttachsListed (line 197) | static bool areAllPassAttachsListed( FramePass const & pass
function removeMismatchs (line 209) | static void removeMismatchs( AttachmentArray & result )
type graph (line 225) | namespace graph
type AttachmentStates (line 227) | struct AttachmentStates
function FramePassArray (line 234) | static FramePassArray listAttachmentPasses( Attachment const & attach )
function AttachmentArray (line 245) | static AttachmentArray splitImage( Attachment const & attach )
function AttachmentArray (line 251) | static AttachmentArray splitBuffer( Attachment const & attach )
function AttachmentArray (line 257) | static AttachmentArray splitAttach( Attachment const & attach )
function isInRange (line 276) | static bool isInRange( UIntT value
function areIntersecting (line 283) | static bool areIntersecting( UIntT lhsOffset, UIntT lhsCount
function areIntersecting (line 290) | static bool areIntersecting( ImageSubresourceRange const & lhs
function areIntersecting (line 297) | static bool areIntersecting( BufferSubresourceRange const & lhs
function areOverlapping (line 304) | static bool areOverlapping( ImageViewData const & lhs
function areOverlapping (line 312) | static bool areOverlapping( BufferViewData const & lhs
function areOverlapping (line 320) | static bool areOverlapping( Attachment const & lhs
function traversePassAttach (line 334) | static void traversePassAttach( FramePassNode & node, std::map< uint...
function traversePassAttach (line 344) | static void traversePassAttach( FramePassNode & node, std::map< uint...
function traversePassAttach (line 354) | static void traversePassAttach( FramePassNode & node, AttachmentArra...
function insertTransition (line 367) | static void insertTransition( bool isImage
function traverseAttachmentPasses (line 392) | void traverseAttachmentPasses( GraphNode & parent
function hasInPredecessors (line 456) | static bool hasInPredecessors( GraphNode & parent, GraphNode & child )
function removeShortcuts (line 463) | static void removeShortcuts( GraphNode & node )
function sortNodes (line 488) | static void sortNodes( GraphNode & node
function sortNodes (line 507) | static void sortNodes( RootNode & root
function updateState (line 516) | static void updateState( Attachment const & inputAttach
function updateState (line 526) | static void updateState( Attachment const & inputAttach
function insertNeededTransition (line 535) | static void insertNeededTransition( Attachment const & output
function isInNeededState (line 552) | static bool isInNeededState( Attachment const & inputAttach
function isInNeededState (line 564) | static bool isInNeededState( Attachment const & inputAttach
function isInNeededState (line 575) | static bool isInNeededState( Attachment const & inputAttach
function buildTransitions (line 583) | static void buildTransitions( GraphNodePtrArray const & graph
function AttachmentArray (line 610) | AttachmentArray findEndPoints( FramePassArray const & passes )
function buildGraph (line 631) | void buildGraph( AttachmentArray const & endPoints
FILE: source/RenderGraph/GraphBuilder.hpp
type crg::builder (line 7) | namespace crg::builder
FILE: source/RenderGraph/GraphContext.cpp
type crg (line 19) | namespace crg
function checkVkResult (line 395) | void checkVkResult( VkResult result, char const * const stepName )
function checkVkResult (line 404) | void checkVkResult( VkResult result, std::string const & stepName )
FILE: source/RenderGraph/GraphNode.cpp
type crg (line 11) | namespace crg
function FramePass (line 77) | FramePass const * getFramePass( GraphNode const & node )
FILE: source/RenderGraph/LayerLayoutStatesHandler.cpp
type crg (line 11) | namespace crg
function LayoutState (line 51) | LayoutState LayerLayoutStatesHandler::getLayoutState( ImageId image
function LayoutState (line 67) | LayoutState LayerLayoutStatesHandler::getLayoutState( ImageViewId view...
FILE: source/RenderGraph/Log.cpp
type crg (line 10) | namespace crg
type log (line 12) | namespace log
function doLog (line 16) | static void doLog( std::string_view message
function Logger (line 103) | Logger & Logger::doGetInstance()noexcept
FILE: source/RenderGraph/RecordContext.cpp
type crg (line 21) | namespace crg
type recctx (line 25) | namespace recctx
function ImageSubresourceRange (line 27) | static ImageSubresourceRange adaptRange( GraphContext const & context
function LayoutState (line 97) | LayoutState RecordContext::getLayoutState( ImageViewId view )const
function LayoutState (line 113) | LayoutState RecordContext::getLayoutState( ImageId image
function LayoutState (line 122) | LayoutState RecordContext::getNextLayoutState( ImageViewId view )const
function LayoutState (line 127) | LayoutState RecordContext::getNextLayoutState( ImageId image
function AccessState (line 214) | AccessState RecordContext::getAccessState( BufferViewId buffer )const
function AccessState (line 226) | AccessState const & RecordContext::getAccessState( BufferId buffer
function GraphContext (line 451) | GraphContext & RecordContext::getContext()const
function ContextResourcesCache (line 456) | ContextResourcesCache & RecordContext::getResources()const
FILE: source/RenderGraph/ResourceHandler.cpp
type crg (line 23) | namespace crg
type reshdl (line 29) | namespace reshdl
type Quad (line 31) | struct Quad
type Vertex (line 34) | struct Vertex
function VkBufferCreateInfo (line 41) | static VkBufferCreateInfo convert( BufferData const & data )
function VkBufferViewCreateInfo (line 46) | static VkBufferViewCreateInfo convert( BufferViewData const & data
function VkImageCreateInfo (line 54) | static VkImageCreateInfo convert( ImageData const & data )
function VkImageViewCreateInfo (line 59) | static VkImageViewCreateInfo convert( ImageViewData const & data
function makeHash (line 67) | static size_t makeHash( SamplerDesc const & samplerDesc )
function makeHash (line 81) | static size_t makeHash( bool texCoords
function BufferId (line 131) | BufferId ResourceHandler::createBufferId( BufferData const & img )
function BufferViewId (line 140) | BufferViewId ResourceHandler::createViewId( BufferViewData const & view )
function ImageId (line 256) | ImageId ResourceHandler::createImageId( ImageData const & img )
function ImageViewId (line 265) | ImageViewId ResourceHandler::createViewId( ImageViewData const & view )
function VkSampler (line 381) | VkSampler ResourceHandler::createSampler( GraphContext & context
function VertexBuffer (line 421) | VertexBuffer const * ResourceHandler::createQuadTriVertexBuffer( Graph...
function VkBuffer (line 662) | VkBuffer ContextResourcesCache::createBuffer( BufferId const & buffer )
function VkBuffer (line 668) | VkBuffer ContextResourcesCache::createBuffer( BufferId const & buffer,...
function VkBufferView (line 681) | VkBufferView ContextResourcesCache::createBufferView( BufferViewId con...
function VkImage (line 719) | VkImage ContextResourcesCache::createImage( ImageId const & image )
function VkImage (line 725) | VkImage ContextResourcesCache::createImage( ImageId const & image, VkD...
function VkImageView (line 738) | VkImageView ContextResourcesCache::createImageView( ImageViewId const ...
function VkSampler (line 776) | VkSampler ContextResourcesCache::createSampler( SamplerDesc const & sa...
function VertexBuffer (line 791) | VertexBuffer const & ContextResourcesCache::createQuadTriVertexBuffer(...
function VkBuffer (line 815) | VkBuffer ResourcesCache::createBuffer( GraphContext & context
function VkBuffer (line 823) | VkBuffer ResourcesCache::createBuffer( GraphContext & context
function VkBufferView (line 830) | VkBufferView ResourcesCache::createBufferView( GraphContext & context
function VkImage (line 873) | VkImage ResourcesCache::createImage( GraphContext & context
function VkImage (line 881) | VkImage ResourcesCache::createImage( GraphContext & context
function VkImageView (line 888) | VkImageView ResourcesCache::createImageView( GraphContext & context
function VkSampler (line 931) | VkSampler ResourcesCache::createSampler( GraphContext & context
function VertexBuffer (line 938) | VertexBuffer const & ResourcesCache::createQuadTriVertexBuffer( GraphC...
function ContextResourcesCache (line 946) | ContextResourcesCache & ResourcesCache::getContextCache( GraphContext ...
FILE: source/RenderGraph/RunnableGraph.cpp
type crg (line 22) | namespace crg
type rungrf (line 26) | namespace rungrf
function VkCommandPool (line 28) | static VkCommandPool createCommandPool( GraphContext & context
function mergeMipRanges (line 50) | static void mergeMipRanges( LayerLayoutStates const & nextLayout
function LayerLayoutStates (line 69) | static LayerLayoutStates mergeRanges( LayerLayoutStatesMap const & n...
function LayerLayoutStatesMap (line 86) | static LayerLayoutStatesMap gatherNextImageLayouts( LayerLayoutState...
function PipelineState (line 121) | static PipelineState getNextState( PipelineState currentState
function VkDescriptorType (line 136) | static VkDescriptorType getDescriptorType( BufferAttachment const & ...
function VkDescriptorType (line 147) | static VkDescriptorType getDescriptorType( ImageAttachment const & a...
function WriteDescriptorSet (line 154) | static WriteDescriptorSet getWrite( ImageAttachment const & attach
function WriteDescriptorSet (line 178) | static WriteDescriptorSet getWrite( BufferAttachment const & attach
function VkQueryPool (line 209) | VkQueryPool createQueryPool( GraphContext & context
function SemaphoreWaitArray (line 417) | SemaphoreWaitArray RunnableGraph::run( VkQueue queue )
function SemaphoreWaitArray (line 423) | SemaphoreWaitArray RunnableGraph::run( SemaphoreWait toWait
function SemaphoreWaitArray (line 432) | SemaphoreWaitArray RunnableGraph::run( SemaphoreWaitArray const & toWait
function VkBuffer (line 465) | VkBuffer RunnableGraph::createBuffer( BufferId const & buffer )
function VkBufferView (line 470) | VkBufferView RunnableGraph::createBufferView( BufferViewId const & view )
function VkImage (line 475) | VkImage RunnableGraph::createImage( ImageId const & image )
function VkImageView (line 480) | VkImageView RunnableGraph::createImageView( ImageViewId const & view )
function VkSampler (line 485) | VkSampler RunnableGraph::createSampler( SamplerDesc const & samplerDesc )
function VertexBuffer (line 490) | VertexBuffer const & RunnableGraph::createQuadTriVertexBuffer( bool te...
function LayoutState (line 497) | LayoutState RunnableGraph::getCurrentLayoutState( RecordContext & context
function LayoutState (line 529) | LayoutState RunnableGraph::getCurrentLayoutState( RecordContext & context
function LayoutState (line 538) | LayoutState RunnableGraph::getNextLayoutState( RecordContext const & c...
function LayoutState (line 559) | LayoutState RunnableGraph::getOutputLayoutState( ImageViewId view )const
function VkDescriptorType (line 564) | VkDescriptorType RunnableGraph::getDescriptorType( Attachment const & ...
function WriteDescriptorSet (line 571) | WriteDescriptorSet RunnableGraph::getDescriptorWrite( Attachment const...
function WriteDescriptorSet (line 578) | WriteDescriptorSet RunnableGraph::getDescriptorWrite( Attachment const...
FILE: source/RenderGraph/RunnablePass.cpp
type crg (line 18) | namespace crg
type details (line 20) | namespace details
function DeviceSize (line 22) | static constexpr DeviceSize getAlignedSize( DeviceSize size, DeviceS...
function registerImage (line 30) | static void registerImage( Attachment const & attach
function registerBuffer (line 58) | static void registerBuffer( Attachment const & attach
function registerResources (line 70) | static void registerResources( FramePass const & pass
function prepareImage (line 100) | static void prepareImage( VkCommandBuffer commandBuffer
function prepareBuffer (line 160) | static void prepareBuffer( VkCommandBuffer commandBuffer
function prepareResources (line 203) | static void prepareResources( VkCommandBuffer commandBuffer
function checkUndefinedInput (line 237) | void checkUndefinedInput( std::string const & stepName
function convert (line 249) | void convert( SemaphoreWaitArray const & toWait
function VkResult (line 388) | VkResult Fence::wait( uint64_t timeout )
function VkCommandBuffer (line 615) | VkCommandBuffer RunnablePass::doCreateCommandBuffer( std::string const...
FILE: source/RenderGraph/RunnablePasses/BufferCopy.cpp
type crg (line 12) | namespace crg
FILE: source/RenderGraph/RunnablePasses/BufferToImageCopy.cpp
type crg (line 12) | namespace crg
FILE: source/RenderGraph/RunnablePasses/ComputePass.cpp
type crg (line 11) | namespace crg
type cppss (line 13) | namespace cppss
function isPtrEnabled (line 15) | static bool isPtrEnabled( bool const * v )
function VkPipelineLayout (line 67) | VkPipelineLayout ComputePass::getPipelineLayout()const
FILE: source/RenderGraph/RunnablePasses/GenerateMipmaps.cpp
type crg (line 11) | namespace crg
type genMips (line 13) | namespace genMips
function T (line 16) | static constexpr T getSubresourceDimension( T const & extent
FILE: source/RenderGraph/RunnablePasses/ImageBlit.cpp
type crg (line 12) | namespace crg
FILE: source/RenderGraph/RunnablePasses/ImageCopy.cpp
type crg (line 12) | namespace crg
FILE: source/RenderGraph/RunnablePasses/ImageToBufferCopy.cpp
type crg (line 12) | namespace crg
FILE: source/RenderGraph/RunnablePasses/PipelineHolder.cpp
type crg (line 12) | namespace crg
type pphdr (line 14) | namespace pphdr
function isDescriptor (line 16) | static bool isDescriptor( Attachment const & attach )
function createDescriptorWrites (line 23) | static void createDescriptorWrites( std::map< uint32_t, FramePass::S...
function createDescriptorWrites (line 32) | static void createDescriptorWrites( std::map< uint32_t, Attachment c...
function createDescriptorBindings (line 44) | static void createDescriptorBindings( std::map< uint32_t, FramePass:...
function createDescriptorBindings (line 57) | static void createDescriptorBindings( std::map< uint32_t, Attachment...
function VkPipelineShaderStageCreateInfoArray (line 170) | VkPipelineShaderStageCreateInfoArray const & PipelineHolder::getProgra...
function VkPipeline (line 187) | VkPipeline & PipelineHolder::getPipeline( uint32_t index )
FILE: source/RenderGraph/RunnablePasses/RenderMesh.cpp
type crg (line 7) | namespace crg
FILE: source/RenderGraph/RunnablePasses/RenderMeshHolder.cpp
type crg (line 7) | namespace crg
function Extent2D (line 182) | Extent2D RenderMeshHolder::getRenderSize()const
function VkPipelineViewportStateCreateInfo (line 230) | VkPipelineViewportStateCreateInfo RenderMeshHolder::doCreateViewportSt...
FILE: source/RenderGraph/RunnablePasses/RenderPass.cpp
type crg (line 12) | namespace crg
function VkDescriptorPoolSizeArray (line 16) | VkDescriptorPoolSizeArray getBindingsSizes( VkDescriptorSetLayoutBindi...
FILE: source/RenderGraph/RunnablePasses/RenderPassHolder.cpp
type crg (line 13) | namespace crg
type rpHolder (line 17) | namespace rpHolder
function VkAttachmentReference (line 19) | static VkAttachmentReference addAttach( RecordContext & context
function VkAttachmentReference (line 60) | static VkAttachmentReference addAttach( RecordContext & context
function checkAttaches (line 90) | static bool checkAttaches( RecordContext const & context
function VkRenderPassBeginInfo (line 180) | VkRenderPassBeginInfo RenderPassHolder::getBeginInfo( uint32_t index )...
function VkPipelineColorBlendStateCreateInfo (line 320) | VkPipelineColorBlendStateCreateInfo RenderPassHolder::createBlendState()
function VkFramebuffer (line 332) | VkFramebuffer RenderPassHolder::getFramebuffer( uint32_t index )const
function VkFramebuffer (line 360) | VkFramebuffer RenderPassHolder::doCreateFramebuffer( uint32_t passInde...
FILE: source/RenderGraph/RunnablePasses/RenderQuad.cpp
type crg (line 7) | namespace crg
FILE: source/RenderGraph/RunnablePasses/RenderQuadHolder.cpp
type crg (line 9) | namespace crg
type rdqdhdr (line 11) | namespace rdqdhdr
function isPtrEnabled (line 13) | static bool isPtrEnabled( bool const * v )
function VkPipelineViewportStateCreateInfo (line 203) | VkPipelineViewportStateCreateInfo RenderQuadHolder::doCreateViewportSt...
FILE: test/BaseTest.cpp
type test (line 26) | namespace test
class LogStreambuf (line 35) | class LogStreambuf
method LogStreambuf (line 45) | LogStreambuf( LogStreambuf const & ) = delete;
method LogStreambuf (line 46) | LogStreambuf & operator=( LogStreambuf const & ) = delete;
method LogStreambuf (line 47) | LogStreambuf( LogStreambuf && ) = delete;
method LogStreambuf (line 48) | LogStreambuf & operator=( LogStreambuf && ) = delete;
method LogStreambuf (line 50) | explicit LogStreambuf( std::string const & name
method int_type (line 70) | int_type overflow( int_type c = traits_type::eof() )override
method do_sync (line 93) | int do_sync()
method do_sync_no_nl (line 100) | int do_sync_no_nl()
type DebugLogStreambufTraits (line 114) | struct DebugLogStreambufTraits
method log (line 116) | static void log( std::ostream & stream
method logNoNL (line 123) | static void logNoNL( std::ostream & stream
type InfoLogStreambufTraits (line 131) | struct InfoLogStreambufTraits
method log (line 133) | static void log( std::ostream & stream
method logNoNL (line 140) | static void logNoNL( std::ostream & stream
type ErrorLogStreambufTraits (line 148) | struct ErrorLogStreambufTraits
method log (line 150) | static void log( std::ostream & stream
method logNoNL (line 157) | static void logNoNL( std::ostream & stream
function getPath (line 171) | std::string getPath( std::string_view path )
function findMissing (line 176) | std::string findMissing( StringArray const & lhsLines
function getExecutableDirectory (line 200) | std::string getExecutableDirectory()
function getExecutableDirectory (line 218) | std::string getExecutableDirectory()
function getExecutableDirectory (line 237) | std::string getExecutableDirectory()
function StringArray (line 262) | StringArray splitInLines( std::string const & value )
function testsMain (line 327) | int testsMain( int argc, char ** argv, std::string_view testSuiteName )
function sortLines (line 336) | std::string sortLines( std::string const & value )
FILE: test/BaseTest.hpp
type test (line 12) | namespace test
type TestCounts (line 16) | struct TestCounts
method TestCounts (line 18) | explicit TestCounts( std::string const & testName )
class Exception (line 29) | class Exception
class TestSuite (line 36) | class TestSuite
FILE: test/Common.cpp
type test (line 16) | namespace test
function displayTransitions (line 20) | void displayTransitions( TestCounts const & testCounts
function getViewType (line 31) | crg::ImageViewType getViewType( crg::ImageType type
function checkRunnable (line 64) | void checkRunnable( TestCounts const & testCounts
function createBuffer (line 75) | crg::BufferData createBuffer( std::string name )
function createView (line 86) | crg::BufferViewData createView( std::string name
function createView (line 96) | crg::BufferViewData createView( std::string name
function createImage (line 107) | crg::ImageData createImage( std::string name
function createImage1D (line 123) | crg::ImageData createImage1D( std::string name
function createImage3D (line 139) | crg::ImageData createImage3D( std::string name
function createImageCube (line 155) | crg::ImageData createImageCube( std::string name
function createView (line 171) | crg::ImageViewData createView( std::string name
function createView (line 187) | crg::ImageViewData createView( std::string name
function checkRunnable (line 617) | std::string checkRunnable( TestCounts const & testCounts
function display (line 625) | void display( TestCounts const & testCounts
function display (line 653) | void display( TestCounts const & testCounts
class DummyRunnable (line 662) | class DummyRunnable
method DummyRunnable (line 666) | DummyRunnable( crg::FramePass const & framePass
method DummyRunnable (line 690) | DummyRunnable( crg::FramePass const & framePass
method DummyRunnable (line 712) | DummyRunnable( crg::FramePass const & framePass
method DummyRunnable (line 732) | DummyRunnable( crg::FramePass const & framePass
method doRecordInto (line 751) | void doRecordInto( crg::RecordContext & context
method doRecordTargetsInto (line 831) | void doRecordTargetsInto( crg::RecordContext & context
class DummyRunnableNoRecord (line 849) | class DummyRunnableNoRecord
method DummyRunnableNoRecord (line 853) | DummyRunnableNoRecord( crg::FramePass const & framePass
function createDummy (line 871) | crg::RunnablePassPtr createDummy( test::TestCounts & testCounts
function createDummy (line 892) | crg::RunnablePassPtr createDummy( test::TestCounts & testCounts
function createDummy (line 911) | crg::RunnablePassPtr createDummy( test::TestCounts & testCounts
function createDummy (line 928) | crg::RunnablePassPtr createDummy( test::TestCounts & testCounts
function createDummyNoRecord (line 943) | crg::RunnablePassPtr createDummyNoRecord( crg::FramePass const & frame...
function checkDummy (line 956) | void checkDummy( [[maybe_unused]] test::TestCounts const & testCounts
function condAppendEnumFlag (line 966) | static void condAppendEnumFlag( std::ostream & stream, std::string & s...
type crg (line 976) | namespace crg
FILE: test/Common.hpp
type test (line 10) | namespace test
function checkRunnable (line 53) | inline std::string checkRunnable( TestCounts const & testCounts
function makeId (line 72) | crg::Id< TypeT > makeId( [[maybe_unused]] TypeT const & data )
type crg (line 125) | namespace crg
FILE: test/TestAttachment.cpp
type Binding (line 12) | enum class Binding
function TEST (line 19) | TEST( Attachment, SampledAttachment )
function TEST (line 60) | TEST( Attachment, SampledAttachmentT )
function TEST (line 101) | TEST( Attachment, SampledImage )
function TEST (line 137) | TEST( Attachment, SampledImageT )
function TEST (line 173) | TEST( Attachment, ImplicitColourAttachment )
function TEST (line 211) | TEST( Attachment, ImplicitDepthAttachment )
function TEST (line 247) | TEST( Attachment, ImplicitDepthStencilAttachment )
function TEST (line 283) | TEST( Attachment, InStorageAttachment )
function TEST (line 319) | TEST( Attachment, InStorageAttachmentT )
function TEST (line 355) | TEST( Attachment, InStorageImage )
function TEST (line 390) | TEST( Attachment, InStorageImageT )
function TEST (line 425) | TEST( Attachment, InStorageBuffer )
function TEST (line 451) | TEST( Attachment, InStorageBufferT )
function TEST (line 477) | TEST( Attachment, UniformAttachment )
function TEST (line 510) | TEST( Attachment, UniformAttachmentT )
function TEST (line 542) | TEST( Attachment, OutStorageAttachment )
function TEST (line 577) | TEST( Attachment, OutStorageAttachmentT )
function TEST (line 612) | TEST( Attachment, ClearOutStorageAttachment )
function TEST (line 647) | TEST( Attachment, ClearOutStorageAttachmentT )
function TEST (line 682) | TEST( Attachment, InOutStorageAttachment )
function TEST (line 718) | TEST( Attachment, InOutStorageAttachmentT )
function TEST (line 754) | TEST( Attachment, InTransferAttachment )
function TEST (line 789) | TEST( Attachment, InTransferImage )
function TEST (line 823) | TEST( Attachment, InTransferBuffer )
function TEST (line 847) | TEST( Attachment, OutTransferAttachment )
function TEST (line 881) | TEST( Attachment, InOutTransferAttachment )
function TEST (line 916) | TEST( Attachment, InColourAttachment )
function TEST (line 955) | TEST( Attachment, InColourImage )
function TEST (line 993) | TEST( Attachment, OutColourAttachment )
function TEST (line 1031) | TEST( Attachment, InOutColourAttachment )
function TEST (line 1070) | TEST( Attachment, InDepthAttachment )
function TEST (line 1109) | TEST( Attachment, InDepthImage )
function TEST (line 1147) | TEST( Attachment, OutDepthAttachment )
function TEST (line 1185) | TEST( Attachment, InOutDepthAttachment )
function TEST (line 1224) | TEST( Attachment, InDepthStencilAttachment )
function TEST (line 1263) | TEST( Attachment, InDepthStencilImage )
function TEST (line 1301) | TEST( Attachment, OutDepthStencilAttachment )
function TEST (line 1339) | TEST( Attachment, InOutDepthStencilAttachment )
function TEST (line 1378) | TEST( Attachment, InStencilAttachment )
function TEST (line 1417) | TEST( Attachment, InStencilImage )
function TEST (line 1455) | TEST( Attachment, OutStencilAttachment )
function TEST (line 1493) | TEST( Attachment, InOutStencilAttachment )
function TEST (line 1532) | TEST( Attachment, ImageAttachment )
function TEST (line 1566) | TEST( Attachment, ImplicitBufferAttachment )
function TEST (line 1602) | TEST( Attachment, UniformBufferAttachment )
function TEST (line 1633) | TEST( Attachment, UniformBufferAttachmentT )
function TEST (line 1664) | TEST( Attachment, InputStorageBufferAttachment )
function TEST (line 1696) | TEST( Attachment, InputStorageBufferAttachmentT )
function TEST (line 1728) | TEST( Attachment, OutputStorageBufferAttachment )
function TEST (line 1759) | TEST( Attachment, OutputStorageBufferAttachmentT )
function TEST (line 1790) | TEST( Attachment, ClearableOutputStorageBufferAttachment )
function TEST (line 1821) | TEST( Attachment, ClearableOutputStorageBufferAttachmentT )
function TEST (line 1852) | TEST( Attachment, InOutStorageBufferAttachment )
function TEST (line 1884) | TEST( Attachment, InOutStorageBufferAttachmentT )
function TEST (line 1916) | TEST( Attachment, ImplicitBufferViewAttachment )
function TEST (line 1947) | TEST( Attachment, UniformBufferViewAttachment )
function TEST (line 1978) | TEST( Attachment, UniformBufferViewAttachmentT )
function TEST (line 2009) | TEST( Attachment, InputStorageBufferViewAttachment )
function TEST (line 2041) | TEST( Attachment, InputStorageBufferViewAttachmentT )
function TEST (line 2073) | TEST( Attachment, OutputStorageBufferViewAttachment )
function TEST (line 2104) | TEST( Attachment, OutputStorageBufferViewAttachmentT )
function TEST (line 2135) | TEST( Attachment, ClearableOutputStorageBufferViewAttachment )
function TEST (line 2166) | TEST( Attachment, ClearableOutputStorageBufferViewAttachmentT )
function TEST (line 2197) | TEST( Attachment, InOutStorageBufferViewAttachment )
function TEST (line 2229) | TEST( Attachment, InOutStorageBufferViewAttachmentT )
function TEST (line 2261) | TEST( Attachment, InputTransferBufferAttachment )
function TEST (line 2292) | TEST( Attachment, OutputTransferBufferAttachment )
function TEST (line 2322) | TEST( Attachment, InOutTransferBufferAttachment )
function TEST (line 2353) | TEST( Attachment, BufferAttachment )
function TEST (line 2378) | TEST( Attachment, AttachmentMerge )
FILE: test/TestBases.cpp
function TEST (line 24) | TEST( Bases, BaseFuncs )
function TEST (line 105) | TEST( Bases, ClearValues )
function TEST (line 176) | TEST( Bases, Signal )
function TEST (line 251) | TEST( Bases, Exception )
function TEST (line 265) | TEST( Bases, Fence )
function TEST (line 278) | TEST( Bases, FramePassTimer )
function TEST (line 350) | TEST( Bases, ImplicitActions )
function TEST (line 437) | TEST( Bases, PrePassActions )
function TEST (line 503) | TEST( Bases, PostPassActions )
function TEST (line 572) | TEST( Bases, GraphDeps )
function TEST (line 691) | TEST( Bases, PassGroupDeps )
function TEST (line 737) | TEST( Bases, PassGroups )
function TEST (line 777) | TEST( Bases, ResourcesCache )
function TEST (line 850) | TEST( Bases, GraphNodes )
FILE: test/TestRenderGraph.cpp
function checkTargetColourIsShaderReadOnly (line 19) | void checkTargetColourIsShaderReadOnly( [[maybe_unused]] test::TestCount...
function checkSampledIsShaderReadOnly (line 40) | void checkSampledIsShaderReadOnly( [[maybe_unused]] test::TestCounts con...
function buildNoPassGraph (line 53) | crg::FrameGraph buildNoPassGraph( test::TestCounts const & testCounts
function TEST (line 62) | TEST( RenderGraph, NoPass )
function TEST (line 83) | TEST( RenderGraph, OnePass )
function TEST (line 108) | TEST( RenderGraph, DuplicateName )
function TEST (line 132) | TEST( RenderGraph, OneDependency )
function TEST (line 202) | TEST( RenderGraph, CycleDependency )
function TEST (line 261) | TEST( RenderGraph, ChainedDependencies )
function TEST (line 330) | TEST( RenderGraph, SharedDependencies )
function TEST (line 539) | TEST( RenderGraph, LoopDependencies )
function TEST (line 576) | TEST( RenderGraph, LoopDependenciesWithRoot )
function TEST (line 622) | TEST( RenderGraph, LoopDependenciesWithRootAndLeaf )
function TEST (line 789) | TEST( RenderGraph, SsaoPass )
function TEST (line 896) | TEST( RenderGraph, BloomPostEffect )
type ParamsT (line 1181) | struct ParamsT
class ParamTypeNames (line 1202) | class ParamTypeNames
method GetName (line 1206) | static std::string GetName( int )
type RenderGraphT (line 1220) | struct RenderGraphT : public ::testing::Test
function TYPED_TEST (line 1226) | TYPED_TEST( RenderGraphT, Render )
function TEST (line 1870) | TEST( RenderGraph, VarianceShadowMap )
function TEST (line 2119) | TEST( RenderGraph, EnvironmentMap )
function TEST (line 2205) | TEST( RenderGraph, DisabledPasses )
FILE: test/TestRenderPass.cpp
function TEST (line 14) | TEST( FramePass, Log )
function TEST (line 62) | TEST( FramePass, RenderPass_1C )
function TEST (line 78) | TEST( FramePass, RenderPass_2C )
function TEST (line 99) | TEST( FramePass, RenderPass_0C_1I )
function TEST (line 116) | TEST( FramePass, RenderPass_0C_2I )
function TEST (line 139) | TEST( FramePass, RenderPass_1C_1I )
function TEST (line 162) | TEST( FramePass, RenderPass_1C_2I )
function TEST (line 191) | TEST( FramePass, RenderPass_2C_1I )
function TEST (line 219) | TEST( FramePass, RenderPass_2C_2I )
function TEST (line 253) | TEST( FramePass, RenderPass_0C_DS )
function TEST (line 269) | TEST( FramePass, RenderPass_1C_DS )
function TEST (line 290) | TEST( FramePass, RenderPass_2C_DS )
function TEST (line 316) | TEST( FramePass, RenderPass_0C_1I_DS )
function TEST (line 339) | TEST( FramePass, RenderPass_0C_2I_DS )
function TEST (line 368) | TEST( FramePass, RenderPass_1C_1I_DS )
function TEST (line 396) | TEST( FramePass, RenderPass_1C_2I_DS )
function TEST (line 430) | TEST( FramePass, RenderPass_2C_1I_DS )
function TEST (line 463) | TEST( FramePass, RenderPass_2C_2I_DS )
FILE: test/TestRunnablePass.cpp
function TEST (line 28) | TEST( RunnablePass, BufferCopy_I_O )
function TEST (line 56) | TEST( RunnablePass, BufferCopy_IO_IO )
function TEST (line 85) | TEST( RunnablePass, BufferToImageCopy )
function TEST (line 111) | TEST( RunnablePass, GenerateMipmaps )
function TEST (line 133) | TEST( RunnablePass, ImageBlit )
function TEST (line 161) | TEST( RunnablePass, Image3DBlit )
function TEST (line 189) | TEST( RunnablePass, ImageCopy_Base )
function TEST (line 217) | TEST( RunnablePass, ImageCopy_SingleInputMultipleOutputsSameImage )
function TEST (line 255) | TEST( RunnablePass, ImageCopy_SingleInputMultipleOutputsDifferentImage )
function TEST (line 294) | TEST( RunnablePass, ImageCopy_MultipleInputsSameImageSingleOutput )
function TEST (line 331) | TEST( RunnablePass, ImageCopy_MultipleInputsDifferentImageSingleOutput )
function TEST (line 369) | TEST( RunnablePass, ImageCopy_OutputLayout )
function TEST (line 398) | TEST( RunnablePass, ImageCopy_BackAndForth )
function TEST (line 430) | TEST( RunnablePass, ImageToBufferCopy )
function TEST (line 456) | TEST( RunnablePass, ComputePass )
function TEST (line 560) | TEST( RunnablePass, ComputePassTransitions )
function TEST (line 612) | TEST( RunnablePass, RenderPass_ORcl )
function TEST (line 640) | TEST( RunnablePass, RenderPass_ORcl_DefCont )
function TEST (line 666) | TEST( RunnablePass, RenderPass_MergedImageViews_ORcl )
function TEST (line 696) | TEST( RunnablePass, RenderPass_MergedImageViews_CubeARray_ORcl )
function TEST (line 736) | TEST( RunnablePass, RenderPass_MergedBufferViews_ORcl )
function TEST (line 769) | TEST( RunnablePass, RenderPass_MergedImageAttachs_ORcl )
function TEST (line 814) | TEST( RunnablePass, RenderPass_MergedBufferAttachs_ORcl )
function TEST (line 861) | TEST( RunnablePass, RenderPass_ORdp )
function TEST (line 886) | TEST( RunnablePass, RenderPass_ORcl_ORdp )
function TEST (line 923) | TEST( RunnablePass, RenderPass )
function TEST (line 952) | TEST( RunnablePass, RenderQuad )
function TEST (line 990) | TEST( RunnablePass, RenderQuad_Indirect )
function TEST (line 1028) | TEST( RunnablePass, RenderMesh )
function TEST (line 1066) | TEST( RunnablePass, RenderMesh_Vertex )
function TEST (line 1103) | TEST( RunnablePass, RenderMesh_Vertex_Index )
function TEST (line 1145) | TEST( RunnablePass, RenderMesh_Indirect )
function TEST (line 1183) | TEST( RunnablePass, RenderMesh_Indirect_Index )
function TEST (line 1224) | TEST( RunnablePass, RenderTexturedMesh )
Condensed preview — 108 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,125K chars).
[
{
"path": ".editorconfig",
"chars": 3124,
"preview": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = CRLF\nindent_style = tab\nindent_size = 4\ntab_width = 4\ntrim_trailing_white"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 665,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 595,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
},
{
"path": ".github/codecov.yml",
"chars": 624,
"preview": "codecov:\n require_ci_to_pass: yes\n\ncoverage:\n precision: 2\n round: down\n range: \"70...100\"\n status:\n project:\n "
},
{
"path": ".github/workflows/cmake.yml",
"chars": 10428,
"preview": "name: Build\n\non:\n push:\n branches:\n - master\n pull_request:\n branches:\n - master\n release:\n types:"
},
{
"path": ".gitignore",
"chars": 169,
"preview": "/.vscode\n/binaries\n/build*\n/setup\n/doc/coverage\n/doc/RenderGraphCoverage\n/doc/RenderGraphCoverage.xml\n/doc/x86\n/doc/x64\n"
},
{
"path": ".gitmodules",
"chars": 185,
"preview": "[submodule \"CMake\"]\n\tpath = CMake\n\turl = https://github.com/DragonJoker/CMakeUtils.git\n[submodule \"external/vcpkg\"]\n\tpat"
},
{
"path": "AUTHORS",
"chars": 54,
"preview": "Authors of RenderGraph\n\nSylvain Doremus\t\t\tMain author\n"
},
{
"path": "CMakeLists.txt",
"chars": 11698,
"preview": "cmake_minimum_required( VERSION 3.10 )\ncmake_policy( VERSION 3.10 )\n\n#--------------------------------------------------"
},
{
"path": "CMakePresets.json",
"chars": 3946,
"preview": "{\n\t\"version\": 3,\n\t\"cmakeMinimumRequired\": {\n\t\t\"major\": 3,\n\t\t\"minor\": 21,\n\t\t\"patch\": 0\n\t},\n\t\"configurePresets\": [\n\t\t{\n\t\t\t"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3357,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "LICENSE",
"chars": 1071,
"preview": "MIT License\n\nCopyright (c) 2018 Sylvain Doremus\n\nPermission is hereby granted, free of charge, to any person obtaining a"
},
{
"path": "README.md",
"chars": 1314,
"preview": "<p align=\"center\">\n <img alt=\"Vcpkg Version\" src=\"https://img.shields.io/vcpkg/v/rendergraph\">\n <a href=\"https://githu"
},
{
"path": "include/RenderGraph/Attachment.hpp",
"chars": 16365,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"BufferViewData.hpp\"\n#inc"
},
{
"path": "include/RenderGraph/AttachmentTransition.hpp",
"chars": 930,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"Attachment.hpp\"\n\n#includ"
},
{
"path": "include/RenderGraph/BufferData.hpp",
"chars": 655,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"Id.hpp\"\n\nnamespace crg\n{"
},
{
"path": "include/RenderGraph/BufferViewData.hpp",
"chars": 3713,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"Id.hpp\"\n\nnamespace crg\n{"
},
{
"path": "include/RenderGraph/DotExport.hpp",
"chars": 949,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/FrameGraphPrerequisites.hpp\"\n\n#pragma warning"
},
{
"path": "include/RenderGraph/Exception.hpp",
"chars": 584,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/FrameGraphPr"
},
{
"path": "include/RenderGraph/FrameGraph.hpp",
"chars": 4821,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"Attachment.hpp\"\n#include"
},
{
"path": "include/RenderGraph/FrameGraphBase.hpp",
"chars": 6630,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#pragma warning( push )\n#pragma wa"
},
{
"path": "include/RenderGraph/FrameGraphEnums.hpp",
"chars": 11431,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"FrameGraphBase.hpp\"\n\n#de"
},
{
"path": "include/RenderGraph/FrameGraphFunctions.hpp",
"chars": 15120,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"FrameGraphStructs.hpp\"\n\n"
},
{
"path": "include/RenderGraph/FrameGraphPrerequisites.hpp",
"chars": 937,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"FrameGraphFunctions.hpp\""
},
{
"path": "include/RenderGraph/FrameGraphStructs.hpp",
"chars": 8465,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"FrameGraphEnums.hpp\"\n\n#i"
},
{
"path": "include/RenderGraph/FramePass.hpp",
"chars": 22538,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/Attachment.h"
},
{
"path": "include/RenderGraph/FramePassGroup.hpp",
"chars": 3699,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/FramePass.hp"
},
{
"path": "include/RenderGraph/FramePassTimer.hpp",
"chars": 4083,
"preview": "/*\nSee LICENSE file in root folder\n*/\n#ifndef ___CRG_RenderPassTimer_H___\n#define ___CRG_RenderPassTimer_H___\n\n#include "
},
{
"path": "include/RenderGraph/GraphContext.hpp",
"chars": 19320,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"FrameGraphPrerequisites."
},
{
"path": "include/RenderGraph/GraphNode.hpp",
"chars": 4311,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/AttachmentTr"
},
{
"path": "include/RenderGraph/GraphVisitor.hpp",
"chars": 367,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/GraphNode.hp"
},
{
"path": "include/RenderGraph/Hash.hpp",
"chars": 780,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\nnamespace crg\n{\n\ttemplate< typenam"
},
{
"path": "include/RenderGraph/Id.hpp",
"chars": 726,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/FrameGraphPr"
},
{
"path": "include/RenderGraph/ImageData.hpp",
"chars": 928,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"Id.hpp\"\n\nnamespace crg\n{"
},
{
"path": "include/RenderGraph/ImageViewData.hpp",
"chars": 843,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"Id.hpp\"\n\nnamespace crg\n{"
},
{
"path": "include/RenderGraph/LayerLayoutStatesHandler.hpp",
"chars": 866,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"FrameGraphPrerequisites."
},
{
"path": "include/RenderGraph/Log.hpp",
"chars": 1913,
"preview": "/*\nSee LICENSE file in root folder\n*/\n#ifndef ___CRG_Log_H___\n#define ___CRG_Log_H___\n\n#include \"FrameGraphPrerequisites"
},
{
"path": "include/RenderGraph/PixelFormat.inl",
"chars": 12424,
"preview": "/*\nSee LICENSE file in root folder\n*/\n#ifndef RGPF_ENUM_NON_VALUE\n#\tdefine RGPF_ENUM_NON_VALUE( x, y )\n#endif\n\n#ifndef R"
},
{
"path": "include/RenderGraph/RecordContext.hpp",
"chars": 8861,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"Attachment.hpp\"\n#include"
},
{
"path": "include/RenderGraph/ResourceHandler.hpp",
"chars": 6966,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/FrameGraphPrerequisites.hpp\"\n\n#pragma warning"
},
{
"path": "include/RenderGraph/RunnableGraph.hpp",
"chars": 4493,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"GraphContext.hpp\"\n#inclu"
},
{
"path": "include/RenderGraph/RunnablePass.hpp",
"chars": 10983,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/FramePass.hp"
},
{
"path": "include/RenderGraph/RunnablePasses/BufferCopy.hpp",
"chars": 697,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass.hpp\"\n\nnamespace crg\n{\n\tclass Buf"
},
{
"path": "include/RenderGraph/RunnablePasses/BufferToImageCopy.hpp",
"chars": 727,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass.hpp\"\n\nnamespace crg\n{\n\tclass Buf"
},
{
"path": "include/RenderGraph/RunnablePasses/ComputePass.hpp",
"chars": 7471,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/BufferViewData.hpp\"\n#include \"RenderGraph/Run"
},
{
"path": "include/RenderGraph/RunnablePasses/GenerateMipmaps.hpp",
"chars": 805,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass.hpp\"\n\nnamespace crg\n{\n\tclass Gen"
},
{
"path": "include/RenderGraph/RunnablePasses/ImageBlit.hpp",
"chars": 797,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass.hpp\"\n\nnamespace crg\n{\n\tclass Ima"
},
{
"path": "include/RenderGraph/RunnablePasses/ImageCopy.hpp",
"chars": 1386,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass.hpp\"\n\nnamespace crg\n{\n\tclass Ima"
},
{
"path": "include/RenderGraph/RunnablePasses/ImageToBufferCopy.hpp",
"chars": 727,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass.hpp\"\n\nnamespace crg\n{\n\tclass Ima"
},
{
"path": "include/RenderGraph/RunnablePasses/PipelineConfig.hpp",
"chars": 4892,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass.hpp\"\n#include \"RenderGraph/Write"
},
{
"path": "include/RenderGraph/RunnablePasses/PipelineHolder.hpp",
"chars": 4677,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePasses/PipelineConfig.hpp\"\n\nnamespace"
},
{
"path": "include/RenderGraph/RunnablePasses/RenderMesh.hpp",
"chars": 993,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass"
},
{
"path": "include/RenderGraph/RunnablePasses/RenderMeshConfig.hpp",
"chars": 7104,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnableGrap"
},
{
"path": "include/RenderGraph/RunnablePasses/RenderMeshHolder.hpp",
"chars": 2298,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass"
},
{
"path": "include/RenderGraph/RunnablePasses/RenderPass.hpp",
"chars": 2868,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePasses/RenderPassHolder.hpp\"\n\nnamespa"
},
{
"path": "include/RenderGraph/RunnablePasses/RenderPassHolder.hpp",
"chars": 2986,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass.hpp\"\n\nnamespace crg\n{\n\tclass Ren"
},
{
"path": "include/RenderGraph/RunnablePasses/RenderQuad.hpp",
"chars": 3993,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass"
},
{
"path": "include/RenderGraph/RunnablePasses/RenderQuadConfig.hpp",
"chars": 5407,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/BufferViewDa"
},
{
"path": "include/RenderGraph/RunnablePasses/RenderQuadHolder.hpp",
"chars": 2580,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/RunnablePass"
},
{
"path": "include/RenderGraph/Signal.hpp",
"chars": 5778,
"preview": "/*\nSee LICENSE file in root folder\n*/\n#pragma once\n\n#include <cassert>\n#include <functional>\n#include <set>\n#include <ma"
},
{
"path": "include/RenderGraph/Version.hpp.in",
"chars": 225,
"preview": "/*\nSee LICENSE file in root folder\n*/\n#ifndef ___CRG_Version___\n#define ___CRG_Version___\n\n#define CRG_VersionMajor ${VE"
},
{
"path": "include/RenderGraph/WriteDescriptorSet.hpp",
"chars": 2584,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/FrameGraphPr"
},
{
"path": "source/CMakeLists.txt",
"chars": 11860,
"preview": "cmake_minimum_required( VERSION 3.10 )\ncmake_policy( VERSION 3.10 )\n\n#--------------------------------------------------"
},
{
"path": "source/RenderGraph/Attachment.cpp",
"chars": 12943,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/Attachment.hpp\"\n#include \""
},
{
"path": "source/RenderGraph/AttachmentTransition.cpp",
"chars": 1043,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/AttachmentTransition.hpp\"\n"
},
{
"path": "source/RenderGraph/BuilderCommon.hpp",
"chars": 1053,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#pragma once\n\n#include \"RenderGraph/FrameGraphPr"
},
{
"path": "source/RenderGraph/DotExport.cpp",
"chars": 19528,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/DotExport.hpp\"\n#include \"RenderGraph/FrameGraph.hpp\"\n#inclu"
},
{
"path": "source/RenderGraph/FrameGraph.cpp",
"chars": 13593,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/FrameGraph.hpp\"\n\n#include "
},
{
"path": "source/RenderGraph/FrameGraph.natvis",
"chars": 13455,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<AutoVisualizer xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\""
},
{
"path": "source/RenderGraph/FrameGraphPrerequisites.cpp",
"chars": 23737,
"preview": "#include \"RenderGraph/FrameGraphPrerequisites.hpp\"\n#include \"RenderGraph/BufferData.hpp\"\n#include \"RenderGraph/BufferVie"
},
{
"path": "source/RenderGraph/FramePass.cpp",
"chars": 32712,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/FramePass.hpp\"\n\n#include \""
},
{
"path": "source/RenderGraph/FramePassGroup.cpp",
"chars": 5503,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/FramePassGroup.hpp\"\n\n#incl"
},
{
"path": "source/RenderGraph/FramePassTimer.cpp",
"chars": 4263,
"preview": "#include \"RenderGraph/FramePassTimer.hpp\"\n#include \"RenderGraph/GraphContext.hpp\"\n#include \"RenderGraph/Log.hpp\"\n\n#inclu"
},
{
"path": "source/RenderGraph/GraphBuilder.cpp",
"chars": 19923,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"GraphBuilder.hpp\"\n\n#include \"RenderGra"
},
{
"path": "source/RenderGraph/GraphBuilder.hpp",
"chars": 336,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"BuilderCommon.hpp\"\n\nnamespace crg::bui"
},
{
"path": "source/RenderGraph/GraphContext.cpp",
"chars": 11286,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/GraphContext.hpp\"\n#include"
},
{
"path": "source/RenderGraph/GraphNode.cpp",
"chars": 2183,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/GraphNode.hpp\"\n\n#include \""
},
{
"path": "source/RenderGraph/LayerLayoutStatesHandler.cpp",
"chars": 2024,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/LayerLayoutStatesHandler.hpp\"\n\n#include \"RenderGraph/ImageD"
},
{
"path": "source/RenderGraph/Log.cpp",
"chars": 3094,
"preview": "#include \"RenderGraph/Log.hpp\"\n\n#pragma warning( push )\n#pragma warning( disable: 5262 )\n#include <iostream>\n#include <s"
},
{
"path": "source/RenderGraph/RecordContext.cpp",
"chars": 21149,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RecordContext.hpp\"\n\n#include \"RenderGraph/Exception.hpp\"\n#i"
},
{
"path": "source/RenderGraph/ResourceHandler.cpp",
"chars": 25936,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/ResourceHandler.hpp\"\n\n#include \"RenderGraph/Attachment.hpp\""
},
{
"path": "source/RenderGraph/RunnableGraph.cpp",
"chars": 16505,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnableGraph.hpp\"\n#include \"RenderGraph/GraphVisitor.hpp\"\n"
},
{
"path": "source/RenderGraph/RunnablePass.cpp",
"chars": 19146,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePass.hpp\"\n\n#includ"
},
{
"path": "source/RenderGraph/RunnablePasses/BufferCopy.cpp",
"chars": 2567,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/BufferCopy."
},
{
"path": "source/RenderGraph/RunnablePasses/BufferToImageCopy.cpp",
"chars": 2044,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/BufferToIma"
},
{
"path": "source/RenderGraph/RunnablePasses/ComputePass.cpp",
"chars": 4491,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/ComputePass.hpp\"\n\n#include \"RenderGraph/Grap"
},
{
"path": "source/RenderGraph/RunnablePasses/GenerateMipmaps.cpp",
"chars": 5375,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/GenerateMipmaps.hpp\"\n\n#include \"RenderGraph/"
},
{
"path": "source/RenderGraph/RunnablePasses/ImageBlit.cpp",
"chars": 2382,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/ImageBlit.h"
},
{
"path": "source/RenderGraph/RunnablePasses/ImageCopy.cpp",
"chars": 6740,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/ImageCopy.h"
},
{
"path": "source/RenderGraph/RunnablePasses/ImageToBufferCopy.cpp",
"chars": 1969,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/ImageToBuff"
},
{
"path": "source/RenderGraph/RunnablePasses/PipelineHolder.cpp",
"chars": 13442,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/PipelineHolder.hpp\"\n\n#include \"RenderGraph/G"
},
{
"path": "source/RenderGraph/RunnablePasses/RenderMesh.cpp",
"chars": 2405,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/RenderMesh."
},
{
"path": "source/RenderGraph/RunnablePasses/RenderMeshHolder.cpp",
"chars": 8141,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/RenderMeshH"
},
{
"path": "source/RenderGraph/RunnablePasses/RenderPass.cpp",
"chars": 3832,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/RenderPass.hpp\"\n\n#include \"RenderGraph/Attac"
},
{
"path": "source/RenderGraph/RunnablePasses/RenderPassHolder.cpp",
"chars": 11385,
"preview": "/*\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/RenderPassHolder.hpp\"\n\n#include \"RenderGraph"
},
{
"path": "source/RenderGraph/RunnablePasses/RenderQuad.cpp",
"chars": 2411,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/RenderQuad."
},
{
"path": "source/RenderGraph/RunnablePasses/RenderQuadHolder.cpp",
"chars": 6696,
"preview": "/*\nThis file belongs to FrameGraph.\nSee LICENSE file in root folder.\n*/\n#include \"RenderGraph/RunnablePasses/RenderQuadH"
},
{
"path": "test/BaseTest.cpp",
"chars": 8021,
"preview": "#include \"BaseTest.hpp\"\n\n#include <RenderGraph/Log.hpp>\n\n#if defined( _WIN32 )\n#\tinclude <Windows.h>\n#elif defined( __AP"
},
{
"path": "test/BaseTest.hpp",
"chars": 2457,
"preview": "#pragma once\n\n#include <fstream>\n#include <iostream>\n#include <memory>\n#include <stdexcept>\n\n#include <RenderGraph/Excep"
},
{
"path": "test/CMakeLists.txt",
"chars": 2556,
"preview": "enable_testing()\n\nset( GTest_DIR ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/gtest )\nfind_package( GTest CONFIG"
},
{
"path": "test/Common.cpp",
"chars": 48258,
"preview": "#include \"Common.hpp\"\n#include \"BaseTest.hpp\"\n\n#include <RenderGraph/DotExport.hpp>\n#include <RenderGraph/GraphContext.h"
},
{
"path": "test/Common.hpp",
"chars": 4331,
"preview": "#pragma once\n\n#include <RenderGraph/FrameGraphPrerequisites.hpp>\n#include <RenderGraph/RunnablePass.hpp>\n\n#include \"Base"
},
{
"path": "test/TestAttachment.cpp",
"chars": 120969,
"preview": "#include \"Common.hpp\"\n\n#include <RenderGraph/Attachment.hpp>\n#include <RenderGraph/FrameGraph.hpp>\n#include <RenderGraph"
},
{
"path": "test/TestBases.cpp",
"chars": 41032,
"preview": "#include \"Common.hpp\"\n\n#include <RenderGraph/FrameGraph.hpp>\n#include <RenderGraph/FramePassTimer.hpp>\n#include <RenderG"
},
{
"path": "test/TestRenderGraph.cpp",
"chars": 104361,
"preview": "#include \"Common.hpp\"\n\n#include <RenderGraph/FrameGraph.hpp>\n#include <RenderGraph/ImageData.hpp>\n#include <RenderGraph/"
},
{
"path": "test/TestRenderPass.cpp",
"chars": 21015,
"preview": "#include \"Common.hpp\"\n\n#include <RenderGraph/Attachment.hpp>\n#include <RenderGraph/FramePass.hpp>\n#include <RenderGraph/"
},
{
"path": "test/TestRunnablePass.cpp",
"chars": 61060,
"preview": "#include \"Common.hpp\"\n\n#include <RenderGraph/Attachment.hpp>\n#include <RenderGraph/FramePass.hpp>\n#include <RenderGraph/"
},
{
"path": "vcpkg.json",
"chars": 402,
"preview": "{\n \"$schema\": \"https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json\",\n \"name\": \"rendergr"
}
]
About this extraction
This page contains the full source code of the DragonJoker/RenderGraph GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 108 files (996.6 KB), approximately 299.5k tokens, and a symbol index with 1360 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.