039a810284b8e27ccd8624d67e4663bbdf8ff955 - chromium/src

1 view
Skip to first unread message

bo...@chromium.org

unread,
Apr 9, 2021, 6:06:38 PM4/9/21
to chromium...@chromium.org
commit 039a810284b8e27ccd8624d67e4663bbdf8ff955
Author: Bo Liu <bo...@chromium.org>
AuthorDate: Fri Apr 09 22:05:52 2021
Commit: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
CommitDate: Fri Apr 09 22:05:52 2021

Do not use single component texture with vulkan webview (passthrough)

Duplicate the logic added in
https://chromium-review.googlesource.com/c/chromium/src/+/2817840 for
the passthrough decoder.

Bug: 1195101
Change-Id: I0cfec1eb5f034df69314d0382f8dcb670b29e405
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2818643
Commit-Queue: Bo <bo...@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vas...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#871129}

diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
index 971f4d7..9c6e3a0 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
@@ -24,6 +24,7 @@
#include "gpu/command_buffer/service/passthrough_discardable_manager.h"
#include "gpu/command_buffer/service/program_cache.h"
#include "gpu/command_buffer/service/shared_image_representation.h"
+#include "gpu/config/gpu_finch_features.h"
#include "ui/gl/gl_version_info.h"
#include "ui/gl/gpu_switching_manager.h"
#include "ui/gl/progress_reporter.h"
@@ -1579,6 +1580,12 @@
caps.texture_format_etc1_npot =
caps.texture_format_etc1 &&
!feature_info_->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() &&
+ 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;
Reply all
Reply to author
Forward
0 new messages