mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Vulkan: Support feature chromium_experimental_dp4a
This patch adds the support of the experimental feature chromium_experimental_dp4a on Vulkan. Currently this feature is enabled on Vulkan backend only when DP4a instructions are hardware-accelerated. Bug: tint:1497 Test: dawn_end2end_tests Change-Id: I5a63111a6b5972aa1934f0e7be984ebdb1e35080 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91520 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
8cb8c7add7
commit
57b93b4b6b
@@ -201,8 +201,6 @@ DeviceBase::DeviceBase(AdapterBase* adapter, const DeviceDescriptor* descriptor)
|
||||
|
||||
mFormatTable = BuildFormatTable(this);
|
||||
|
||||
SetWGSLExtensionAllowList();
|
||||
|
||||
if (descriptor->label != nullptr && strlen(descriptor->label) != 0) {
|
||||
mLabel = descriptor->label;
|
||||
}
|
||||
@@ -229,6 +227,8 @@ DeviceBase::~DeviceBase() {
|
||||
}
|
||||
|
||||
MaybeError DeviceBase::Initialize(Ref<QueueBase> defaultQueue) {
|
||||
SetWGSLExtensionAllowList();
|
||||
|
||||
mQueue = std::move(defaultQueue);
|
||||
|
||||
#if defined(DAWN_ENABLE_ASSERTS)
|
||||
@@ -1284,16 +1284,7 @@ void DeviceBase::ApplyFeatures(const DeviceDescriptor* deviceDescriptor) {
|
||||
}
|
||||
|
||||
bool DeviceBase::IsFeatureEnabled(Feature feature) const {
|
||||
if (mEnabledFeatures.IsEnabled(feature)) {
|
||||
// Currently we can only use DXC to compile HLSL shaders using float16, and
|
||||
// ChromiumExperimentalDp4a is an experimental feature which can only be enabled with toggle
|
||||
// "use_dxc".
|
||||
if (feature == Feature::ChromiumExperimentalDp4a || feature == Feature::ShaderFloat16) {
|
||||
return IsToggleEnabled(Toggle::UseDXC);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return mEnabledFeatures.IsEnabled(feature);
|
||||
}
|
||||
|
||||
void DeviceBase::SetWGSLExtensionAllowList() {
|
||||
|
||||
Reference in New Issue
Block a user