Skip to content

Commit

Permalink
Fix some burst warnings for player creation on latest trunk (#6263)
Browse files Browse the repository at this point in the history
  • Loading branch information
kecho authored and sebastienlagarde committed Nov 10, 2021
1 parent abe3bca commit 937ab33
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Unity.Burst.CompilerServices;

namespace UnityEngine.Rendering.HighDefinition
{
Expand Down Expand Up @@ -105,6 +106,10 @@ public enum DebugLightLayersMask

static class DebugLightHierarchyExtensions
{

#if DEBUG
[IgnoreWarning(1370)] //Ignore throwing exception warning on burst..
#endif
public static bool IsEnabledFor(
this DebugLightFilterMode mode,
GPULightType gpuLightType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Unity.Jobs;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Burst.CompilerServices;
using System.Threading;

namespace UnityEngine.Rendering.HighDefinition
Expand Down Expand Up @@ -123,6 +124,9 @@ internal struct CreateGpuLightDataJob : IJobParallelFor
public NativeArray<int> gpuLightCounters;
#endregion

#if DEBUG
[IgnoreWarning(1370)] //Ignore throwing exception warning.
#endif
private ref HDLightRenderData GetLightData(int dataIndex)
{
#if DEBUG
Expand Down Expand Up @@ -336,6 +340,9 @@ public static void ConvertLightToGPUFormat(
}
}

#if DEBUG
[IgnoreWarning(1370)] //Ignore throwing exception warning.
#endif
private void StoreAndConvertLightToGPUFormat(
int outputIndex, int lightIndex,
LightCategory lightCategory, GPULightType gpuLightType, LightVolumeType lightVolumeType)
Expand Down Expand Up @@ -386,6 +393,9 @@ private void StoreAndConvertLightToGPUFormat(
lights[outputIndex] = lightData;
}

#if DEBUG
[IgnoreWarning(1370)] //Ignore throwing exception warning.
#endif
private void ComputeLightVolumeDataAndBound(
LightCategory lightCategory, GPULightType gpuLightType, LightVolumeType lightVolumeType,
in VisibleLight light, in LightData lightData, in Vector3 lightDimensions, in Matrix4x4 worldToView, int outputIndex)
Expand Down Expand Up @@ -568,6 +578,9 @@ private void ComputeLightVolumeDataAndBound(
}


#if DEBUG
[IgnoreWarning(1370)] //Ignore throwing exception warning.
#endif
private void ConvertDirectionalLightToGPUFormat(
int outputIndex, int lightIndex, LightCategory lightCategory, GPULightType gpuLightType, LightVolumeType lightVolumeType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Unity.Mathematics;
using System.Threading;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Burst.CompilerServices;

namespace UnityEngine.Rendering.HighDefinition
{
Expand Down Expand Up @@ -216,6 +217,9 @@ private HDProcessedVisibleLightsBuilder.ShadowMapFlags EvaluateShadowState(
return flags;
}

#if DEBUG
[IgnoreWarning(1370)] //Ignore throwing exception warning.
#endif
private ref HDLightRenderData GetLightData(int dataIndex)
{
#if DEBUG
Expand All @@ -229,6 +233,9 @@ private ref HDLightRenderData GetLightData(int dataIndex)
}
}

#if DEBUG
[IgnoreWarning(1370)] //Ignore throwing exception warning.
#endif
public void Execute(int index)
{
VisibleLight visibleLight = visibleLights[index];
Expand Down

0 comments on commit 937ab33

Please sign in to comment.