Add GPUQueryType::BinaryOcclusion for simpler visibility checks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user