Skip to content

Commit ebfd28f

Browse files
brendan-duncanEvergreen
authored andcommitted
Platform/webgpu/dev
https://jira.unity3d.com/browse/PLATGRAPH-3354 Fix memory crash with SRP Batcher when the mesh has multiple parts. https://jira.unity3d.com/browse/PLATGRAPH-3353 Multisample depth textures cause URP CopyDepth to error. https://jira.unity3d.com/browse/PLATGRAPH-3355 Fix to enable GPU Resident Drawing: instancing and culling.
1 parent dc5c7e4 commit ebfd28f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Packages/com.unity.render-pipelines.core/Runtime/RenderPipelineResources/GPUDriven/OccluderDepthPyramidKernels.compute

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ RW_TEXTURE2D(float, _DstDepth);
1515
#ifdef USE_SRC
1616
#ifdef SRC_IS_MSAA
1717
#ifdef SRC_IS_ARRAY
18-
Texture2DMSArray<float> _SrcDepth;
18+
#ifndef SHADER_API_WEBGPU // Texture2DMSArray is not supported by WebGPU
19+
Texture2DMSArray<float> _SrcDepth;
20+
#endif
1921
#else
2022
Texture2DMS<float> _SrcDepth;
2123
#endif
@@ -33,7 +35,11 @@ float LoadDepth(int2 coord, int srcSliceIndex)
3335
#ifdef USE_SRC
3436
#ifdef SRC_IS_MSAA
3537
#ifdef SRC_IS_ARRAY
36-
return LOAD_TEXTURE2D_ARRAY_MSAA(_SrcDepth, coord, srcSliceIndex, 0).x;
38+
#ifdef SHADER_API_WEBGPU // Texture2DMSArray is not supported by WebGPU
39+
return 0.0;
40+
#else
41+
return LOAD_TEXTURE2D_ARRAY_MSAA(_SrcDepth, coord, srcSliceIndex, 0).x;
42+
#endif
3743
#else
3844
return LOAD_TEXTURE2D_MSAA(_SrcDepth, coord, 0).x;
3945
#endif

Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#ifndef HAVE_VFX_MODIFICATION
55
#pragma multi_compile _ DOTS_INSTANCING_ON
6-
#if UNITY_PLATFORM_ANDROID || UNITY_PLATFORM_WEBGL || UNITY_PLATFORM_UWP
6+
#if UNITY_PLATFORM_ANDROID || (UNITY_PLATFORM_WEBGL && !SHADER_API_WEBGPU) || UNITY_PLATFORM_UWP
77
#pragma target 3.5 DOTS_INSTANCING_ON
88
#else
99
#pragma target 4.5 DOTS_INSTANCING_ON

0 commit comments

Comments
 (0)