Skip to content
Open
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
2 changes: 1 addition & 1 deletion Explorer/Assets/DCL/Input/UnityInputSystem/DCLInput.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.17.0
// version 1.19.0
// from Assets/DCL/Input/UnityInputSystem/DCLInput.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Expand Down
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
using ECS;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;

namespace DCL.Rendering.GPUInstancing
{
public partial class GPUInstancingRenderFeature
{
public class GPUInstancingRenderPass : ScriptableRenderPass
{
private const string PROFILER_TAG = "_DCL.GPUInstancingRenderPass";

private GPUInstancingService instancingService;
private IRealmData realmData;

public GPUInstancingRenderPass(GPUInstancingService service)
{
this.instancingService = service;
}

public void SetService(GPUInstancingService service, IRealmData realmData)
{
instancingService = service;
this.realmData = realmData;
}

// Called before executing the render pass.
public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
{
// Configure camera targets, if needed
}

// The actual execution of the pass
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
{
if(instancingService == null || !realmData.Configured) return;

CommandBuffer cmd = CommandBufferPool.Get(PROFILER_TAG);

try
{
instancingService.RenderIndirect();
}
finally
{
context.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);
}
}

// Called after executing the render pass, if needed
public override void OnCameraCleanup(CommandBuffer cmd) { }

/// Cleanup any allocated resources that were created during the execution of this render pass.
public override void FrameCleanup(CommandBuffer cmd) { }
}
}
}
// using ECS;
// using UnityEngine.Rendering;
// using UnityEngine.Rendering.Universal;
//
// namespace DCL.Rendering.GPUInstancing
// {
// public partial class GPUInstancingRenderFeature
// {
// public class GPUInstancingRenderPass : ScriptableRenderPass
// {
// private const string PROFILER_TAG = "_DCL.GPUInstancingRenderPass";
//
// private GPUInstancingService instancingService;
// private IRealmData realmData;
//
// public GPUInstancingRenderPass(GPUInstancingService service)
// {
// this.instancingService = service;
// }
//
// public void SetService(GPUInstancingService service, IRealmData realmData)
// {
// instancingService = service;
// this.realmData = realmData;
// }
//
// // Called before executing the render pass.
// public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
// {
// // Configure camera targets, if needed
// }
//
// // The actual execution of the pass
// public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
// {
// if(instancingService == null || !realmData.Configured) return;
//
// CommandBuffer cmd = CommandBufferPool.Get(PROFILER_TAG);
//
// try
// {
// instancingService.RenderIndirect();
// }
// finally
// {
// context.ExecuteCommandBuffer(cmd);
// CommandBufferPool.Release(cmd);
// }
// }
//
// // Called after executing the render pass, if needed
// public override void OnCameraCleanup(CommandBuffer cmd) { }
//
// /// Cleanup any allocated resources that were created during the execution of this render pass.
// public override void FrameCleanup(CommandBuffer cmd) { }
// }
// }
// }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entire file is commented out. As @pravusjif noted, this should either be deleted entirely (if GPU instancing render pass is being permanently removed) or properly migrated to the new URP RenderGraph API. Leaving 58 lines of dead commented-out code adds noise and confusion about intent.

If this is a temporary measure during migration, it should be tracked in a follow-up issue. If permanent, delete the file with git rm.

Fix this →

Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ public partial class GPUInstancingRenderFeature : ScriptableRendererFeature
public GPUInstancingRenderFeature_Settings Settings => m_Settings;

private GPUInstancingService instancingService;
private GPUInstancingRenderPass instancingRenderPass;
//private GPUInstancingRenderPass instancingRenderPass;

public override void Create()
{
instancingRenderPass = new GPUInstancingRenderPass(instancingService)
{
renderPassEvent = RenderPassEvent.BeforeRenderingOpaques
};
// instancingRenderPass = new GPUInstancingRenderPass(instancingService)
// {
// renderPassEvent = RenderPassEvent.BeforeRenderingOpaques
// };
}

public void Initialize(GPUInstancingService service, IRealmData realmData)
{
instancingService = service;
instancingRenderPass?.SetService(service, realmData);
//instancingRenderPass?.SetService(service, realmData);
}


public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
{
if (instancingRenderPass != null)
renderer.EnqueuePass(instancingRenderPass);
// if (instancingRenderPass != null)
// renderer.EnqueuePass(instancingRenderPass);
}

protected override void Dispose(bool _bDisposing)
Expand Down
Loading
Loading