Add GPUQueryType::BinaryOcclusion for simpler visibility checks

This commit is contained in:
2026-08-23 00:01:11 +02:00
parent dfb0db0b70
commit 1ce4c0f16e
12 changed files with 49 additions and 16 deletions
@@ -229,7 +229,7 @@ void GPUContextWebGPU::SetRenderTarget(GPUTextureView* depthBuffer, GPUTextureVi
void GPUContextWebGPU::SetRenderTarget(GPUTextureView* depthBuffer, const Span<GPUTextureView*>& rts)
{
ASSERT(Math::IsInRange(rts.Length(), 1, GPU_MAX_RT_BINDED));
ASSERT(Math::IsInRange(rts.Length(), 0, GPU_MAX_RT_BINDED));
auto depthBufferGPU = (GPUTextureViewWebGPU*)depthBuffer;
if (_renderTargetCount != rts.Length() || _depthStencil != depthBufferGPU || Platform::MemoryCompare(_renderTargets, rts.Get(), rts.Length() * sizeof(void*)) != 0)
{
@@ -860,7 +860,7 @@ GPUQueryWebGPU GPUDeviceWebGPU::AllocateQuery(GPUQueryType type)
// Allocate a new query heap
PROFILE_MEM(GraphicsCommands);
uint32 size = type == GPUQueryType::Occlusion ? 4096 : 1024;
uint32 size = type == GPUQueryType::Timer ? 1024 : 4096;
auto set = New<GPUQuerySetWebGPU>(Device, type, size);
QuerySets[QuerySetsCount++] = set;
}