Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d91e1e789dfe516c82b6b2e03dc9603b19a908d4 https://github.com/WebKit/WebKit/commit/d91e1e789dfe516c82b6b2e03dc9603b19a908d4 Author: Myles C. Maxfield <mmaxfi...@apple.com> Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths: M Source/WebGPU/WebGPU/CommandEncoder.mm M Source/WebGPU/WebGPU/QuerySet.h M Source/WebGPU/WebGPU/QuerySet.mm M Source/WebGPU/WebGPU/RenderPassEncoder.mm M Websites/webkit.org/demos/webgpu/scripts/query-sets.js Log Message: ----------- [WebGPU] Only the first item in PassDescriptor.timestampWrites actually works https://bugs.webkit.org/show_bug.cgi?id=251779 <rdar://problem/105072144> Reviewed by Tadeu Zagallo and Dean Jackson. rdar://91371495 is about how we can't just naively transform descriptor.timestampWrites into computePassDescriptor.sampleBufferAttachments. Instead, we can resolve all the information to a dummy counter sample buffer, and then internally remember that the data is in a different place than where it's supposed to be. Later, when we resolve the data, we can resolve it from our dummy buffer instead of from where it's supposed to be. When rdar://91371495 is fixed, we can delete this indirection, and put the data directly where it's supposed to go. This patch causes query-sets.html to work. * Source/WebGPU/WebGPU/CommandEncoder.mm: (WebGPU::CommandEncoder::validateComputePassDescriptor const): (WebGPU::CommandEncoder::beginComputePass): (WebGPU::CommandEncoder::validateRenderPassDescriptor const): (WebGPU::CommandEncoder::beginRenderPass): (WebGPU::CommandEncoder::resolveQuerySet): * Source/WebGPU/WebGPU/QuerySet.h: * Source/WebGPU/WebGPU/QuerySet.mm: (WebGPU::QuerySet::QuerySet): (WebGPU::QuerySet::destroy): (WebGPU::QuerySet::setOverride): (WebGPU::QuerySet::resolveTimestamps const): * Source/WebGPU/WebGPU/RenderPassEncoder.mm: (WebGPU::RenderPassEncoder::endPass): This is necessary because pass encoders internally retain query sets. If you allocate too many query sets, trying to create more will fail. So, make sure we don't leave too many query sets hanging around. * Websites/webkit.org/demos/webgpu/scripts/query-sets.js: Canonical link: https://commits.webkit.org/259925@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes