Skip to content

Fix issue with 0-sized dispatch with extremely low resolutions #5272

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

Merged
merged 2 commits into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed issue when switching between non-persistent cameras when path tarcing is enabled (case 1337843).
- Fixed issue with the LayerMaskParameter class storing an erroneous mask value (case 1345515).
- Fixed issue with vertex color defaulting to 0.0 when not defined, in ray/path tracing (case 1348821).
- Fix issue with a compute dispatch being with 0 threads on extremely small resolutions.

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@ TextureHandle GenerateMaxZPass(RenderGraph renderGraph, HDCamera hdCamera, Textu
ctx.cmd.SetComputeVectorParam(cs, HDShaderIDs._SrcOffsetAndLimit, srcLimitAndDepthOffset);
ctx.cmd.SetComputeFloatParam(cs, HDShaderIDs._DilationWidth, data.dilationWidth);

int finalMaskW = maskW / 2;
int finalMaskH = maskH / 2;
int finalMaskW = Mathf.CeilToInt(maskW / 2.0f);
int finalMaskH = Mathf.CeilToInt(maskH / 2.0f);

dispatchX = HDUtils.DivRoundUp(finalMaskW, 8);
dispatchY = HDUtils.DivRoundUp(finalMaskH, 8);
Expand Down