Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Methane Kit v0.7.2: add initial compute pipeline support and RHI unit tests #121

Merged
merged 136 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
3a375e9
Add ComputeCommandList dummy interface and implementations
egorodet Feb 11, 2023
a7cc9cb
Fix MacOS build
egorodet Feb 11, 2023
ff2524c
Cleanup root CMakeLists, move CPM source cache to Build/Output/Extern…
egorodet Feb 16, 2023
10bcc85
Add CodeCove components
egorodet Feb 16, 2023
59cce05
Remove unused textures
egorodet Feb 16, 2023
e9c5664
Re-enable CTest via root CMakeLists
egorodet Feb 16, 2023
85106ee
Merge branch 'master' into develop
egorodet Feb 17, 2023
0f40102
Merge branch 'master' into develop
egorodet Feb 17, 2023
04d2ccc
Add ComputeState interface and implementations for DirectX, Vulkan an…
egorodet Feb 18, 2023
6680506
Add ComputeState implementation for Metal backend and RHI PIMPL class
egorodet Feb 18, 2023
f5713a3
Add ComputeState factory function for Metal
egorodet Feb 18, 2023
5d8952f
Add Compute shaders support to Metal
egorodet Feb 19, 2023
d84de04
Add Compute shaders support to DirectX and Vulkan
egorodet Feb 20, 2023
a78fd3c
Fix non-portable header paths
egorodet Feb 21, 2023
cfa812b
Add RHI ComputeContext
egorodet Feb 23, 2023
9c370fd
Fix DirectX build
egorodet Feb 23, 2023
9fa8d92
Fix DirectX Scan build
egorodet Feb 23, 2023
1ec7e69
Update CPM.cmake to v.0.38
egorodet Feb 26, 2023
d661dc4
Update Tracy client to v.0.9.1
egorodet Feb 26, 2023
0d1b069
Update version of Tracy binaries in Profile builds
egorodet Feb 28, 2023
45cf97e
Add initial ConsoleCompute tutorial app based on FTXUI
egorodet Mar 2, 2023
1d57d50
Exclude tracy repository download when Tracy option is not enabled
egorodet Mar 2, 2023
f535ac8
Fix Build errors
egorodet Mar 2, 2023
352e746
Initial UI implementation for Console Compute tutorial
egorodet Mar 4, 2023
8a97501
Add compute_command_queues count to DeviceCaps, fix device features c…
egorodet Mar 5, 2023
33a7c1a
Add graphics API and available devices radio-box to Console Compute UI
egorodet Mar 5, 2023
ca11529
Fix DirectX device capabilities check
egorodet Mar 5, 2023
9144fca
Fix Apple build
egorodet Mar 5, 2023
c1f48d1
Add missing Compute PIMPL constructors and factory functions
egorodet Mar 6, 2023
e598058
Add ComputeContext, Program and ComputeState initialization in Consol…
egorodet Mar 6, 2023
19dd556
Fix build errors
egorodet Mar 6, 2023
a1c462b
Fix tvOS build
egorodet Mar 6, 2023
5793e97
Add ComputeCommandList::Dispatch and ResetWithState commands for Meta…
egorodet Mar 11, 2023
c6a10e0
Add frame texture binding to compute shader in ConsoleCompute with Ga…
egorodet Mar 11, 2023
e1ad8e4
Fix MacOS build
egorodet Mar 11, 2023
4eb7e59
Add DirectX compute pipeline implementation
egorodet Mar 12, 2023
4127cd9
Fix GPU switching in ConsoleCompute tutorial
egorodet Mar 12, 2023
ce47cb4
Add Unordered Access View support and Texture data read-back in Direc…
egorodet Mar 15, 2023
015ce6a
Fix compute bugs, improve logging
egorodet Mar 16, 2023
3cad944
Fix Windows Vulkan builds, make function Rhi::System::GetNativeApi() …
egorodet Mar 17, 2023
3579b5b
Revert "Fix Windows Vulkan builds, make function Rhi::System::GetNati…
egorodet Mar 18, 2023
6ac1bec
Implement Metal texture read-back
egorodet Mar 18, 2023
e2eea83
Workaround generated Metal shader error
egorodet Mar 18, 2023
cd15419
Implement Vulkan texture read-back
egorodet Mar 18, 2023
6ccc3a6
Fix Vulkan texture data read-back
egorodet Mar 18, 2023
ad02d77
Implement Metal buffer read-back
egorodet Mar 19, 2023
26cb762
Implement Vulkan buffer read-back
egorodet Mar 19, 2023
8fca6ee
Add FPS counter in ConsoleCompute tutorial
egorodet Mar 19, 2023
d7e2201
Add scrollable game field in ConsoleCompute tutorial
egorodet Mar 19, 2023
3309b42
Rework IBuffer/ITexture GetData/SetData interface methods, move them …
egorodet Mar 26, 2023
ad99886
Fix MacOS build
egorodet Mar 26, 2023
0410737
Support Tracy profiling of ConsoleCompute tutorial, add Dispatch logging
egorodet Apr 1, 2023
1327614
Rewrite deprecated functions to fix build after upgrade to Xcode 14.3
egorodet Apr 1, 2023
1c1aeac
Bump Apple deployment targets (MacOS 10.15 -> 13.0, iOS 15.0 -> 16.0)…
egorodet Apr 1, 2023
d8832be
Fix MSVC build error
egorodet Apr 1, 2023
fb75773
Fix build on MacOS 12.x by enforcing minimum OSX deployment target 13.0
egorodet Apr 1, 2023
f250029
Try to fix Apple builds
egorodet Apr 1, 2023
3b0ab20
Merge branch 'master' into develop
egorodet Apr 1, 2023
5ccc480
Extend ConsoleCompute tutorial with UI controls to Restart, Play/Paus…
egorodet Apr 2, 2023
4beff23
Enable Vulkan Debug Utils extension in Release builds to allow settin…
egorodet Apr 3, 2023
7f7e3cc
Add README and Linux screenshot for Console Compute tutorial
egorodet Apr 3, 2023
6f16546
Add MacOS screenshot for Console Compute tutorial
egorodet Apr 3, 2023
ca3c38e
Add Windows screenshot for Console Compute tutorial
egorodet Apr 4, 2023
8565524
Bump project version to v0.7.2
egorodet Apr 4, 2023
24c5f68
Add Console Compute to the tutorials list in README
egorodet Apr 4, 2023
e499354
Add Graphics RHI unit-tests
egorodet Apr 5, 2023
88969f5
Fix Windows build
egorodet Apr 7, 2023
cb48eb0
Auto-collect test results for SonarScanner
egorodet Apr 8, 2023
8bec16a
Fix test results collection on all platforms for SonarScanner
egorodet Apr 8, 2023
48f11ea
Fix test results collection on Windows
egorodet Apr 8, 2023
18fd329
Try to fix environment variable setup from CMD/batch shell in GitHub …
egorodet Apr 8, 2023
3439850
Add RHI Context tests of IObject interface methods
egorodet Apr 8, 2023
f40bdc9
Remove string quotes in Windows cmd shell
egorodet Apr 8, 2023
0ba77a1
One more fix for Windows cmd shell
egorodet Apr 8, 2023
30651c9
Add more unit-test for RHI ComputeContext
egorodet Apr 9, 2023
6be2d78
Fix build error
egorodet Apr 9, 2023
47358ab
Improve ComputeContext unit test code coverage
egorodet Apr 9, 2023
530d09d
Add more unit-tests for ComputeContext
egorodet Apr 10, 2023
78f54fe
Add remaining unit-tests for ComputeContext
egorodet Apr 11, 2023
35dec61
Add unit-tests for ComputeState
egorodet Apr 11, 2023
0621272
Add unit-tests for Shader
egorodet Apr 15, 2023
9a46485
Merge branch 'master' into develop
egorodet Apr 15, 2023
1b71ea1
Add unit-tests for Program
egorodet Apr 15, 2023
2e975e3
Fix MacOS build error
egorodet Apr 15, 2023
1a87336
Fix RHI test crash on Windows
egorodet Apr 16, 2023
f334d48
Ignore Tests and Apps folders in CodeCov
egorodet Apr 16, 2023
b2b6ccb
Add unit-tests for ProgramBindings
egorodet Apr 16, 2023
dbcdb94
Extend unit-tests of ProgramBindings
egorodet Apr 17, 2023
b3e7c05
Add initial unit-tests for Command Queue
egorodet Apr 18, 2023
8151b57
Add unit-test of CommandQueue::Execute
egorodet Apr 19, 2023
9aa8b79
Add unit-test of Fence, fix other tests
egorodet Apr 20, 2023
fd63a00
Upgrade HLSL++ to v3.3.1
egorodet Apr 21, 2023
d25e393
Add unit tests for RHI Transfer Command List
egorodet Apr 21, 2023
3c819d7
Add unit tests for RHI Compute Command List
egorodet Apr 22, 2023
a3a5e45
Add Set Program Bindings test for RHI Compute Command List
egorodet Apr 23, 2023
5717be1
Add some unit tests for RHI Buffer
egorodet Apr 24, 2023
f7be834
Fix build error
egorodet Apr 25, 2023
db3e82f
Use faster XL MacOS runners for Release, Profile and Scan builds for …
egorodet Apr 25, 2023
ff13c4a
Revert "Use faster XL MacOS runners for Release, Profile and Scan bui…
egorodet Apr 25, 2023
85a5c4b
Move GetSubresourceCount/DataSize methods from IResource to ITexture …
egorodet Apr 26, 2023
6dd770d
Fix GCC and MSVC build errors
egorodet Apr 26, 2023
4d8a089
Fix GCC and MSVC build errors
egorodet Apr 26, 2023
e2a5faf
Add more unit-tests for RHI Buffer
egorodet Apr 26, 2023
23ee061
Add unit-tests for RHI Sampler
egorodet Apr 27, 2023
1addcd6
Fix compilation error in Release builds
egorodet Apr 27, 2023
28d63c9
Add unit-tests for RHI Texture
egorodet Apr 28, 2023
b552c1a
Merge branch 'master' into develop
egorodet May 11, 2023
0764109
Refactor Console Compute app using classes
egorodet May 12, 2023
b381087
Cleanup code of Console Compute tutorial
egorodet May 13, 2023
7230d7a
Fix present coordinates bug in Console Compute tutorial
egorodet May 13, 2023
f17467d
Normalize screenshot sizes of Console Compute tutorial
egorodet May 14, 2023
e1879b2
Fix code analysis issues
egorodet May 21, 2023
6cf3e46
Fix build errors and some code analysis issues
egorodet May 22, 2023
8abd9ce
Add documentation for ConsoleCompute tutorial
egorodet May 23, 2023
d23581b
Update read-me of ConsoleCompute tutorial
egorodet May 23, 2023
d1b142d
Fix remaining code analysis issues
egorodet May 22, 2023
f014aae
Fix All shader type issue in bindings for single shader programs
egorodet May 24, 2023
7ad6614
Fix Graphics RHI unit tests
egorodet May 24, 2023
4c55a19
Continue on error for unit tests
egorodet May 25, 2023
c2c5ee9
Fail unit test steps on test failure, but continue further steps exec…
egorodet May 25, 2023
e592aea
Fix tests running after failure on Linux and Mac
egorodet May 25, 2023
fb5130c
Fix tests running after failure on Linux and Mac (2-nd attempt)
egorodet May 26, 2023
3804dba
Fix tests running after failure on Linux and Mac (3-rd attempt)
egorodet May 26, 2023
2521a4d
Fix tests running after failure on Linux and Mac (4-th attempt)
egorodet May 26, 2023
51577f8
Fix tests running after failure on Linux and Mac (5-th attempt)
egorodet May 26, 2023
a46a358
Fix adding test result comments and collect GCov coverage on test fai…
egorodet May 26, 2023
57395dd
Fix ProgramBindings conversion to string operator
egorodet May 27, 2023
d97b641
Fix Vulkan validation error on set Resource Barriers in Compute Comma…
egorodet May 27, 2023
8e1619a
Fix DirectX debug warning (CREATERESOURCE_STATE_IGNORED):
egorodet May 27, 2023
d82148f
Fix crash on text mesh update
egorodet May 27, 2023
c145f3d
Fix graphics objects release
egorodet May 27, 2023
d52105a
Fix Vulkan validation warning in VkImageSubresourceRange::aspectMask
egorodet May 27, 2023
e209f47
Add more controls description in Console Compute tutorial
egorodet May 27, 2023
444b85d
Add FTXUI library to Externals README.md
egorodet May 28, 2023
b3e10e9
Remove odd noexcept
egorodet May 29, 2023
0afb15f
Update SetData usage in documents
egorodet May 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ coverage:
informational: true
only_pulls: true

ignore:
- "Tests"
- "Apps"

component_management:
individual_components:
- component_id: common-primitives
Expand Down
30 changes: 22 additions & 8 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ on:
env:
product_ver_major: 0
product_ver_minor: 7
product_ver_patch: 1
product_ver_patch: 2
product_ver_build: ${{ github.run_number }}
tracy_release_version: "0.9"
tracy_release_version: "0.9.1"
# TSC Invariant check is disabled to allow running Catch test executables only for tests list query by CTest
TRACY_NO_INVARIANT_CHECK: 1

Expand Down Expand Up @@ -215,13 +215,20 @@ jobs:
working-directory: ${{ env.INSTALL_DIR }}/Tests
shell: bash
run: |
set +e
result_ext='_result.xml'
result_error_level=0
echo Running all unit-tests in directory $PWD
for test_exe in *Test
do
./$test_exe -r junit -o "$test_exe$result_ext"
echo - $test_exe - completed with $? exit code
last_error_level=$?
echo - $test_exe - completed with $last_error_level exit code
if [ $last_error_level != 0 ]; then
result_error_level=$last_error_level
fi
done
exit $result_error_level

- name: Run Unit-Tests on Windows
if: ${{ matrix.run_tests && matrix.os_name == 'Windows' }}
Expand All @@ -230,11 +237,15 @@ jobs:
run: |
setlocal enabledelayedexpansion
echo Running unit-tests in directory "%cd%"
set /A result_error_level=0
for /r "." %%a in (*Test.exe) do (
"%%~fa" -r junit -o "%%~fa_result.xml"
echo - %%~na - completed with !errorlevel! exit status
if not !errorlevel!==0 (
set /A result_error_level=!errorlevel!
)
)
exit 0
exit !result_error_level!

- name: Upload Test Results Artifact
uses: actions/upload-artifact@v3
Expand All @@ -243,11 +254,12 @@ jobs:
name: MethaneKit_${{ matrix.name }}_TestResults_${{ env.product_ver_major }}.${{ env.product_ver_minor }}.${{ env.product_ver_patch }}.${{ env.product_ver_build }}
path: ${{ env.INSTALL_DIR }}/Tests/*_result.xml

- name: Upload Build Log and Test Tesults to Testspace server
- name: Upload Test Results and Build Log to Testspace server
if: ${{ matrix.run_tests && (success() || failure()) }}
run: testspace "[ ${{ matrix.name }} ]${{ env.INSTALL_DIR }}/Tests/*_result.xml" "[ ${{ matrix.name }} ]${{ env.BUILD_LOG_FILE }}"

- name: Add README and BUILD files
if: ${{ success() || failure() }}
shell: bash
run: |
cp README.md $INSTALL_DIR/README.md
Expand All @@ -259,26 +271,28 @@ jobs:
echo - Builder agent ${{ matrix.os }} system information: >> $INSTALL_DIR/Build-Info.txt

- name: Add Windows System Information to BUILD file
if: ${{ matrix.os_name == 'Windows' }}
if: ${{ matrix.os_name == 'Windows' && (success() || failure()) }}
run: systeminfo >> Build\Output\${{ matrix.config_preset }}\Install\Build-Info.txt

- name: Add Unix System Information to BUILD file
if: ${{ matrix.os_name != 'Windows' }}
if: ${{ matrix.os_name != 'Windows' && (success() || failure()) }}
run: uname -a >>$INSTALL_DIR/Build-Info.txt

- name: Download Tracy release
if: ${{ matrix.add_tracy_app }}
if: ${{ matrix.add_tracy_app && (success() || failure()) }}
shell: bash
run: |
curl -sSLo Tracy.7z https://github.com/MethanePowered/Tracy/releases/download/v${{ env.tracy_release_version }}/Tracy-${{ matrix.os_name }}-v${{ env.tracy_release_version }}.7z
7z x Tracy.7z -o$INSTALL_DIR/Apps

- name: Archive Build Artifacts
if: ${{ success() || failure() }}
shell: bash
working-directory: ${{ env.INSTALL_DIR }}
run: 7z a -t7z -mx=9 MethaneKit_${{ matrix.name }}.7z *

- name: Upload Archived Build Artifacts
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
with:
name: MethaneKit_${{ matrix.name }}_${{ env.product_ver_major }}.${{ env.product_ver_minor }}.${{ env.product_ver_patch }}.${{ env.product_ver_build }}
Expand Down
61 changes: 50 additions & 11 deletions .github/workflows/ci-sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:
env:
product_ver_major: 0
product_ver_minor: 7
product_ver_patch: 1
product_ver_patch: 2
product_ver_build: ${{ github.run_number }}
sonar_server_url: "https://sonarcloud.io"
sonar_organization: methane-powered
Expand Down Expand Up @@ -159,13 +159,15 @@ jobs:
throw 'OpenCppCoverage/OpenCppCoverage.exe executable was not found in unpacked content!'
}

- name: Run all unit-tests from install directory with code coverage using OpenCppCoverage on Windows
- name: Run all unit-tests with OpenCppCoverage code coverage on Windows
if: ${{ matrix.os_name == 'windows' }}
shell: cmd
working-directory: 'Build\Output\${{ matrix.config_preset }}\Install\Tests'
run: |
chcp 65001 #set code page to utf-8
setlocal enabledelayedexpansion
set open_cpp_coverage_exe=OpenCppCoverage\OpenCppCoverage.exe
set test_results=
if not exist "%open_cpp_coverage_exe%" (
echo File path "%open_cpp_coverage_exe%" does not exist!
exit 101
Expand All @@ -181,43 +183,73 @@ jobs:
if not !errorlevel!==0 (
set /A result_error_level=!errorlevel!
)
if .!test_results!==. (
set test_results=Build/Output/${{ matrix.config_preset }}/Install/Tests/Results/%%~na.xml
) else (
set test_results=!test_results!,Build/Output/${{ matrix.config_preset }}/Install/Tests/Results/%%~na.xml
)
)
echo Test Result Files: %test_results%
echo test_results=%test_results%>> %GITHUB_ENV%
exit !result_error_level!

- name: Run unit-tests from install directory on Linux
- name: Run all unit-tests with GCov code coverage on Linux
if: ${{ matrix.os_name == 'linux' }}
working-directory: 'Build/Output/${{ matrix.config_preset }}/Install/Tests'
run: |
set +e
result_ext='.xml'
test_results=''
result_error_level=0
echo Running unit-tests in directory $PWD
mkdir Results
for test_exe in *Test
do
./$test_exe -r sonarqube -o "Results/$test_exe$result_ext"
echo - $test_exe - completed with $? exit status
last_error_level=$?
echo - $test_exe - completed with $last_error_level exit status
if [ $last_error_level != 0 ]; then
result_error_level=$last_error_level
fi
if [ -f "$PWD/Results/$test_exe$result_ext" ]; then
test_results+="$PWD/Results/$test_exe$result_ext,"
fi
done
echo "Test Result Files: $test_results"
echo "test_results=$test_results" >> $GITHUB_ENV
exit $result_error_level

- name: Collect tests code coverage using ctest and gcov/lcov on Linux
if: ${{ matrix.os_name == 'linux' }}
if: ${{ matrix.os_name == 'linux' && (success() || failure()) }}
run: |
set -o pipefail
cmake --build --preset ${{ matrix.build_preset }} --target MethaneTestCoverage 2>&1 | tee $COVERAGE_LOG_FILE

- name: Run all unit-tests from install directory with LCov code coverage on MacOS
- name: Run all unit-tests with LCov code coverage on MacOS
if: ${{ matrix.os_name == 'macosx' }}
working-directory: 'Build/Output/${{ matrix.config_preset }}/Install/Tests'
run: |
set +e
result_error_level=0
result_ext='.xml'
prof_data_ext='.profdata'
prof_raw_ext='.profraw'
lcov_ext='.lcov'
test_results=''
echo Running unit-tests and Converting LLVM code coverage data to lcov text format in directory $PWD
mkdir Results
mkdir Coverage
for test_exe in *Test
do
./$test_exe -r sonarqube -o "Results/$test_exe$result_ext"
echo - $test_exe - completed with $? exit status
last_error_level=$?
echo - $test_exe - completed with $last_error_level exit status
if [ $last_error_level != 0 ]; then
result_error_level=$last_error_level
fi
if [ -f "$PWD/Results/$test_exe$result_ext" ]; then
test_results+="$PWD/Results/$test_exe$result_ext,"
fi
if [ ! -f default.profraw ]; then
continue
fi
Expand All @@ -226,10 +258,14 @@ jobs:
xcrun llvm-cov export -format lcov -instr-profile="$test_exe$prof_data_ext" -arch=x86_64 ./$test_exe > "./Coverage/$test_exe$lcov_ext"
echo - Converted code coverage from "$test_exe$prof_raw_ext" to lcov text format "./Coverage/$test_exe$lcov_ext", $? exit status
done
echo "Test Result Files: $test_results"
echo "test_results=$test_results" >> $GITHUB_ENV
echo List of generated coverage files in directory $PWD/Coverage
ls -la ./Coverage
exit $result_error_level

- name: Generate Code Coverage Reports
if: ${{ success() || failure() }}
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.13
with:
reports: ${{ matrix.tests_coverage_reports }}
Expand All @@ -239,23 +275,26 @@ jobs:
tag: '${{ env.product_ver_major }}.${{ env.product_ver_minor }}.${{ env.product_ver_patch }}.${{ env.product_ver_build }}'

- name: Upload Code Coverage Cobertura Report
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
with:
name: MethaneKit_${{ matrix.name }}_CoverageResults
path: Build/Output/${{ matrix.config_preset }}/Install/Tests/Coverage/Report/Cobertura.xml

- name: Upload Build Log and Code Coverage to Testspace server
if: ${{ always() }}
if: ${{ success() || failure() }}
run: testspace "[ ${{ matrix.name }} ]Build/Output/${{ matrix.config_preset }}/Install/Tests/Coverage/Report/Cobertura.xml" "[ ${{ matrix.name }} ]${{ env.BUILD_LOG_FILE }}"

- name: Upload Code Coverage to CodeCov server
if: ${{ success() || failure() }}
uses: codecov/codecov-action@v3
with:
files: Build/Output/${{ matrix.config_preset }}/Install/Tests/Coverage/Report/Cobertura.xml
flags: unittests,${{ matrix.os_name }}
name: ${{ matrix.name }}

- name: Run Sonar Scanner
if: ${{ success() || failure() }}
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -273,7 +312,7 @@ jobs:
SONAR_SCAN_CMD="$SONAR_SCAN_CMD --define sonar.projectKey=${{ matrix.sonar_project_key }}"
SONAR_SCAN_CMD="$SONAR_SCAN_CMD --define sonar.projectVersion=${{ env.product_ver_major }}.${{ env.product_ver_minor }}.${{ env.product_ver_patch }}.${{ env.product_ver_build }}"
SONAR_SCAN_CMD="$SONAR_SCAN_CMD --define sonar.cfamily.compile-commands=Build/Output/${{ matrix.config_preset }}/Build/compile_commands.json"
SONAR_SCAN_CMD="$SONAR_SCAN_CMD --define sonar.testExecutionReportPaths=$TESTS_DIR/Results/MethaneDataTypesTest.xml,$TESTS_DIR/Results/MethaneDataEventsTest.xml,$TESTS_DIR/Results/MethaneDataRangeSetTest.xml,$TESTS_DIR/Results/MethanePlatformInputTest.xml,$TESTS_DIR/Results/MethaneGraphicsTypesTest.xml,$TESTS_DIR/Results/MethaneGraphicsCameraTest.xml,$TESTS_DIR/Results/MethaneUserInterfaceTypesTest.xml"
SONAR_SCAN_CMD="$SONAR_SCAN_CMD --define sonar.testExecutionReportPaths=${{ env.test_results }}"
SONAR_SCAN_CMD="$SONAR_SCAN_CMD --define sonar.coverageReportPaths=$TESTS_DIR/Coverage/Report/SonarQube.xml"
SONAR_SCAN_CMD="$SONAR_SCAN_CMD --define sonar.scm.revision=${{ github.sha }}"
if [ "${{ github.event_name }}" == "pull_request" ]; then
Expand All @@ -293,13 +332,13 @@ jobs:
done

- name: Archive Scan Artifacts
if: ${{ always() }}
if: ${{ success() || failure() }}
shell: bash
working-directory: Build/Output/${{ matrix.config_preset }}/Install
run: 7z a -t7z -mx=9 MethaneKit_${{ matrix.name }}.7z *

- name: Upload Archived Scan Artifacts
if: ${{ always() }}
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
with:
name: MethaneKit_${{ matrix.name }}_${{ env.product_ver_major }}.${{ env.product_ver_minor }}.${{ env.product_ver_patch }}.${{ env.product_ver_build }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Add PR Comment with Test Results
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ github.event.workflow_run.event == 'pull_request' && steps.test-reporter.outputs.conclusion == 'success' }}
if: ${{ github.event.workflow_run.event == 'pull_request' && steps.test-reporter.outputs.conclusion == 'success' && (success() || failure()) }}
with:
number: ${{ github.event.workflow_run.pull_requests[0].number }}
header: ${{ matrix.name }} Test Results
Expand All @@ -53,7 +53,7 @@ jobs:
- :stopwatch: ${{ steps.test-reporter.outputs.time }} ms. run duration

- name: Add Commit Comment with Test Results
if: ${{ github.event.workflow_run.event == 'push' && steps.test-reporter.outputs.conclusion == 'success' }}
if: ${{ github.event.workflow_run.event == 'push' && steps.test-reporter.outputs.conclusion == 'success' && (success() || failure()) }}
uses: peter-evans/commit-comment@v2
with:
sha: ${{ github.event.workflow_run.head_sha }}
Expand Down
7 changes: 7 additions & 0 deletions .idea/runConfigurations/08_ConsoleCompute.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/runConfigurations/Graphics_RHI_Test.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 17 additions & 16 deletions Apps/02-HelloCube/HelloCubeApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ class HelloCubeApp final // NOSONAR - destructor required
Camera m_camera;

#ifdef UNIFORMS_BUFFER_ENABLED
hlslpp::Uniforms m_shader_uniforms { };
const Rhi::SubResources m_shader_uniforms_subresources{
{ reinterpret_cast<Data::ConstRawPtr>(&m_shader_uniforms), sizeof(hlslpp::Uniforms) } // NOSONAR
hlslpp::Uniforms m_shader_uniforms { };
const Rhi::SubResource m_shader_uniforms_subresource{
reinterpret_cast<Data::ConstRawPtr>(&m_shader_uniforms), // NOSONAR
sizeof(hlslpp::Uniforms)
};
Rhi::BufferSet m_vertex_buffer_set;
#else
Expand Down Expand Up @@ -179,19 +180,19 @@ class HelloCubeApp final // NOSONAR - destructor required
// Create index buffer for cube mesh
m_index_buffer = GetRenderContext().CreateBuffer(Rhi::BufferSettings::ForIndexBuffer(m_cube_mesh.GetIndexDataSize(), GetIndexFormat(m_cube_mesh.GetIndex(0))));
m_index_buffer.SetName("Cube Index Buffer");
m_index_buffer.SetData(
{ { reinterpret_cast<Data::ConstRawPtr>(m_cube_mesh.GetIndices().data()), m_cube_mesh.GetIndexDataSize() } }, // NOSONAR
m_render_cmd_queue
);
m_index_buffer.SetData(m_render_cmd_queue, {
reinterpret_cast<Data::ConstRawPtr>(m_cube_mesh.GetIndices().data()), // NOSONAR
m_cube_mesh.GetIndexDataSize()
});

#ifdef UNIFORMS_BUFFER_ENABLED
// Create constant vertex buffer
Rhi::Buffer vertex_buffer = GetRenderContext().CreateBuffer(Rhi::BufferSettings::ForVertexBuffer(m_cube_mesh.GetVertexDataSize(), m_cube_mesh.GetVertexSize()));
vertex_buffer.SetName("Cube Vertex Buffer");
vertex_buffer.SetData(
{ { reinterpret_cast<Data::ConstRawPtr>(m_cube_mesh.GetVertices().data()), m_cube_mesh.GetVertexDataSize() } }, // NOSONAR
m_render_cmd_queue
);
vertex_buffer.SetData(m_render_cmd_queue, {
reinterpret_cast<Data::ConstRawPtr>(m_cube_mesh.GetVertices().data()), // NOSONAR
m_cube_mesh.GetVertexDataSize()
});
m_vertex_buffer_set = Rhi::BufferSet(Rhi::BufferType::Vertex, { vertex_buffer });

const auto uniforms_data_size = static_cast<Data::Size>(sizeof(m_shader_uniforms));
Expand Down Expand Up @@ -268,13 +269,13 @@ class HelloCubeApp final // NOSONAR - destructor required

#ifdef UNIFORMS_BUFFER_ENABLED
// Update uniforms buffer on GPU and apply model-view-projection transformation in vertex shader on GPU
frame.uniforms_buffer.SetData(m_shader_uniforms_subresources, m_render_cmd_queue);
frame.uniforms_buffer.SetData(m_render_cmd_queue, m_shader_uniforms_subresource);
#else
// Update vertex buffer with vertices in camera's projection view
frame.vertex_buffer_set[0].SetData(
{ { reinterpret_cast<Data::ConstRawPtr>(m_proj_vertices.data()), m_cube_mesh.GetVertexDataSize() } }, // NOSONAR
m_render_cmd_queue
);
frame.vertex_buffer_set[0].SetData(m_render_cmd_queue, {
reinterpret_cast<Data::ConstRawPtr>(m_proj_vertices.data()), // NOSONAR
m_cube_mesh.GetVertexDataSize()
});
#endif

// Issue commands for cube rendering
Expand Down
Loading
Loading