Title: [292202] trunk/Source/WebGPU
Revision
292202
Author
[email protected]
Date
2022-03-31 22:04:44 -0700 (Thu, 31 Mar 2022)

Log Message

[WebGPU] 2 texture formats need to be guarded behind optional extensions
https://bugs.webkit.org/show_bug.cgi?id=238433

Reviewed by Dean Jackson.

WGPUTextureFormat_Depth24UnormStencil8 needs to be guarded behind WGPUFeatureName_Depth24UnormStencil8
and WGPUTextureFormat_Depth32FloatStencil8 needs to be guarded behind WGPUFeatureName_Depth32FloatStencil8.

* WebGPU/Texture.mm:
(WebGPU::featureRequirementForFormat):

Modified Paths

Diff

Modified: trunk/Source/WebGPU/ChangeLog (292201 => 292202)


--- trunk/Source/WebGPU/ChangeLog	2022-04-01 05:00:52 UTC (rev 292201)
+++ trunk/Source/WebGPU/ChangeLog	2022-04-01 05:04:44 UTC (rev 292202)
@@ -1,5 +1,18 @@
 2022-03-31  Myles C. Maxfield  <[email protected]>
 
+        [WebGPU] 2 texture formats need to be guarded behind optional extensions
+        https://bugs.webkit.org/show_bug.cgi?id=238433
+
+        Reviewed by Dean Jackson.
+
+        WGPUTextureFormat_Depth24UnormStencil8 needs to be guarded behind WGPUFeatureName_Depth24UnormStencil8
+        and WGPUTextureFormat_Depth32FloatStencil8 needs to be guarded behind WGPUFeatureName_Depth32FloatStencil8.
+
+        * WebGPU/Texture.mm:
+        (WebGPU::featureRequirementForFormat):
+
+2022-03-31  Myles C. Maxfield  <[email protected]>
+
         [WebGPU] Implement Queue::writeTexture() according to the spec
         https://bugs.webkit.org/show_bug.cgi?id=238432
 

Modified: trunk/Source/WebGPU/WebGPU/Texture.mm (292201 => 292202)


--- trunk/Source/WebGPU/WebGPU/Texture.mm	2022-04-01 05:00:52 UTC (rev 292201)
+++ trunk/Source/WebGPU/WebGPU/Texture.mm	2022-04-01 05:04:44 UTC (rev 292202)
@@ -36,6 +36,10 @@
 static std::optional<WGPUFeatureName> featureRequirementForFormat(WGPUTextureFormat format)
 {
     switch (format) {
+    case WGPUTextureFormat_Depth24UnormStencil8: // FIXME: This has to be guarded by MTLDevice.depth24Stencil8PixelFormatSupported
+        return WGPUFeatureName_Depth24UnormStencil8;
+    case WGPUTextureFormat_Depth32FloatStencil8:
+        return WGPUFeatureName_Depth32FloatStencil8;
     case WGPUTextureFormat_BC1RGBAUnorm:
     case WGPUTextureFormat_BC1RGBAUnormSrgb:
     case WGPUTextureFormat_BC2RGBAUnorm:
@@ -132,9 +136,7 @@
     case WGPUTextureFormat_Depth16Unorm:
     case WGPUTextureFormat_Depth24Plus:
     case WGPUTextureFormat_Depth24PlusStencil8:
-    case WGPUTextureFormat_Depth24UnormStencil8:
     case WGPUTextureFormat_Depth32Float:
-    case WGPUTextureFormat_Depth32FloatStencil8:
     case WGPUTextureFormat_Force32:
         return std::nullopt;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to