Skip to content

Commit b18334b

Browse files
Fixed shader warning on Xbox for ResolveStencilBuffer.compute (#163)
* fix warning * changelog Co-authored-by: sebastienlagarde <[email protected]>
1 parent 1e8c558 commit b18334b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
539539
- Fixed NaN which can appear with real time reflection and inf value
540540
- Fixed an issue that was collapsing the volume components in the HDRP default settings
541541
- Fixed warning about missing bound decal buffer
542+
- Fixed shader warning on Xbox for ResolveStencilBuffer.compute.
542543

543544
### Changed
544545
- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled

com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ResolveStencilBuffer.compute

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ void KERNEL_NAME(uint3 groupId : SV_GroupID,
7979

8080
#else
8181

82-
bool isFirstThread = WaveIsFirstLane();
82+
// Need to workaround a warning incorrectly triggered when on Xbox One, so instead of using WaveIsFirstLane()
83+
// we check the groupThreadId as in the non intrinsic version.
84+
//bool isFirstThread = WaveIsFirstLane();
85+
bool isFirstThread = groupThreadId.x == 0 && groupThreadId.y == 0;
8386
uint coarseStencilValue = WaveActiveBitOr(resolvedStencil);
8487

8588
#endif

0 commit comments

Comments
 (0)