GithubHelp home page GithubHelp logo

Comments (3)

bugsweeper avatar bugsweeper commented on September 27, 2024 1

As described in wgpu::Device::limits

The limits which can be used on this device.

No better limits can be used, even if the underlying adapter can support them.

That is why you should ask your device what best limit you can use, and don't expect device would process unsupportable limits.
I think you could ask that limits by code like:

fn main() {
    let mut app = App::new();
    app.add_plugins(DefaultPlugins);
    if let Some(render_app) = app.get_sub_app_mut(RenderApp) {
        render_app.add_systems(ExtractSchedule, print_limits);
    };
    app.run();
}

fn print_limits(render_device: Res<RenderDevice>) {
    info!("{:?}", render_device.limits());
}

For example I got

Limits { ...
max_compute_workgroup_storage_size: 49152, max_compute_invocations_per_workgroup: 1024, 
max_compute_workgroup_size_x: 1024, max_compute_workgroup_size_y: 1024, 
max_compute_workgroup_size_z: 64, max_compute_workgroups_per_dimension: 65535
...}

For your case key value is max_compute_invocations_per_workgroup
Then you can dynamicaly use discovered limits in runtime with dispatch_workgroups

from bevy.

bugsweeper avatar bugsweeper commented on September 27, 2024 1
  1. why is it so low for this case?

I looked at source, looks like it is result from DirectX API call "D3D12CreateDevice" which fills limits. I can't debug it for you to figure out better because i'm linux user. I hope you will find out and write results of investigation here.

from bevy.

00alia00 avatar 00alia00 commented on September 27, 2024

Thanks for looking at this!

Maybe I am misunderstanding, but in every other engine (unity/unreal/various c# engines) on this hardware ive used 32,32,1 its been fine. I guess the question then becomes..

  1. why is it so low for this case?
  2. where are these limits from if not the underlying hardware?
  3. whats the point of being able to specifiy the limits if its ignored?

I'll try printing it out when I get a few mins.

from bevy.

Related Issues (20)

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.