[YCbCr Samplers] Add a Feature for vulkan ycbcr samplers
Add new experimental feature for supporting vulkan ycbcr info as part
of static ycbcr samplers.
Change-Id: Ida05cbeee94088e3174e962c94c9ebd045476496
Bug: dawn:2476
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/183320
Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/docs/dawn/features/y_cb_cr_vulkan_samplers.md b/docs/dawn/features/y_cb_cr_vulkan_samplers.md
new file mode 100644
index 0000000..b4fc6a3
--- /dev/null
+++ b/docs/dawn/features/y_cb_cr_vulkan_samplers.md
@@ -0,0 +1,8 @@
+# YCbCr Vulkan Samplers
+
+The `y-cb-cr-vulkan-samplers` feature allows specification of VkSamplerYcbcrConversionCreateInfo as
+part of the static vulkan sampler descriptor.
+
+TODO(crbug.com/dawn/2476): Expand this documentation with examples and
+description of semantics (including constraints/validations) as we build out
+support
diff --git a/src/dawn/dawn.json b/src/dawn/dawn.json
index d2cf0de..7d18e18 100644
--- a/src/dawn/dawn.json
+++ b/src/dawn/dawn.json
@@ -2261,7 +2261,8 @@
{"value": 1203, "name": "shared fence DXGI shared handle", "tags": ["dawn", "native"]},
{"value": 1204, "name": "shared fence MTL shared event", "tags": ["dawn", "native"]},
{"value": 1205, "name": "shared buffer memory D3D12 resource", "tags": ["dawn", "native"]},
- {"value": 1206, "name": "static samplers", "tags": ["dawn"]}
+ {"value": 1206, "name": "static samplers", "tags": ["dawn"]},
+ {"value": 1207, "name": "y cb cr vulkan samplers", "tags": ["dawn"]}
]
},
"filter mode": {
diff --git a/src/dawn/native/Features.cpp b/src/dawn/native/Features.cpp
index 5aebe2a..400e37e 100644
--- a/src/dawn/native/Features.cpp
+++ b/src/dawn/native/Features.cpp
@@ -334,6 +334,12 @@
"https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
"static_samplers.md",
FeatureInfo::FeatureState::Experimental}},
+ {Feature::YCbCrVulkanSamplers,
+ {"Support setting VkSamplerYcbcrConversionCreateInfo as part of static vulkan sampler "
+ "descriptor",
+ "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+ "y_cb_cr_vulkan_samplers.md",
+ FeatureInfo::FeatureState::Experimental}},
};
} // anonymous namespace
diff --git a/src/dawn/wire/SupportedFeatures.cpp b/src/dawn/wire/SupportedFeatures.cpp
index 6d1a291..f1e5b51 100644
--- a/src/dawn/wire/SupportedFeatures.cpp
+++ b/src/dawn/wire/SupportedFeatures.cpp
@@ -102,6 +102,7 @@
case WGPUFeatureName_AdapterPropertiesVk:
case WGPUFeatureName_R8UnormStorage:
case WGPUFeatureName_StaticSamplers:
+ case WGPUFeatureName_YCbCrVulkanSamplers:
return true;
}