Vulkan: Correctly request 16bit shader features.
All the querying of extensions was correctly handled for the WebGPU ShaderFloat16 extensions, except that we forgot to request it when creating the VkDevice. In practice this doesn't crash as most drivers won't check if the extension is enabled, and just compile the shader code correctly. However the Vulkan Validation Layers complain. This CL fixes it by requesting the features on device creation. Bug: dawn:426 Change-Id: Id7307bb4f1d08a10bec9fc7bf0500c5761f96ff7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23203 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
693e88ae85
commit
be637db589
|
@ -324,6 +324,11 @@ namespace dawn_native { namespace vulkan {
|
||||||
|
|
||||||
usedKnobs.shaderFloat16Int8Features.shaderFloat16 = VK_TRUE;
|
usedKnobs.shaderFloat16Int8Features.shaderFloat16 = VK_TRUE;
|
||||||
usedKnobs._16BitStorageFeatures.uniformAndStorageBuffer16BitAccess = VK_TRUE;
|
usedKnobs._16BitStorageFeatures.uniformAndStorageBuffer16BitAccess = VK_TRUE;
|
||||||
|
|
||||||
|
featuresChain.Add(&usedKnobs.shaderFloat16Int8Features,
|
||||||
|
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR);
|
||||||
|
featuresChain.Add(&usedKnobs._16BitStorageFeatures,
|
||||||
|
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find a universal queue family
|
// Find a universal queue family
|
||||||
|
|
Loading…
Reference in New Issue