Skip to content

Commit

Permalink
Use device capabilities to decide whether to add profiling layer
Browse files Browse the repository at this point in the history
Previously we had hardcoded this in a weird way based on the device
name. We already know from the perfetto capabilities whether the device
needs a layer to be loaded -- use that.
  • Loading branch information
chrisforbes committed Mar 19, 2020
1 parent 63a10e1 commit 57f0ff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gapis/api/vulkan/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ func (a API) Replay(
makeReadable.imagesOnly = true
optimize = false
transforms.Add(NewWaitForPerfetto(req.traceOptions, req.handler, req.buffer))
if strings.Contains(device.GetConfiguration().GetHardware().GetGPU().GetName(), "Adreno") {
if device.GetConfiguration().GetPerfettoCapability().GetGpuProfiling().GetHasRenderStageProducerLayer() {
transforms.Add(&profilingLayers{})
}
transforms.Add(replay.NewMappingExporter(ctx, req.handleMappings))
Expand Down

0 comments on commit 57f0ff9

Please sign in to comment.