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
20 changes: 10 additions & 10 deletions src/core/src/render_techniques/gi10/gi10.comp
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,8 @@ void PatchScreenProbes(in uint did : SV_DispatchThreadID)
[numthreads(64, 1, 1)]
void SampleScreenProbes(in uint did : SV_DispatchThreadID, in uint local_id : SV_GroupThreadID)
{
uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size
* (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size;
uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size)
* ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size);
uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1]
+ g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1];

Expand Down Expand Up @@ -1096,8 +1096,8 @@ void PopulateScreenProbesTraceRay(uint did, inout PopulateScreenProbesPayload pa

void PopulateScreenProbes(uint did)
{
uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size
* (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size;
uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size)
* ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size);
uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1]
+ g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1];

Expand Down Expand Up @@ -1162,8 +1162,8 @@ void PopulateScreenProbesMain(in uint did : SV_DispatchThreadID)
[numthreads(64, 1, 1)]
void BlendScreenProbes(in uint did : SV_DispatchThreadID, in uint local_id : SV_GroupThreadID)
{
uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size
* (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size;
uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size)
* ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size);
uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1]
+ g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1];

Expand Down Expand Up @@ -1352,8 +1352,8 @@ void ReorderScreenProbes(in uint did : SV_DispatchThreadID)
[numthreads(64, 1, 1)]
void FilterScreenProbes(in uint did : SV_DispatchThreadID)
{
uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size
* (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size;
uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size)
* ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size);
uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1]
+ g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1];

Expand Down Expand Up @@ -1441,8 +1441,8 @@ void FilterScreenProbes(in uint did : SV_DispatchThreadID)
[numthreads(64, 1, 1)]
void ProjectScreenProbes(in uint did : SV_DispatchThreadID, in uint local_id : SV_GroupThreadID)
{
uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size
* (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size;
uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size)
* ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size);
uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1]
+ g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1];

Expand Down
4 changes: 2 additions & 2 deletions src/core/src/render_techniques/gi10/gi10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ void GI10::ScreenProbes::ensureMemoryIsAllocated(CapsaicinInternal const &capsai
uint32_t const probe_mask_mip_count = gfxCalculateMipCount(probe_count[0], probe_count[1]);

uint32_t const max_probe_count = probe_count[0] * probe_count[1];
max_probe_spawn_count = (buffer_width + probe_spawn_tile_size_ - 1) / probe_spawn_tile_size_
* (buffer_height + probe_spawn_tile_size_ - 1) / probe_spawn_tile_size_;
max_probe_spawn_count = ((buffer_width + probe_spawn_tile_size_ - 1) / probe_spawn_tile_size_)
* ((buffer_height + probe_spawn_tile_size_ - 1) / probe_spawn_tile_size_);

max_ray_count = max_probe_spawn_count * probe_size_ * probe_size_;

Expand Down