GithubHelp home page GithubHelp logo

aquarium-test's People

Contributors

bjjones avatar jiangyizhou avatar jiawei-shao avatar shaoboyan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aquarium-test's Issues

Feature: Allow Individual Draws

In order to further stress the Dawn backend, we should increase the number of Draw() calls. Currently DrawIndexed() is used to draw many instances at once. Using DrawIndexed() in this case is optimal - however, by instead calling Draw() many times, we can better emulate a modern graphics application.

I suggest that in models that have high instance counts (particularly FishModel), a separate path that uses Draw() instead of DrawIndexed() should be available. A command line parameter can be added that will switch the path on. Perhaps --allowIndividualDraws?

Meta: Aquarium Improvement Tracking

This is a meta issue to track progress for Aquarium improvements, When complete, the workload will be better suited to show backend optimizations.

Items to be completed (in no specific order):

  • #3 Remove FishPers hardcoded values
  • #4 Optimize Mipmap Generation
  • #5 Share lightFactorUniforms Between Like Models
  • #6 Share viewUniforms Globally
  • #7 Eliminate Redundant FishVertexUniforms Updates
  • #8 Eliminate Unnecessary DrawIndexed Calls
  • #9 Implement Individual Draws Option
  • #11 Add MSAA Functionality

Aquarium Workload Analysis.pdf

Implement MSAA

We should implement MSAA functionality soon. What is the blocking factor here? Is it lack of Vulkan/Dawn MSAA support?

Eliminate Unnecessary DrawIndexed Calls

Currently, DrawIndexed() is used to draw InnerModel, OuterModel, and one instance of GenericModel where drawn instances is 1 . There is an overhead associated with DrawIndexed() that is unnecessary and could be eliminated by using Draw() instead.

I also see an instance of GenericModel where drawn instances is 0. In this case, we should not draw at all.

Share lightFactorUniforms When Possible

In order to reduce memory, we should eliminate redundant buffers. For multiple models, there are multiple instances created with their own lightFactorUniforms buffer. These separate instances use the same data for lightFactorUniforms, so we should instead share a buffer between all instances of the same model.

This is valid for:

  1. GenericModel
  2. FishModel
  3. SeaweedModel

Add individual draw path to native d3d12 backend

To simulate lots of rendering meshes of modern games, individual draw path is required to draw every fish one by one.
We can try two methods of d3d12 to implement this path, and compare the performance,

  1. SetGraphicsRootConstantBufferView
  2. dynamic indexing and root constant

Remove hardcoded values for FishPers

FishPers data should be created based on the number of fish in the scene. There are 3 instances where it is hardcoded to 100,000:

  1. Creation of fishPersBuffer on GPU FishModelDawn.cpp:41
  2. Update of buffer on GPU FishModelDawn.cpp:154
  3. Struct definition FishModelDawn.h:65

Shaderc warning error

Shaderc has extra-semicolon warning which will trigger warning error when build aquarium.

Optimize Mip Generation

Aquarium currently suffers from a very long startup time. The largest contributor to this is mipmap generation for all textures. Currently this occurs single threaded on the CPU. The ideal solution would be to upload each full texture to the GPU and use a compute shader to generate mipmaps.

Implement Debug/Release Builds

Currently Dawn is getting built as debug which causes backend debug validation layers to be enabled. We should be able to switch between release and debug builds.

Perhaps out/debug and out/release instead of a single out/build?

Share viewUniforms Globally

The function updateGlobalUniforms() generates the scene's common position values and are pushed to a individual models and then update every frame. Instead, we could eliminate many CPU->GPU copies by only updating these values on the GPU one time and then sharing between all models.

The models currently updating a separate copy of viewUniforms every frame are:

  1. FishModel
  2. GenericModel
  3. InnerModel
  4. OutsideModel
  5. SeaweedModel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.