Skip to content

Commit

Permalink
[Backport 8.x.x] Fixed error Maximum allowed thread group count is 65…
Browse files Browse the repository at this point in the history
…535 when resolution is very high (#2623)

* [10.x.x] Axf: add normal gradients and all mapping modes (uv, planar, triplanar) #583

* [10.x.x] Axf fix shininess exp to roughness, ssr transparent and alpha test #587

* Update Light-Component.md (#682)

* push meta

* removed undesired change in AXF

* Fix transparent movec scene view #698

* Porting console fixes to staging (#699)

* Update HDRP-Camera.md (#706)

* Pre warm RT Handle system so that reallocations are reduced. #713

* Update PlanarReflectionProbeCache.cs

* Update preview naming in raytrace component #753

* Workaround for GetKernelThreadGroupSizes returning wrong data #760

* Sanitize transparent motion vectors setting #761

* Standard terrain upgrader (#762)

* Update Reflection-Probe (#790)

* Update Reflection-Probe.md

* Update Reflection-Probe.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix reflection probe framesettings override #796

* Force post process parent setting to be before child settings #799

* Fixed 1253367 by rebaking probe with missing baked texture. #818

* Fix issue with blocky artifacts when decals affecting metallic are applied on specular color workflow #823

* Fixed blend distance editing (1248931) #838

* Fix API breaking change: Add Public quality to Raytracing volume effect

* Fix API breaking change: Add Public quality to Raytracing volume effect - RR

* Update HDR information. Also updated format and links. (#853)

* Fix message for metal and ao (#859)

* d Fix issue with the blue line of prefab modifications for Volume mode #860

* Recompute FOV when generating PixelCoord To WorldSpace View Direction Matrix #865

* Upgrade default legacy terrain to HDRP default TerrainLit (#883)

* Editing volumes via script doc (#884)

* Added Volumes API doc

* Update Volumes-API.md

* Changed terminology back to Volume Override

* Added terminology disclaimer

* Update HDRenderPipeline.cs (#994)

* Delete 9713_VirtualTexturing.meta

* Fix SSAO with double sided material and normal mode to none #1043

* Fix emissive mesh layer mask behaviour #1062

* Use the wide mode to force the UI drawing on a single line (1251235) #1064

* Fix custom pass after post process buffer #1072

* Fix for area light baked data not updating when changing the gizmo #1075

* Fixed an error when switch area light shape to disk while an emissive… #1112

* Have the PBR Sky not render black when below horizon #1116

* Find the appropriate default frame settings per editor (case 1247631) #1129

* Fix taaFrameIndex and restore TAA tests for XR #534

* fix typo in the Render Pipeline Wizard #1037

* Add light layer on indirect lighting controller #777

* [8.x.x Backport]  Fix exposure white flash when enabling SSR (#842)

* fix white flash

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [8.x.x Backport] Fix transparent/opaque motion vector inconsistencies by allowing camera-only transparent motion vectors (#837)

* port

* changelog

* Update HDRenderPipeline.cs

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [8.x.x Backport] Fix depth pyramid issues with dynamic resolution (#847)

* Port

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [Backport 8.x.x] Fixed a serialization issue, preventing quality level parameters to undo/redo and update scene view on change. (#1105)

* Fixed a serialization issue, preventing quality level parameters to undo/redo and update scene view on change.

* Fixed issue when using Custom

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [Backport 8.x.x] Fixed Look Dev with Light Theme (#1106)

* Fixed an issue where opening the look dev window with the light theme would make the window blink and eventually crash unity.

# Conflicts:
#	com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [Backport 8.x.x] Fixed decal duplication when editing a prefab in context (#1107)

* Implemented proper culling for decals when used in prefabs and edited in context.

* Compilation fix

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix API breaking change in indirect controller

* Fix area light gizmo not updating engine side light v2 #1156

* Add missing ClothObj.

* HDRP: Default indirect Lighting controller Layers to Everything to ease the migration

* Update HDRenderPipelineResources.asset

* Fixed logic of test on presence of HDRP asset that would wrongly trigger (#824)

a warning message when not in batch mode.

* Rename h to hlsl

* Update cas include paths (#1227)

* Fix XR single-pass macros in tessellation shaders #1160

* Hdrp/fix hierarchicalbox gizmo symetry and homothety mode ensuring face faces outside #1228

* [8.x.x backport] Fix issues with history sampling and hw dynamic res (#1777)

* Fix TAA dynamic res issue

* Changelog

* [Backport 8.x.x] Fixed an issue where look dev lighting would go black when a new scene is loaded. (#1322)

* Fixed an issue where look dev lighting would go black when a new scene is loaded.

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix

* Changelog

Co-authored-by: slunity <37302815+slunity@users.noreply.github.com>
Co-authored-by: JordanL8 <lewis.jordan@hotmail.co.uk>
Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>
Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com>
Co-authored-by: remi-chapelain <57442369+remi-chapelain@users.noreply.github.com>
Co-authored-by: fredericv-unity3d <55485372+fredericv-unity3d@users.noreply.github.com>
Co-authored-by: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com>
Co-authored-by: Evgenii Golubev <EvgeniiG@users.noreply.github.com>
Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>
Co-authored-by: Emmanuel Turquin <emmanuel@turquin.org>
Co-authored-by: Remi Slysz <40034005+RSlysz@users.noreply.github.com>
  • Loading branch information
12 people committed Nov 17, 2020
1 parent 12de2e3 commit 6949228
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed Custom Post Processes affecting preview cameras.
- Fixed issue with box light not visible if range is below one and range attenuation is off.
- Fixed serialization issue with matcap scale intensity.
- Fixed error Maximum allowed thread group count is 65535 when resolution is very high.

### Changed
- Remove MSAA debug mode when renderpipeline asset has no MSAA
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#pragma kernel ClearList

RWStructuredBuffer<uint> _LightListToClear;
int _LightListEntries;
int2 _LightListEntriesAndOffset;

#define _LightListEntries (uint)_LightListEntriesAndOffset.x
#define _LightListOffset (uint)_LightListEntriesAndOffset.y

[numthreads(64, 1, 1)]
void ClearList(uint3 id : SV_DispatchThreadID)
{
if (id.x < (uint)_LightListEntries)
_LightListToClear[id.x] = 0;
if ((id.x + _LightListOffset) < (uint)_LightListEntries)
_LightListToClear[id.x + _LightListOffset] = 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3124,9 +3124,27 @@ void ClearLightList(HDCamera camera, CommandBuffer cmd, ComputeBuffer bufferToCl
var kernel = cs.FindKernel("ClearList");

cmd.SetComputeBufferParam(cs, kernel, HDShaderIDs._LightListToClear, bufferToClear);
cmd.SetComputeIntParam(cs, HDShaderIDs._LightListEntries, bufferToClear.count);
Vector2 countAndOffset = new Vector2Int(bufferToClear.count, 0);

int groupSize = 64;
int totalNumberOfGroupsNeeded = (bufferToClear.count + groupSize - 1) / groupSize;

const int maxAllowedGroups = 65535;
// On higher resolutions we might end up with more than 65535 group which is not allowed, so we need to to have multiple dispatches.
int i = 0;
while (totalNumberOfGroupsNeeded > 0)
{
countAndOffset.y = maxAllowedGroups * i;
cmd.SetComputeVectorParam(cs, HDShaderIDs._LightListEntriesAndOffset, countAndOffset);

int currGroupCount = Math.Min(maxAllowedGroups, totalNumberOfGroupsNeeded);

cmd.DispatchCompute(cs, kernel, currGroupCount, 1, 1);

totalNumberOfGroupsNeeded -= currGroupCount;
i++;
}

cmd.DispatchCompute(cs, kernel, (bufferToClear.count + groupSize - 1) / groupSize, 1, 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static class HDShaderIDs
public static readonly int g_vLayeredOffsetsBuffer = Shader.PropertyToID("g_vLayeredOffsetsBuffer");

public static readonly int _LightListToClear = Shader.PropertyToID("_LightListToClear");
public static readonly int _LightListEntries = Shader.PropertyToID("_LightListEntries");
public static readonly int _LightListEntriesAndOffset = Shader.PropertyToID("_LightListEntriesAndOffset");

public static readonly int _ViewTilesFlags = Shader.PropertyToID("_ViewTilesFlags");
public static readonly int _MousePixelCoord = Shader.PropertyToID("_MousePixelCoord");
Expand Down

0 comments on commit 6949228

Please sign in to comment.