[metal] don't advertise TIMESTAMP_QUERY_INSIDE_ENCODERS on Apple GPUs

From my testing the workaround on Apple GPUs is now always writing 0.
This commit is contained in:
Teoxoy authored and Andy Leiserson committed 2026-06-17 11:53:01 -07:00
1 parent ab33a724dc
commit ef9974f9c4
3 files changed
+10 -2

No files matched your search

+6 -1
View File
@@ -1174,10 +1174,15 @@ impl super::CapabilitiesQuery {
features.set(F::FLOAT32_BLENDABLE, true);
features.set(F::INDIRECT_FIRST_INSTANCE, self.indirect_draw_dispatch);
features.set(
F::TIMESTAMP_QUERY | F::TIMESTAMP_QUERY_INSIDE_ENCODERS,
F::TIMESTAMP_QUERY,
self.timestamp_query_support
.contains(TimestampQuerySupport::STAGE_BOUNDARIES),
);
features.set(
F::TIMESTAMP_QUERY_INSIDE_ENCODERS,
self.timestamp_query_support
.contains(TimestampQuerySupport::ON_BLIT_ENCODER),
);
features.set(
F::TIMESTAMP_QUERY_INSIDE_PASSES,
self.timestamp_query_support
+3
View File
@@ -163,6 +163,9 @@ impl super::CommandEncoder {
debug_assert!(self.state.render.is_none() && self.state.compute.is_none());
let cmd_buf = self.raw_cmd_buf.as_ref().unwrap();
// This code path is currently unused since the written timestamp is always 0.
// We should see if we can get it working again, if not remove the code.
//
// Take care of pending timer queries.
// If we can't use `sample_counters_in_buffer` we have to create a dummy blit encoder!
//
+1 -1
View File
@@ -711,7 +711,7 @@ bitflags_array! {
/// Supported platforms:
/// - Vulkan
/// - DX12
/// - Metal
/// - Metal (AMD & Intel, not Apple GPUs)
/// - OpenGL (with GL_ARB_timer_query)
///
/// This is a native only feature.