Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan: Fix the unit test failure due to nil query pool object #2034

Merged
merged 1 commit into from
Jul 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions gapis/api/vulkan/api/query_pool.api
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ cmd VkResult vkGetQueryPoolResults(

sub void dovkCmdBeginQuery(ref!vkCmdBeginQueryArgs args) {
pool := QueryPools[args.QueryPool]
pool.Status[args.Query] = QUERY_STATUS_ACTIVE
pool.LastBoundQueue = LastBoundQueue
if pool != null {
pool.Status[args.Query] = QUERY_STATUS_ACTIVE
pool.LastBoundQueue = LastBoundQueue
}
}

@threadSafety("app")
Expand Down Expand Up @@ -164,8 +166,10 @@ vkCmdEndQueryArgs {

sub void dovkCmdEndQuery(ref!vkCmdEndQueryArgs args) {
pool := QueryPools[args.QueryPool]
pool.Status[args.Query] = QUERY_STATUS_COMPLETE
pool.LastBoundQueue = LastBoundQueue
if pool != null {
pool.Status[args.Query] = QUERY_STATUS_COMPLETE
pool.LastBoundQueue = LastBoundQueue
}
}

@threadSafety("app")
Expand Down Expand Up @@ -196,10 +200,12 @@ vkCmdResetQueryPoolArgs {

sub void dovkCmdResetQueryPool(ref!vkCmdResetQueryPoolArgs args) {
pool := QueryPools[args.QueryPool]
for i in (0 .. args.QueryCount) {
pool.Status[args.FirstQuery + i] = QUERY_STATUS_INACTIVE
if pool != null {
for i in (0 .. args.QueryCount) {
pool.Status[args.FirstQuery + i] = QUERY_STATUS_INACTIVE
}
pool.LastBoundQueue = LastBoundQueue
}
pool.LastBoundQueue = LastBoundQueue
}

@threadSafety("app")
Expand Down Expand Up @@ -230,7 +236,9 @@ cmd void vkCmdResetQueryPool(

sub void dovkCmdWriteTimestamp(ref!vkCmdWriteTimestampArgs args) {
pool := QueryPools[args.QueryPool]
pool.LastBoundQueue = LastBoundQueue
if pool != null {
pool.LastBoundQueue = LastBoundQueue
}
}

@threadSafety("app")
Expand Down Expand Up @@ -266,7 +274,9 @@ class vkCmdCopyQueryPoolResultsArgs {

sub void dovkCmdCopyQueryPoolResults(ref!vkCmdCopyQueryPoolResultsArgs args) {
pool := QueryPools[args.QueryPool]
pool.LastBoundQueue = LastBoundQueue
if pool != null {
pool.LastBoundQueue = LastBoundQueue
}
}

@threadSafety("app")
Expand Down