mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 22:41:07 +01:00
[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:
1 parent
ab33a724dc
commit
ef9974f9c4
3 files changed
+10
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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!
|
||||
//
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user