Skip to content

Fix some burst warnings for player creation on latest trunk #6263

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 1 commit into from
Nov 9, 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
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