Skip to content

Commit

Permalink
Vulkan: Fix missing fetches of physical device properties (#1997)
Browse files Browse the repository at this point in the history
When mutating for replay, the new physical device enumeration commands
does not fetch the properties, this results into failure when using the
physical device object later
  • Loading branch information
Qining authored Jun 18, 2018
1 parent 789339c commit d24359c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gapis/api/vulkan/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ func (t *makeAttachementReadable) Transform(ctx context.Context, id api.CmdID, c
propList = append(propList, allProps.PhyDevToProperties().Get(dev).Clone(s.Arena, api.CloneContext{}))
}
newEnumerate := buildReplayEnumeratePhysicalDevices(ctx, s, cb, e.Instance(), numDev, devs, propList)
for _, e := range cmd.Extras().All() {
newEnumerate.Extras().Add(e)
}
out.MutateAndWrite(ctx, id, newEnumerate)
return
}
Expand Down
8 changes: 8 additions & 0 deletions gapis/api/vulkan/synthetic.api
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ cmd VkResult replayEnumeratePhysicalDevices(
device := ?
devices[i] = device
}
props := fetchPhysicalDeviceProperties(instance, devices)
memProps := fetchPhysicalDeviceMemoryProperties(instance, devices)
for i in (0 .. count) {
object := switch (PhysicalDevices[devices[i]] == null) {
case true:
Expand All @@ -143,6 +145,12 @@ cmd VkResult replayEnumeratePhysicalDevices(
object.Instance = instance
object.Index = i
object.VulkanHandle = devices[i]
if memProps != null {
object.MemoryProperties = memProps.PhyDevToMemoryProperties[devices[i]]
}
if props != null {
object.PhysicalDeviceProperties = props.PhyDevToProperties[devices[i]]
}
PhysicalDevices[devices[i]] = object
}
return ?
Expand Down

0 comments on commit d24359c

Please sign in to comment.