Skip to content

Commit

Permalink
Fix fail_if_major_perf_caveat with SwANGLE
Browse files Browse the repository at this point in the history
The passthrough command decoder wasn't checking for the
fail_if_major_perf_caveat attribute at initialization time, causing it
to succeed even when using SwANGLE, while it should have failed.

(cherry picked from commit ad4d314)

Bug: chromium:1249419
Bug: b/228948471
Change-Id: I5717d79f08febec67812ec8e7c57caaccc9d935c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3593986
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#993769}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3606649
Cr-Commit-Position: refs/branch-heads/5005@{#150}
Cr-Branched-From: 5b4d945-refs/heads/main@{#992738}
  • Loading branch information
sugoi1 authored and Chromium LUCI CQ committed Apr 25, 2022
1 parent ee38cd4 commit 9b59717
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
Expand Up @@ -1084,9 +1084,12 @@ gpu::ContextResult GLES2DecoderPassthroughImpl::Initialize(
IsWebGLContextType(attrib_helper.context_type),
"missing GL_ANGLE_webgl_compatibility");
FAIL_INIT_IF_NOT(feature_info_->feature_flags().angle_request_extension,
"missing GL_ANGLE_request_extension");
"missing GL_ANGLE_request_extension");
FAIL_INIT_IF_NOT(feature_info_->feature_flags().khr_debug,
"missing GL_KHR_debug");
FAIL_INIT_IF_NOT(!attrib_helper.fail_if_major_perf_caveat ||
!feature_info_->feature_flags().is_swiftshader_for_webgl,
"fail_if_major_perf_caveat + swiftshader");
FAIL_INIT_IF_NOT(!attrib_helper.enable_oop_rasterization,
"oop rasterization not supported");
FAIL_INIT_IF_NOT(!IsES31ForTestingContextType(attrib_helper.context_type) ||
Expand Down

0 comments on commit 9b59717

Please sign in to comment.