Skip to content

Commit

Permalink
Vulkan: Fix the crash during tracing vkCmdFillBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Qining committed Jul 11, 2018
1 parent 414cfb9 commit 2dd147b
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions gapis/api/templates/api_spy.cpp.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,13 @@
-------------------------------------------------------------------------------
*/}}
{{define "Statement"}}
{{ if IsReturn $}}{{Template "Return" $}}
{{else if IsFence $}}{{Template "Fence" $}}
{{else if IsCopy $}}{{Template "Copy" $}}
{{else if IsRead $}}{{Template "Read" $}}
{{else if IsAssign $}}{{Template "Assign" $}}
{{else }}{{Template "C++.Statement.Default" $}}
{{ if IsReturn $}}{{Template "Return" $}}
{{else if IsFence $}}{{Template "Fence" $}}
{{else if IsCopy $}}{{Template "Copy" $}}
{{else if IsRead $}}{{Template "Read" $}}
{{else if IsAssign $}}{{Template "Assign" $}}
{{else if IsSliceAssign $}}{{Template "SliceAssign" $}}
{{else }}{{Template "C++.Statement.Default" $}}
{{end}}
{{end}}

Expand Down Expand Up @@ -430,3 +431,18 @@
{{Template "C++.Statement.Default" $}}
{{end}}
{{end}}


{{/*
-------------------------------------------------------------------------------
An override for the "C++.SliceAssign" macro.
-------------------------------------------------------------------------------
*/}}
{{define "SliceAssign"}}
{{AssertType $ "SliceAssign"}}
{{if (GetAnnotation ($.To.Slice | TargetField) "spy_disabled")}}
// @spy_disabled slice assign
{{else}}
{{Template "C++.Statement.Default" $}} // slice assign but not disabled
{{end}}
{{end}}

0 comments on commit 2dd147b

Please sign in to comment.