Commit 58b4b6b6 authored by Hao Li's avatar Hao Li Committed by Chromium LUCI CQ

Query API: Add extension name of pipeline-statistics-query in Blink

The creation of query set with the type of pipeline-statistics is
supported on all backends, but its extension is not enabled in
blink, add the extension name of pipeline statistics query for
testing query set creation.

Bug: dawn:434
Change-Id: I507ab9dbcf87725392b2c105c40769a9f007c4b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2607695
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: default avatarCorentin Wallez <cwallez@chromium.org>
Reviewed-by: default avatarKai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840286}
parent 056b46c4
......@@ -676,7 +676,9 @@ error::Error WebGPUDecoderImpl::InitDawnDeviceAndSetWireServer(
if (request_device_properties.shaderFloat16) {
device_descriptor.requiredExtensions.push_back("shader_float16");
}
if (request_device_properties.pipelineStatisticsQuery) {
device_descriptor.requiredExtensions.push_back("pipeline_statistics_query");
}
if (request_device_properties.timestampQuery) {
device_descriptor.requiredExtensions.push_back("timestamp_query");
}
......
......@@ -30,6 +30,8 @@ WGPUDeviceProperties AsDawnType(const GPUDeviceDescriptor* descriptor) {
extension_set.Contains("texture-compression-bc");
requested_device_properties.shaderFloat16 =
extension_set.Contains("shader-float16");
requested_device_properties.pipelineStatisticsQuery =
extension_set.Contains("pipeline-statistics-query");
requested_device_properties.timestampQuery =
extension_set.Contains("timestamp-query");
......@@ -85,6 +87,9 @@ void GPUAdapter::InitializeExtensionNameList() {
if (adapter_properties_.shaderFloat16) {
extension_name_list_.emplace_back("shader-float16");
}
if (adapter_properties_.pipelineStatisticsQuery) {
extension_name_list_.emplace_back("pipeline-statistics-query");
}
if (adapter_properties_.timestampQuery) {
extension_name_list_.emplace_back("timestamp-query");
}
......
......@@ -5,6 +5,7 @@
// https://gpuweb.github.io/gpuweb/
enum GPUExtensionName {
"pipeline-statistics-query",
"texture-compression-bc",
"timestamp-query",
"shader-float16"
......
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