Title: [292745] trunk/Source/WebCore/PAL
Revision
292745
Author
mmaxfi...@apple.com
Date
2022-04-11 17:19:08 -0700 (Mon, 11 Apr 2022)

Log Message

[WebGPU] Unspecified texture size values should be set to 1, not 0
https://bugs.webkit.org/show_bug.cgi?id=239052

Reviewed by Kimmo Kinnunen.

If content says "Please create a texture of size [32, 32]" then we need to pad that
to [32, 32, 1] rather than [32, 32, 0].

Test: http/tests/webgpu/webgpu/api/validation/createTexture.html

* pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.cpp:
(PAL::WebGPU::ConvertToBackingContext::convertToBacking):

Modified Paths

Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (292744 => 292745)


--- trunk/Source/WebCore/PAL/ChangeLog	2022-04-12 00:14:49 UTC (rev 292744)
+++ trunk/Source/WebCore/PAL/ChangeLog	2022-04-12 00:19:08 UTC (rev 292745)
@@ -1,5 +1,20 @@
 2022-04-11  Myles C. Maxfield  <mmaxfi...@apple.com>
 
+        [WebGPU] Unspecified texture size values should be set to 1, not 0
+        https://bugs.webkit.org/show_bug.cgi?id=239052
+
+        Reviewed by Kimmo Kinnunen.
+
+        If content says "Please create a texture of size [32, 32]" then we need to pad that
+        to [32, 32, 1] rather than [32, 32, 0].
+
+        Test: http/tests/webgpu/webgpu/api/validation/createTexture.html
+
+        * pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.cpp:
+        (PAL::WebGPU::ConvertToBackingContext::convertToBacking):
+
+2022-04-11  Myles C. Maxfield  <mmaxfi...@apple.com>
+
         [WebGPU] Implement correct ownership for WGPUQueues
         https://bugs.webkit.org/show_bug.cgi?id=239050
 

Modified: trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.cpp (292744 => 292745)


--- trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.cpp	2022-04-12 00:14:49 UTC (rev 292744)
+++ trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.cpp	2022-04-12 00:19:08 UTC (rev 292745)
@@ -790,9 +790,9 @@
 {
     return WTF::switchOn(extent3D, [] (const Vector<IntegerCoordinate>& vector) {
         return WGPUExtent3D {
-            vector.size() > 0 ? vector[0] : 0,
-            vector.size() > 1 ? vector[1] : 0,
-            vector.size() > 2 ? vector[2] : 0,
+            vector.size() > 0 ? vector[0] : 1,
+            vector.size() > 1 ? vector[1] : 1,
+            vector.size() > 2 ? vector[2] : 1,
         };
     }, [] (const Extent3DDict& extent) {
         return WGPUExtent3D {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to