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

Version 0.5.6: Optimized program bindings, Upload resources with DX COPY queue, Improved automatic resource barriers #84

Merged
merged 71 commits into from
Apr 25, 2021

Conversation

egorodet
Copy link
Member

@egorodet egorodet commented Apr 25, 2021

Methane Kit v0.5 Pre-Release Update 6

  • Samples and tutorials:
    • Asteroids sample optimization with up to 50% FPS increase:
      • Uniforms buffer size was reduced by reusing scene view-projection matrix in shaders (+7% FPS)
      • Uniforms buffer data transfer is made asynchronously with draw commands encoding (+20% FPS)
      • Disabled repeated retaining of the bound resources in command list draw calls (+30% FPS)
      • Disabled automatic resource barriers setup during parallel asteroids rendering to take advantage of automatic state propagation from Common state.
      • Got rid of excessive program binding calls in DirectX as a result of using Frame-Constant argument accessors in program bindings.
  • Graphics libraries:
    • Program binding improvements:
      • Program::Argument and Program::ArgumentAccessor (previously Program::ArgumentDesc) were refactored from struct to class style with field accesor functions. Program::Argument::Modifiers bit-mask was replaced with Program::ArgumentAccessor::Type enum.
      • New program argument accessor type was added for frame-constant arguments Program::ArgumentAccessor::Type::FrameConstant to reduce number of excessive argument binding setup calls. Frame-constant bindings are properly supported by DX descriptor table layout.
      • Frame-buffer index was added to ProgramBindings::Create function as an optional argument to support frame-constant bindings.
      • Applying of DirectX resource states and root parameter bindings was reworked in ProgramBindingsDX.
    • Resource upload and state synchronization improvements:
      • COPY comamnd queue is now used by default for BlitCommandList execution in DirectX (instead of DIRECT command queue used before). So the resources upload is also done with a COPY queue in DX now. It can be switched back to using DIRECT queue with RenderContext::Settings::options_mask bit-mask flag Context::Options::BlitWithDirectQueueOnWindows.
      • Resource::SetData method is extended with an optional argument of command queue for resource state synchronization. Command queue where resource is actually used should be passed whenever possible.
      • Resource barriers setup was moved from the Resource::SetData method implementations to the SetProgramBindings, SetVertexBuffer and SetIndexBuffer calls, while setup resource barriers are still cached inside Resource object.
      • Resource::State and Resource::Barriers types were moved to the public header files and split from Resource interface definition.
    • CommandKit interface was added to Graphics Core to provide unified access from Context::GetDefaultCommandKit to the command queue, command lists, command list set and synchronization fences made for working together with the same CommandList::Type. This interface allowed to replace methods Context::GetUploadCommandQueue, Context::GetUploadCommandList, Context::GetUploadCommandListSet and RenderContext::GetRenderCommandQueue with Context::GetDefaultCommandKit.
    • CommandList changes:
      • CommandList::SetResourceBarriers(...) call was added to the public interface (was private before).
    • RenderCommandList changes:
      • RenderCommandList::SetIndexBuffers method was adedd, index buffer is now set separately from DrawIndexed call.
      • RenderCommandList::Set[Index|Vertex]Buffers methods were exnteded with an optional argument which allows to disable setting resource barriers automatically.
    • ParallelRenderCommandList changes:
      • Child render command lists are now committed in parallel.
    • ImageLoader not initializes texture names inside Load functions.
    • Fixed const correctness for Device and Context references passed to core interface factory functions.
  • Common changes:
    • Debug logging was extended for resource barriers synchronization, render and view state parameters and cleaned up with fixes of some issues: properly used magic_enum, removed manual enum to string conversion functions, fixed logs formatting.
    • Fixed all new static analysis issues from SonarCloud.
  • External libraries:
    • HLSL++ library was updated to v3.0
    • CLI11 library was updated
    • Catch2 library was updated to v2.13.5
    • IttApi library was updated
    • TaskFlow library was updated to v3.1.0
    • Tracy was updated to v0.7.7
  • Build Infrastructure:
    • CodeQL static analysis was enabled with GitHub Actions workflow and results available in Security tab on repository page.
    • GitPod was switched to VSCode UI and extensions were updated.
    • CMake profiles were added for CLion 2021.

…f SetGraphicsRootDescriptor calls in Asteroids (step-1)
…ing scene view-projection matrix in shaders (+7% FPS)
- properly use magic_enum,
- remove manual enum to string conversion functions,
- initialize texture names inside image loader
- fix logs formatting
…to the command list where resources are set to pipeline
…Direct queue before resources upload in Copy queue
@egorodet egorodet added enhancement New feature or request refactoring Code refactoring without adding new functionality labels Apr 25, 2021
@egorodet egorodet added this to the v0.5 milestone Apr 25, 2021
@egorodet egorodet self-assigned this Apr 25, 2021
@gitpod-io
Copy link

gitpod-io bot commented Apr 25, 2021

@egorodet egorodet changed the title Version 0.5.6: Optimized program bindings, Upload resources with DX COPY queue, improved automatic resource barriers Version 0.5.6: Optimized program bindings, Upload resources with DX COPY queue, Improved automatic resource barriers Apr 25, 2021
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 25, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

1.5% 1.5% Coverage
0.3% 0.3% Duplication

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 25, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.5% 0.5% Coverage
0.3% 0.3% Duplication

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

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

0.4% 0.4% Coverage
0.3% 0.3% Duplication

@egorodet egorodet merged commit 167152a into master Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Code refactoring without adding new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant