metal API occlusion culling fix
This commit is contained in:
@@ -3578,7 +3578,7 @@ using namespace metal_internal;
|
||||
{
|
||||
auto occlusionquery_internal = to_internal(occlusionqueries);
|
||||
descriptor->setVisibilityResultBuffer(occlusionquery_internal->buffer.get());
|
||||
descriptor->setVisibilityResultType(MTL::VisibilityResultTypeAccumulate);
|
||||
descriptor->setVisibilityResultType(MTL::VisibilityResultTypeReset);
|
||||
}
|
||||
|
||||
MTL4::RenderEncoderOptions options = MTL4::RenderEncoderOptionNone;
|
||||
@@ -4386,25 +4386,6 @@ using namespace metal_internal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
void GraphicsDevice_Metal::QueryReset(const GPUQueryHeap* heap, uint32_t index, uint32_t count, CommandList cmd)
|
||||
{
|
||||
CommandList_Metal& commandlist = GetCommandList(cmd);
|
||||
auto internal_state = to_internal(heap);
|
||||
|
||||
switch (heap->desc.type)
|
||||
{
|
||||
case GpuQueryType::OCCLUSION:
|
||||
case GpuQueryType::OCCLUSION_BINARY:
|
||||
precopy(cmd);
|
||||
commandlist.compute_encoder->fillBuffer(internal_state->buffer.get(), {index * sizeof(uint64_t), count * sizeof(uint64_t)}, 0);
|
||||
break;
|
||||
case GpuQueryType::TIMESTAMP:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
commandlist.autorelease_end();
|
||||
}
|
||||
void GraphicsDevice_Metal::Barrier(const GPUBarrier* barriers, uint32_t numBarriers, CommandList cmd)
|
||||
{
|
||||
CommandList_Metal& commandlist = GetCommandList(cmd);
|
||||
|
||||
@@ -396,7 +396,7 @@ namespace wi::graphics
|
||||
void QueryBegin(const GPUQueryHeap* heap, uint32_t index, CommandList cmd) override;
|
||||
void QueryEnd(const GPUQueryHeap* heap, uint32_t index, CommandList cmd) override;
|
||||
void QueryResolve(const GPUQueryHeap* heap, uint32_t index, uint32_t count, const GPUBuffer* dest, uint64_t dest_offset, CommandList cmd) override;
|
||||
void QueryReset(const GPUQueryHeap* heap, uint32_t index, uint32_t count, CommandList cmd) override;
|
||||
void QueryReset(const GPUQueryHeap* heap, uint32_t index, uint32_t count, CommandList cmd) override {};
|
||||
void Barrier(const GPUBarrier* barriers, uint32_t numBarriers, CommandList cmd) override;
|
||||
void BuildRaytracingAccelerationStructure(const RaytracingAccelerationStructure* dst, CommandList cmd, const RaytracingAccelerationStructure* src = nullptr) override;
|
||||
void BindRaytracingPipelineState(const RaytracingPipelineState* rtpso, CommandList cmd) override;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wi::version
|
||||
// minor features, major updates, breaking compatibility changes
|
||||
const int minor = 72;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 1;
|
||||
const int revision = 2;
|
||||
|
||||
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user