Skip to content

Commit

Permalink
Skip tracking the data dependency of destroied framebuffer images
Browse files Browse the repository at this point in the history
  • Loading branch information
Qining committed Feb 27, 2018
1 parent 2a56d0a commit 69afd3f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions gapis/api/vulkan/footprint_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1211,8 +1211,12 @@ type FootprintBuilder struct {
func (vb *FootprintBuilder) getImageData(ctx context.Context,
bh *dependencygraph.Behavior, vkImg VkImage) []dependencygraph.DefUseVariable {
if bh != nil {
read(ctx, bh, vkHandle(vkImg))
read(ctx, bh, vb.images[vkImg].layout)
if !read(ctx, bh, vkHandle(vkImg)) {
return []dependencygraph.DefUseVariable{}
}
if !read(ctx, bh, vb.images[vkImg].layout) {
return []dependencygraph.DefUseVariable{}
}
}
data := vb.images[vkImg].opaqueData.getBoundData(ctx, bh, 0, vkWholeSize)
for _, aspecti := range vb.images[vkImg].sparseData {
Expand Down Expand Up @@ -1644,9 +1648,11 @@ func (vb *FootprintBuilder) BuildFootprint(ctx context.Context,
if lastDrawInfo.Framebuffer != nil {
for _, view := range lastDrawInfo.Framebuffer.ImageAttachments.Range() {
img := view.Image
data := vb.getImageData(ctx, nil, img.VulkanHandle)
vb.machine.lastBoundFramebufferImageData[id] = append(
vb.machine.lastBoundFramebufferImageData[id], data...)
if _, ok := vb.images[img.VulkanHandle]; ok {
data := vb.getImageData(ctx, nil, img.VulkanHandle)
vb.machine.lastBoundFramebufferImageData[id] = append(
vb.machine.lastBoundFramebufferImageData[id], data...)
}
}
}
}
Expand Down

0 comments on commit 69afd3f

Please sign in to comment.