Conversation
Co-authored-by: Inner Daemons <magnus.larsson.mn@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
* Initial commit adding miscellaneous changes from msl-write and hlsl-write * Same as previous commit * Fixed divergence issue * Removed some unnecessary barriers * Zero init workgroup memory * Added limits validation * Added changelog * Handled overflow, removed todo * Lets see if this fixes llvmpipe * Also this commit fixes llvmpipe maybe * Unfortunate but not too unexpected at this point * Updated feature to say to use ShaderRuntimeChecks::unchecked() * Updated snapshots and took some changes from the hlsl writer * Snapshots * 2 quick tweaks * Updated framework with suggestions by Connor in #8752 * Moved the task runtime limits into naga::back * Fixed soem stuff * Fixed checks: >= into > * Cant believe I forgot this * Removed code using u64 to check stuff * Removed thing with limiting it to 2<<21 * Some more work * Fixed compiles * Added new field to spv options * Updated some stuff to pass around the task runtime limits in more ways * New PR started * Did another quick fix * Another quick fix * Added changelog entry * Added some explanation docs * Fixed a warning * Fixed shader * Fixed some things & added docs * Reverted dxc thing * Fixed thing * Refactored to TaskDispatchLimits * Fixed compile error
Wumpf
left a comment
There was a problem hiding this comment.
still needs some final touches!
|
@Wumpf Ok I'll address these soon-ish, plus I'll fix up the MSL writer PR which probably has many of the same problems. Thanks for the quick review! |
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Andreas Reich <r_andreas2@web.de>
|
@Wumpf Comments addressed |
|
@Wumpf I believe this will expose an issue that will impact Firefox significantly, so don't merge it until that's fixed. Same goes for the MSL PR (though I'm not sure its as singificant in MSL). |
|
Alright lets block this on #9099 |
Wumpf
left a comment
There was a problem hiding this comment.
nice, thanks for addressing all these
| > **NOTE**: More limits will be added when support is added to `naga`. | ||
|
|
||
| * `Limits::max_task_workgroup_total_count` - the maximum total number of workgroups from a `draw_mesh_tasks` command or similar. The dimensions passed must be less than or equal to this limit when multiplied together. | ||
| * `Limits::max_task_workgroups_per_dimension` - the maximum for each of the 3 workgroup dimensions in a `draw_mesh_tasks` command. Each dimension passed must be less than or equal to this limit. | ||
| * `max_mesh_multiview_count` - The maximum number of views used when multiview rendering with a mesh shader pipeline. | ||
| * `Limits::max_task_mesh_workgroup_total_count` - the maximum total number of workgroups from a `draw_mesh_tasks` command or similar. The dimensions passed must be less than or equal to this limit when multiplied together. | ||
| * `Limits::max_task_mesh_workgroups_per_dimension` - the maximum for each of the 3 workgroup dimensions in a `draw_mesh_tasks` command. Each dimension passed must be less than or equal to this limit. | ||
| * `max_task_invocations_per_workgroup` - The maximum total number of threads in a task shader workgroup, given by `workgroupSize.x * workgroupSize.y * workgroupSize.z`. | ||
| * `max_task_invocations_per_dimension` the maximum value for each of `workgroupSize.x`, `workgroupSize.y` and `workgroupSize.z` in task shader workgroups. | ||
| * `max_mesh_invocations_per_workgroup` - The maximum total number of threads in a mesh shader workgroup, given by `workgroupSize.x * workgroupSize.y * workgroupSize.z`. | ||
| * `max_mesh_invocations_per_dimension` the maximum value for each of `workgroupSize.x`, `workgroupSize.y` and `workgroupSize.z` in mesh shader workgroups. | ||
| * `max_task_payload_size` - the size of an `var<task_payload>` variable, in bytes. | ||
| * `max_mesh_output_vertices` - the maximum number of vertices that a single mesh shader workgroup may output. | ||
| * `max_mesh_output_primitives` - the maximum number of primitives that a single mesh shader workgroup may output. | ||
| * `max_mesh_multiview_count` - the maximum number of views used when multiview rendering with a mesh shader pipeline. |
There was a problem hiding this comment.
nice! But I suppose the "more limits will be added" bit is obsolete now?
There was a problem hiding this comment.
So the MSL writer PR adds 1 more limit, once we get this merged and I handle the changes from this in the MSL PR then we can remove that.
Connections
Part of #7197
Closes #7219
Related to #8739
Depends on #8756
Description
Adds support for mesh shaders to HLSL writer. There still exist some things to do:
Testing
Existing tests, snapshots
Squash or Rebase?
Squash
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.