|
|
@@ -47,7 +47,7 @@ constexpr U32 kPackVisiblesThreadgroupSize = 64;
|
|
|
// First threads set the dispatch args of cluster binning
|
|
|
|
|
|
const GpuSceneNonRenderableObjectType type = (GpuSceneNonRenderableObjectType)svDispatchThreadId;
|
|
|
- const U32 objCount = min(kMaxVisibleClusteredObjects[(U32)type], g_visibleIndices[(U32)type][0]);
|
|
|
+ const U32 objCount = min(kMaxVisibleClusteredObjects[(U32)type], g_visibleIndices[NonUniformResourceIndex((U32)type)][0]);
|
|
|
|
|
|
DispatchIndirectArgs args;
|
|
|
args.m_threadGroupCountX = (g_consts.m_tileCount * kSampleCount + kClusterBinningThreadgroupSize - 1) / kClusterBinningThreadgroupSize;
|
|
|
@@ -62,7 +62,7 @@ constexpr U32 kPackVisiblesThreadgroupSize = 64;
|
|
|
|
|
|
const GpuSceneNonRenderableObjectType type =
|
|
|
(GpuSceneNonRenderableObjectType)(svDispatchThreadId - (U32)GpuSceneNonRenderableObjectType::kCount);
|
|
|
- const U32 objCount = min(kMaxVisibleClusteredObjects[(U32)type], g_visibleIndices[(U32)type][0]);
|
|
|
+ const U32 objCount = min(kMaxVisibleClusteredObjects[(U32)type], g_visibleIndices[NonUniformResourceIndex((U32)type)][0]);
|
|
|
|
|
|
DispatchIndirectArgs args;
|
|
|
args.m_threadGroupCountX = (objCount + kPackVisiblesThreadgroupSize - 1) / kPackVisiblesThreadgroupSize;
|