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

Conversation

egorodet
Copy link
Member

@egorodet egorodet commented May 28, 2023

Tutorial applications

  • Console Compute tutorial was added to demonstrate GPU compute pipeline on Conway's Game of Life example implemented in pure-console application with FTXUI library.

Graphics libraries

  • New Graphics RHI classes were added to support compute pipeline (close Compute pipeline support #8):
    • ComputeContext
    • ComputeCommandList
    • ComputeState
  • Added ShaderType::Compute shader type support.
  • Added CommandListType::Compute support in CommandQueue.
  • Added DeviceCaps::compute_queues_count.
  • Added Unordered Access View support for read and write texture data from shader.
  • Added Texture and Buffer read-back support via GetData methods.
  • Removed common GetData and SetData methods from base interface IResource in favour of separate methods added in the derived IBuffer and ITexture interfaces to differentiate argument types and get rid of unwanted methods in ISampler interface.
  • IResource methods GetSubresourceCount and GetSubresourceDataSize methods from were moved to ITexture interface.
  • Fixed some DirectX and Vulkan validation warnings.

User Interface

  • Fix rare crash on text mesh update.

Data libraries

  • FpsCounter interface and implementation was moved from Graphics/RHI to Data/Primitives to allow using it independently from RHI RenderContext.
  • Enable Chunk copy and move constructors and operators.

Tests

  • Initial unit-tests were added for "Graphics RHI" layer, implemented using "Null RHI" backed (continue Add Graphics RHI unit tests #122):
    • Shader Test
    • Sampler Test
    • Fence Test
    • CommandQueue Test
    • ComputeState Test
    • Texture Test
    • ProgramBindings Test
    • TransferCommandList Test
    • Program Test
    • ComputeContext Test
    • Buffer Test
    • ComputeCommandList Test

External libraries

Build

  • Cleaned up root CMakeLists.txt
  • Build with new Xcode 14.3 was supported by rewriting deprecated functions which were removed.
  • Apple deployment target versions were bumped to use new shader reflections API:
    • MacOS 10.15 -> 13.0
    • iOS 15.0 -> 16.0

Continuous Integration

  • Fixed reporting of failed unit tests: previously builds were terminating on any test failure, now builds are still failing by unit-tests but they perform all reporting operations.
  • Sonar-scan build is now automatically finding all test result xml files.
  • Added CodeCove components.

Documentation

  • ReadME documentation was added for "Console Compute" tutorial.
  • Update code in other tutorials documentation to reflect changes in Resource, Buffer and Texture methods.

…ompatibility check, fix Vulkan compute device creation
@egorodet egorodet added enhancement New feature or request testing Tests automation labels May 28, 2023
@egorodet egorodet added this to the v0.7 milestone May 28, 2023
@egorodet egorodet self-assigned this May 28, 2023
@codecov
Copy link

codecov bot commented May 28, 2023

Codecov Report

Patch coverage: 57.81% and project coverage change: -0.08 ⚠️

Comparison is base (499d420) 29.98% compared to head (0afb15f) 29.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
- Coverage   29.98%   29.89%   -0.08%     
==========================================
  Files         393      375      -18     
  Lines       23370    18455    -4915     
  Branches     1979     1075     -904     
==========================================
- Hits         7004     5516    -1488     
+ Misses      16225    12762    -3463     
- Partials      141      177      +36     
Flag Coverage Δ
linux 23.64% <50.44%> (-1.61%) ⬇️
macosx 48.80% <68.30%> (+4.30%) ⬆️
unittests 29.89% <57.81%> (-0.08%) ⬇️
windows 53.00% <74.58%> (+27.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...mon/Instrumentation/Sources/Methane/ScopeTimer.cpp 0.00% <ø> (ø)
.../Data/Primitives/Include/Methane/Data/FpsCounter.h 100.00% <ø> (ø)
...Data/Primitives/Include/Methane/Data/IFpsCounter.h 35.72% <ø> (ø)
...ata/Primitives/Sources/Methane/Data/FpsCounter.cpp 0.00% <ø> (ø)
...ta/Primitives/Sources/Methane/Data/IFpsCounter.cpp 0.00% <ø> (ø)
.../Graphics/App/Sources/Methane/Graphics/AppBase.cpp 0.00% <0.00%> (ø)
...rimitives/Include/Methane/Graphics/MeshBuffers.hpp 0.00% <0.00%> (ø)
...rimitives/Sources/Methane/Graphics/ImageLoader.cpp 0.00% <0.00%> (ø)
...tives/Sources/Methane/Graphics/MeshBuffersBase.cpp 0.00% <0.00%> (ø)
...Primitives/Sources/Methane/Graphics/ScreenQuad.cpp 0.00% <0.00%> (ø)
... and 105 more

... and 84 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sonarcloud
Copy link

sonarcloud bot commented May 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

41.8% 41.8% Coverage
2.0% 2.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented May 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

39.5% 39.5% Coverage
2.0% 2.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented May 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

52.8% 52.8% Coverage
2.0% 2.0% Duplication

@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Health
Default 51% 21%
Summary 51% (12688 / 24964) 21% (3624 / 17168)

@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Health
Default 38% 100%
Summary 38% (7679 / 20087) 100% (0 / 0)

@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Health
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneDataEventsTest.exe 95% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneDataRangeSetTest.exe 91% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneDataTypesTest.exe 98% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneGraphicsCameraTest.exe 61% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneGraphicsRhiTest.exe 43% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneGraphicsTypesTest.exe 98% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethanePlatformInputTest.exe 43% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneUserInterfaceTypesTest.exe 9% 100%
Summary 34% (4497 / 13281) 100% (0 / 0)

@github-actions
Copy link

Win64_VK_Release Test Results

  • ✅ 3125 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 988 ms. run duration

@github-actions
Copy link

Win32_VK_Release Test Results

  • ✅ 3125 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 952 ms. run duration

@github-actions
Copy link

Ubuntu_VK_Release Test Results

  • ✅ 3126 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 14136 ms. run duration

@github-actions
Copy link

Win32_DX_Release Test Results

  • ✅ 3125 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 982 ms. run duration

@github-actions
Copy link

Win64_DX_Release Test Results

  • ✅ 3125 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 999 ms. run duration

@github-actions
Copy link

MacOS_MTL_Release Test Results

  • ✅ 3125 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 977 ms. run duration

@egorodet egorodet merged commit 4299e05 into master May 30, 2023
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing Tests automation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Compute pipeline support
2 participants