gpu: fix parsing of third descriptor in chain

Descriptor chains of three descriptors were not having the last
descriptor parsed correctly which resulted in some commands not
properly being responded to.

BUG=None
TEST=build with --features=gpu; null_platform_test

Change-Id: Ia77c7ca485ded7cdcb71fd62e8f6be5c226df1bf
Reviewed-on: https://chromium-review.googlesource.com/1073956
Commit-Ready: David Riley <davidriley@chromium.org>
Tested-by: David Riley <davidriley@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
David Riley 2018-05-22 15:37:22 -07:00 committed by chrome-bot
parent e9717c4b7b
commit 1187595da3

View file

@ -301,10 +301,10 @@ impl Frontend {
} else {
q_desc.data = Some((extra_desc.addr, extra_desc.len));
}
}
if let Some(extra_desc) = desc.next_descriptor() {
if extra_desc.is_write_only() && q_desc.ret.is_none() {
q_desc.ret = Some((extra_desc.addr, extra_desc.len));
if let Some(extra_desc) = extra_desc.next_descriptor() {
if extra_desc.is_write_only() && q_desc.ret.is_none() {
q_desc.ret = Some((extra_desc.addr, extra_desc.len));
}
}
}
descriptors.push_back(q_desc);