Skip to content

Commit ee24fe8

Browse files
Internal/6000.2/staging
Internal/6000.2/staging
2 parents 385e672 + fb56b49 commit ee24fe8

File tree

33 files changed

+216
-182
lines changed

33 files changed

+216
-182
lines changed

Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public int selectedPanel
3030
get => Mathf.Max(0, DebugManager.instance.PanelIndex(selectedPanelDisplayName));
3131
set
3232
{
33-
var displayName = DebugManager.instance.PanelDiplayName(value);
33+
var displayName = DebugManager.instance.PanelDisplayName(value);
3434
if (!string.IsNullOrEmpty(displayName))
3535
selectedPanelDisplayName = displayName;
3636
}

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeLightingTab.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ void BakingGUI()
361361
activeSet = newSet;
362362

363363
ProbeReferenceVolume.instance.Clear();
364+
ProbeReferenceVolume.instance.SetActiveBakingSet(newSet);
364365
}
365366

366367
if (activeSet != null)

Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsUI.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ private void Reset()
3232
/// <param name="settings"><see cref="IDebugDisplaySettings"/> to be registered</param>
3333
public void RegisterDebug(IDebugDisplaySettings settings)
3434
{
35+
#if UNITY_EDITOR
36+
if (UnityEditor.BuildPipeline.isBuildingPlayer)
37+
return;
38+
#endif
3539
DebugManager debugManager = DebugManager.instance;
3640
List<IDebugDisplaySettingsPanelDisposable> panels = new List<IDebugDisplaySettingsPanelDisposable>();
3741

Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugManager.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,24 @@ public int PanelIndex([DisallowNull] string displayName)
297297
return -1;
298298
}
299299

300+
301+
/// <summary>
302+
/// Returns the panel display name
303+
/// </summary>
304+
/// <param name="panelIndex">The panelIndex for the panel to get the name</param>
305+
/// <returns>The display name of the panel, or empty string otherwise</returns>
306+
[Obsolete("Method is obsolete. Use PanelDisplayName instead. #from(6000.4) (UnityUpgradable) -> PanelDisplayName", true)]
307+
public string PanelDiplayName(int panelIndex)
308+
{
309+
return PanelDisplayName(panelIndex);
310+
}
311+
300312
/// <summary>
301313
/// Returns the panel display name
302314
/// </summary>
303315
/// <param name="panelIndex">The panelIndex for the panel to get the name</param>
304316
/// <returns>The display name of the panel, or empty string otherwise</returns>
305-
public string PanelDiplayName([DisallowNull] int panelIndex)
317+
public string PanelDisplayName(int panelIndex)
306318
{
307319
if (panelIndex < 0 || panelIndex > m_Panels.Count - 1)
308320
return string.Empty;

Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,7 @@ IEnumerable<Camera> cameras
574574

575575
if (camera.cameraType != CameraType.Preview && camera.cameraType != CameraType.Reflection)
576576
{
577-
if (!camera.TryGetComponent<IAdditionalData>(out var additionalData))
578-
Debug.LogWarning($"Camera {camera.name} does not contain an additional camera data component. Open the Game Object in the inspector to add additional camera data.");
579-
else
577+
if (camera.TryGetComponent<IAdditionalData>(out _))
580578
m_Cameras.Add(camera);
581579
}
582580
}

Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolume.hlsl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ struct APVResources
7777

7878
struct APVResourcesRW
7979
{
80+
#ifdef SHADER_API_METAL
81+
// We need to use float4 on Metal, since HLSLcc will generate invalid MSL otherwise.
82+
// See https://jira.unity3d.com/browse/UUM-127198
83+
RWTexture3D<float4> L0_L1Rx;
84+
#else
8085
RWTexture3D<half4> L0_L1Rx;
86+
#endif
8187
RWTexture3D<unorm float4> L1G_L1Ry;
8288
RWTexture3D<unorm float4> L1B_L1Rz;
8389
RWTexture3D<unorm float4> L2_0;

Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeBlendStates.compute

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ Texture3D<float4> _State1_L0_L1Rx;
1515
Texture3D<float4> _State1_L1G_L1Ry;
1616
Texture3D<float4> _State1_L1B_L1Rz;
1717

18+
#ifdef SHADER_API_METAL
19+
// We need to use float4 on Metal, since HLSLcc will generate invalid MSL otherwise.
20+
// See https://jira.unity3d.com/browse/UUM-127198
21+
RWTexture3D<float4> _Out_L0_L1Rx;
22+
#else
1823
RWTexture3D<half4> _Out_L0_L1Rx;
24+
#endif
1925
RWTexture3D<unorm float4> _Out_L1G_L1Ry;
2026
RWTexture3D<unorm float4> _Out_L1B_L1Rz;
2127

Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeUploadData.compute

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
#pragma multi_compile_local _ PROBE_VOLUMES_SKY_SHADING_DIRECTION
1010
#pragma multi_compile_local _ PROBE_VOLUMES_PROBE_OCCLUSION
1111

12+
#ifdef SHADER_API_METAL
13+
// We need to use float4 on Metal, since HLSLcc will generate invalid MSL otherwise.
14+
// See https://jira.unity3d.com/browse/UUM-127198
15+
RWTexture3D<float4> _Out_L0_L1Rx;
16+
#else
1217
RWTexture3D<half4> _Out_L0_L1Rx;
18+
#endif
1319
RWTexture3D<unorm float4> _Out_L1G_L1Ry;
1420
RWTexture3D<unorm float4> _Out_L1B_L1Rz;
1521

Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,6 +2125,11 @@ void UnregisterRenderingDebug()
21252125

21262126
internal void RegisterDebug()
21272127
{
2128+
#if UNITY_EDITOR
2129+
if (UnityEditor.BuildPipeline.isBuildingPlayer)
2130+
return;
2131+
#endif
2132+
21282133
RegisterMaterialDebug();
21292134
RegisterLightingDebug();
21302135
RegisterRenderingDebug();
@@ -2142,6 +2147,9 @@ internal void UnregisterDebug()
21422147

21432148
void UnregisterDebugItems(string panelName, DebugUI.Widget[] items)
21442149
{
2150+
if (items == null || items.Length == 0)
2151+
return;
2152+
21452153
var panel = DebugManager.instance.GetPanel(panelName);
21462154
if (panel != null)
21472155
panel.children.Remove(items);

Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/NVIDIADebugView.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ String resToString(uint a, uint b)
253253

254254
private void UpdateDebugUITable()
255255
{
256+
if (m_DlssViewStateTableRows == null)
257+
return;
258+
256259
for (int r = 0; r < m_DlssViewStateTableRows.Length; ++r)
257260
{
258261
var d = m_Data.dlssFeatureInfos[r].data;

0 commit comments

Comments
 (0)