Commit 6a1407ed authored by Jiajia Qin's avatar Jiajia Qin Committed by Commit Bot

Only create webgl2-compute for passthrough cmd decoder

Bug: 859249
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ib373b6797b780c0294fef471fae7bb7a9deac39a
Reviewed-on: https://chromium-review.googlesource.com/1149711Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Cr-Commit-Position: refs/heads/master@{#578969}
parent 1120511b
......@@ -3369,6 +3369,17 @@ gpu::ContextResult GLES2DecoderImpl::Initialize(
return gpu::ContextResult::kFatalFailure;
}
// Only create webgl2-compute for passthrough cmd decoder.
if (attrib_helper.context_type == CONTEXT_TYPE_WEBGL2_COMPUTE) {
// Must not destroy ContextGroup if it is not initialized.
group_ = nullptr;
Destroy(true);
LOG(ERROR)
<< "ContextResult::kFatalFailure: "
"webgl2-compute is not supported on validating command decoder.";
return gpu::ContextResult::kFatalFailure;
}
auto result =
group_->Initialize(this, attrib_helper.context_type, disallowed_features);
if (result != gpu::ContextResult::kSuccess) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment