Skip to content

Commit 87c680e

Browse files
Fix issue with 0-sized dispatch with extremely low resolutions (#5272)
* Ceil to int instead. * changelog
1 parent 556b0b3 commit 87c680e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
344344
- Fixed issue when switching between non-persistent cameras when path tarcing is enabled (case 1337843).
345345
- Fixed issue with the LayerMaskParameter class storing an erroneous mask value (case 1345515).
346346
- Fixed issue with vertex color defaulting to 0.0 when not defined, in ray/path tracing (case 1348821).
347+
- Fix issue with a compute dispatch being with 0 threads on extremely small resolutions.
347348

348349
### Changed
349350
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard

com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricLighting.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,8 @@ TextureHandle GenerateMaxZPass(RenderGraph renderGraph, HDCamera hdCamera, Textu
516516
ctx.cmd.SetComputeVectorParam(cs, HDShaderIDs._SrcOffsetAndLimit, srcLimitAndDepthOffset);
517517
ctx.cmd.SetComputeFloatParam(cs, HDShaderIDs._DilationWidth, data.dilationWidth);
518518

519-
int finalMaskW = maskW / 2;
520-
int finalMaskH = maskH / 2;
519+
int finalMaskW = Mathf.CeilToInt(maskW / 2.0f);
520+
int finalMaskH = Mathf.CeilToInt(maskH / 2.0f);
521521

522522
dispatchX = HDUtils.DivRoundUp(finalMaskW, 8);
523523
dispatchY = HDUtils.DivRoundUp(finalMaskH, 8);

0 commit comments

Comments
 (0)