Skip to content

Commit

Permalink
Revert "Add vulkan information in about::gpu page"
Browse files Browse the repository at this point in the history
This reverts commit 2ef6fce.

Reason for revert: This CL broke GPU FYI Win x64 DX12 Vulkan Builder (dbg)

https://ci.chromium.org/p/chromium/builders/ci/GPU%20FYI%20Win%20x64%20DX12%20Vulkan%20Builder%20%28dbg%29

lld-link: error: obj/gpu/vulkan/vulkan/vulkan_instance.obj: locally defined symbol imported: public: __cdecl gpu::VulkanInfo::VulkanInfo(void) (defined in obj/gpu/config/vulkan_info/vulkan_info.obj) [LNK4217]


Original change's description:
> Add vulkan information in about::gpu page
> 
> This CL adds VulkanInfo in GPUInfo, and then send it to browser
> process with GPUInfo. And it will be serialized to binary data and pass
> to about:gpu page for displaying.
> 
> This CL adds a vulkan_types.mojom generated from vulkan header file.
> The structs in that files have many fields. It increases binary size.
> The increasing is expected.
> 
> Bug: 887018
> Change-Id: I2725326091ef47c3034939b3970d0e5bbaf6dc3f
> Binary-Size: Size increase is unavoidable (see above)
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868832
> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Reviewed-by: Jonathan Backer <backer@chromium.org>
> Commit-Queue: Peng Huang <penghuang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#714424}

TBR=penghuang@chromium.org,backer@chromium.org,zmo@chromium.org,kbr@chromium.org,tsepez@chromium.org,alexmos@chromium.org

Change-Id: I3b0aff2cfcfa8b65df2ca9109325451567cf8039
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 887018
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1913565
Reviewed-by: Chris Blume <cblume@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714714}
  • Loading branch information
ProgramMax authored and Commit Bot committed Nov 12, 2019
1 parent 38169a3 commit fdda085
Show file tree
Hide file tree
Showing 41 changed files with 79 additions and 2,885 deletions.
1 change: 0 additions & 1 deletion content/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ grit("resources") {
]
deps = [
"//content/browser/process_internals:mojo_bindings_js",
"//gpu/ipc/common:vulkan_interface_js",
"//url/mojom:url_mojom_origin_js",
]
}
Expand Down
5 changes: 0 additions & 5 deletions content/browser/devtools/protocol/system_info_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ class AuxGPUInfoEnumerator : public gpu::GPUInfo::Enumerator {
dictionary_->setDouble(name, value.InSecondsF());
}

void AddBinary(const char* name,
const base::span<const uint8_t>& value) override {
// TODO(penghuang): send vulkan info to devtool
}

void BeginGPUDevice() override {}

void EndGPUDevice() override {}
Expand Down
10 changes: 0 additions & 10 deletions content/browser/gpu/gpu_internals_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <string>
#include <utility>

#include "base/base64.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
Expand Down Expand Up @@ -74,8 +73,6 @@ WebUIDataSource* CreateGpuHTMLSource() {

source->UseStringsJs();
source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS);
source->AddResourcePath("vulkan_info.mojom.js", IDR_VULKAN_INFO_MOJO_JS);
source->AddResourcePath("vulkan_types.mojom.js", IDR_VULKAN_TYPES_MOJO_JS);
source->SetDefaultResource(IDR_GPU_INTERNALS_HTML);
return source;
}
Expand Down Expand Up @@ -330,13 +327,6 @@ std::unique_ptr<base::DictionaryValue> GpuInfoAsDictionaryValue() {
info->Set("diagnostics", std::move(dx_info));
#endif

#if BUILDFLAG(ENABLE_VULKAN)
if (gpu_info.vulkan_info) {
auto blob = gpu_info.vulkan_info->Serialize();
info->SetString("vulkanInfo", base::Base64Encode(blob));
}
#endif

return info;
}

Expand Down
3 changes: 0 additions & 3 deletions content/browser/resources/gpu/gpu_internals.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
<script src="chrome://resources/js/cr/ui/tabs.js"></script>
<script src="chrome://resources/js/load_time_data.js"></script>
<script src="chrome://resources/js/util.js"></script>
<script src="chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.js"></script>
<script src="chrome://resources/gpu/ipc/common/vulkan_types.mojom-lite.js"></script>
<script src="chrome://resources/gpu/ipc/common/vulkan_info.mojom-lite.js"></script>
<script src="gpu_internals.js"></script>
<script src="strings.js"></script>
</head>
Expand Down
1 change: 0 additions & 1 deletion content/browser/resources/gpu/gpu_internals.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

// <include src="browser_bridge.js">
// <include src="info_view.js">
// <include src="vulkan_info.js">

let browserBridge;

Expand Down
4 changes: 0 additions & 4 deletions content/browser/resources/gpu/info_view.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@
color: rgb(128, 128, 128);
}

#vulkan-info-value {
white-space: pre;
}

#copy-to-clipboard {
user-select: none;
}
7 changes: 1 addition & 6 deletions content/browser/resources/gpu/info_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ <h3>Video Acceleration Information</h3>
<div id="video-acceleration-info"></div>
</div>

<div>
<h3>Vulkan Information</h3>
<div id="vulkan-info"></div>
</div>

<div class="diagnostics">
<h3>Diagnostics</h3>
<div class="diagnostics-loading">... loading ...</div>
Expand Down Expand Up @@ -117,7 +112,7 @@ <h3>Log Messages</h3>
<span class="row-title" jscontent="description">title</span>
</td>
<td jsdisplay="!(value instanceof Array)">
<span jscontent="value" jsvalues=".id:id">value</span>
<span jscontent="value">value</span>
</td>
<td jsdisplay="value instanceof Array" colspan=2>
<span jscontent="description" class="row-title"></span>
Expand Down
13 changes: 0 additions & 13 deletions content/browser/resources/gpu/info_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,19 +211,6 @@ cr.define('gpu', function() {
} else {
diagnosticsDiv.hidden = true;
}

if (gpuInfo.vulkanInfo) {
const vulkanInfo = new gpu.VulkanInfo(gpuInfo.vulkanInfo);
const data = [{
'description': 'info',
'value': vulkanInfo.toString(),
'id': 'vulkan-info-value'
}];
this.setTable_('vulkan-info', data);
} else {
this.setTable_('vulkan-info', []);
}

} else {
this.setText_('basic-info', '... loading ...');
diagnosticsDiv.hidden = true;
Expand Down
19 changes: 0 additions & 19 deletions content/browser/resources/gpu/vulkan_info.js

This file was deleted.

2 changes: 0 additions & 2 deletions content/browser/webui/shared_resources_data_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ const std::map<int, std::string> CreateContentResourceIdToAliasMap() {
"mojo/mojo/public/mojom/base/unguessable_token.mojom-lite.js"},
{IDR_URL_MOJO_HTML, "mojo/url/mojom/url.mojom.html"},
{IDR_URL_MOJO_JS, "mojo/url/mojom/url.mojom-lite.js"},
{IDR_VULKAN_INFO_MOJO_JS, "gpu/ipc/common/vulkan_info.mojom-lite.js"},
{IDR_VULKAN_TYPES_MOJO_JS, "gpu/ipc/common/vulkan_types.mojom-lite.js"},
};
}

Expand Down
2 changes: 0 additions & 2 deletions content/content_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
<include name="IDR_UNGUESSABLE_TOKEN_MOJO_JS" file="${root_gen_dir}/mojo/public/mojom/base/unguessable_token.mojom-lite.js" use_base_dir="false" type="BINDATA" compress="gzip" />
<include name="IDR_URL_MOJO_HTML" file="${root_gen_dir}/url/mojom/url.mojom.html" use_base_dir="false" type="BINDATA" compress="gzip" />
<include name="IDR_URL_MOJO_JS" file="${root_gen_dir}/url/mojom/url.mojom-lite.js" use_base_dir="false" type="BINDATA" compress="gzip" />
<include name="IDR_VULKAN_INFO_MOJO_JS" file="${root_gen_dir}/gpu/ipc/common/vulkan_info.mojom-lite.js" use_base_dir="false" type="BINDATA" compress="gzip" />
<include name="IDR_VULKAN_TYPES_MOJO_JS" file="${root_gen_dir}/gpu/ipc/common/vulkan_types.mojom-lite.js" use_base_dir="false" type="BINDATA" compress="gzip" />
</includes>
</release>
</grit>
22 changes: 0 additions & 22 deletions gpu/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//gpu/vulkan/features.gni")

group("config") {
if (is_component_build) {
Expand Down Expand Up @@ -90,23 +89,6 @@ action("workaround_list") {
}
}

if (enable_vulkan) {
source_set("vulkan_info") {
sources = [
"vulkan_info.cc",
"vulkan_info.h",
]

configs += [ "//gpu:gpu_implementation" ]

deps = [
"//gpu/ipc/common:vulkan_interface",
]

all_dependent_configs = [ "//third_party/vulkan:vulkan_config" ]
}
}

jumbo_source_set("config_sources") {
# External code should depend on this via //gpu/config above rather than
# depending on this directly or the component build will break.
Expand Down Expand Up @@ -170,10 +152,6 @@ jumbo_source_set("config_sources") {
"//components/crash/core/common:crash_key",
]

if (enable_vulkan) {
public_deps += [ ":vulkan_info" ]
}

deps = [
":process_json",
"//base",
Expand Down
10 changes: 0 additions & 10 deletions gpu/config/gpu_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,6 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {

bool oop_rasterization_supported;
bool subpixel_font_rendering;

#if BUILDFLAG(ENABLE_VULKAN)
base::Optional<VulkanInfo> vulkan_info;
#endif
};

// If this assert fails then most likely something below needs to be updated.
Expand Down Expand Up @@ -340,12 +336,6 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
#endif
enumerator->AddBool("oopRasterizationSupported", oop_rasterization_supported);
enumerator->AddBool("subpixelFontRendering", subpixel_font_rendering);
#if BUILDFLAG(ENABLE_VULKAN)
if (vulkan_info) {
auto blob = vulkan_info->Serialize();
enumerator->AddBinary("vulkanInfo", base::span<const uint8_t>(blob));
}
#endif
enumerator->EndAuxAttributes();
}

Expand Down
13 changes: 0 additions & 13 deletions gpu/config/gpu_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,17 @@
#include <string>
#include <vector>

#include "base/containers/span.h"
#include "base/optional.h"
#include "base/time/time.h"
#include "base/version.h"
#include "build/build_config.h"
#include "gpu/config/dx_diag_node.h"
#include "gpu/gpu_export.h"
#include "gpu/vulkan/buildflags.h"
#include "ui/gfx/geometry/size.h"

#if defined(USE_X11)
typedef unsigned long VisualID;
#endif

#if BUILDFLAG(ENABLE_VULKAN)
#include "gpu/config/vulkan_info.h"
#endif

namespace gpu {

// These values are persisted to logs. Entries should not be renumbered and
Expand Down Expand Up @@ -364,10 +357,6 @@ struct GPU_EXPORT GPUInfo {

bool subpixel_font_rendering;

#if BUILDFLAG(ENABLE_VULKAN)
base::Optional<VulkanInfo> vulkan_info;
#endif

// Note: when adding new members, please remember to update EnumerateFields
// in gpu_info.cc.

Expand All @@ -387,8 +376,6 @@ struct GPU_EXPORT GPUInfo {
virtual void AddBool(const char* name, bool value) = 0;
virtual void AddTimeDeltaInSecondsF(const char* name,
const base::TimeDelta& value) = 0;
virtual void AddBinary(const char* name,
const base::span<const uint8_t>& blob) = 0;

// Markers indicating that a GPUDevice is being described.
virtual void BeginGPUDevice() = 0;
Expand Down
3 changes: 0 additions & 3 deletions gpu/config/gpu_info_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class TestGPUInfoEnumerator : public gpu::GPUInfo::Enumerator {

void AddBool(const char* name, bool value) override {}

void AddBinary(const char* name,
const base::span<const uint8_t>& blob) override {}

void AddTimeDeltaInSecondsF(const char* name,
const base::TimeDelta& value) override {}

Expand Down
78 changes: 0 additions & 78 deletions gpu/config/vulkan_info.cc

This file was deleted.

Loading

0 comments on commit fdda085

Please sign in to comment.