Skip to content

Commit

Permalink
[m91] Do not use single component texture with vulkan webview
Browse files Browse the repository at this point in the history
Currently there is no cross-thread interop (gl-vulkan) shared
image implementation that supports single component textures (r8).
So disable single texture in this case.

Note this has the side effect of restoring the workaround for
PowerVR devices as well, which was lost when shared image was
enabled. The (non-functioning) code was removed in this CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2752927

(cherry picked from commit 871e70e)

Bug: 1195101
Change-Id: Ia7fe51749229ee35858e4265a9cc11a4fd8904ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2817840
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#871072}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2823848
Reviewed-by: Bo <boliu@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Auto-Submit: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/branch-heads/4472@{#38}
Cr-Branched-From: 3d60439-refs/heads/master@{#870763}
  • Loading branch information
Bo Liu authored and Chromium LUCI CQ committed Apr 13, 2021
1 parent 4829987 commit 7771709
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gpu/command_buffer/service/gles2_cmd_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
#include "gpu/command_buffer/service/validating_abstract_texture_impl.h"
#include "gpu/command_buffer/service/vertex_array_manager.h"
#include "gpu/command_buffer/service/vertex_attrib_manager.h"
#include "gpu/config/gpu_finch_features.h"
#include "gpu/config/gpu_preferences.h"
#include "ui/gfx/buffer_types.h"
#include "ui/gfx/color_space.h"
Expand Down Expand Up @@ -4275,6 +4276,13 @@ Capabilities GLES2DecoderImpl::GetCapabilities() {
feature_info_->feature_flags().oes_compressed_etc1_rgb8_texture;
caps.texture_format_etc1_npot =
caps.texture_format_etc1 && !workarounds().etc1_power_of_two_only;
// Vulkan currently doesn't support single-component cross-thread shared
// images.
caps.disable_one_component_textures =
group_->shared_image_manager() &&
group_->shared_image_manager()->display_context_on_another_thread() &&
(workarounds().avoid_one_component_egl_images ||
features::IsUsingVulkan());
caps.texture_rectangle = feature_info_->feature_flags().arb_texture_rectangle;
caps.texture_usage = feature_info_->feature_flags().angle_texture_usage;
caps.texture_storage = feature_info_->feature_flags().ext_texture_storage;
Expand Down

0 comments on commit 7771709

Please sign in to comment.