Title: [290367] trunk
Revision
290367
Author
commit-qu...@webkit.org
Date
2022-02-23 05:19:45 -0800 (Wed, 23 Feb 2022)

Log Message

Fix GPUP WebGL generator script wrt uninitialised sized span
https://bugs.webkit.org/show_bug.cgi?id=235889

Patch by Kimmo Kinnunen <kkinnu...@apple.com> on 2022-02-23
Reviewed by Antti Koivisto.
Source/WebKit:

Regenerated.

* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat):

Tools:

Fix the generator. The r290328 only edited the generated files.
Add a other hunk missing from r290175.

* Scripts/generate-gpup-webgl:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (290366 => 290367)


--- trunk/Source/WebKit/ChangeLog	2022-02-23 12:27:24 UTC (rev 290366)
+++ trunk/Source/WebKit/ChangeLog	2022-02-23 13:19:45 UTC (rev 290367)
@@ -1,5 +1,17 @@
 2022-02-23  Kimmo Kinnunen  <kkinnu...@apple.com>
 
+        Fix GPUP WebGL generator script wrt uninitialised sized span
+        https://bugs.webkit.org/show_bug.cgi?id=235889
+
+        Reviewed by Antti Koivisto.
+
+        Regenerated.
+
+        * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
+        (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat):
+
+2022-02-23  Kimmo Kinnunen  <kkinnu...@apple.com>
+
         Thread safety analysis macros are confusing for non-Lock use-cases
         https://bugs.webkit.org/show_bug.cgi?id=237022
 

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp (290366 => 290367)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp	2022-02-23 12:27:24 UTC (rev 290366)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp	2022-02-23 13:19:45 UTC (rev 290367)
@@ -686,8 +686,8 @@
 
 void RemoteGraphicsContextGLProxy::getShaderPrecisionFormat(GCGLenum shaderType, GCGLenum precisionType, GCGLSpan<GCGLint, 2> range, GCGLint* precision)
 {
-    constexpr std::array<int32_t, 2> emptyRangeReply { 0, 0 };
-    IPC::ArrayReference<int32_t, 2> rangeReply { emptyRangeReply };
+    constexpr std::array<int32_t, 2> rangeReplyEmpty { };
+    IPC::ArrayReference<int32_t, 2> rangeReply { rangeReplyEmpty };
     int32_t precisionReply = { };
     if (!isContextLost()) {
         auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetShaderPrecisionFormat(shaderType, precisionType), Messages::RemoteGraphicsContextGL::GetShaderPrecisionFormat::Reply(rangeReply, precisionReply));

Modified: trunk/Tools/ChangeLog (290366 => 290367)


--- trunk/Tools/ChangeLog	2022-02-23 12:27:24 UTC (rev 290366)
+++ trunk/Tools/ChangeLog	2022-02-23 13:19:45 UTC (rev 290367)
@@ -1,3 +1,14 @@
+2022-02-23  Kimmo Kinnunen  <kkinnu...@apple.com>
+
+        Fix GPUP WebGL generator script wrt uninitialised sized span
+        https://bugs.webkit.org/show_bug.cgi?id=235889
+
+        Reviewed by Antti Koivisto.
+        Fix the generator. The r290328 only edited the generated files.
+        Add a other hunk missing from r290175.
+
+        * Scripts/generate-gpup-webgl:
+
 2022-02-23  Zan Dobersek  <zdober...@igalia.com>
 
         [GStreamer] Add WebKitDMABufVideoSink

Modified: trunk/Tools/Scripts/generate-gpup-webgl (290366 => 290367)


--- trunk/Tools/Scripts/generate-gpup-webgl	2022-02-23 12:27:24 UTC (rev 290366)
+++ trunk/Tools/Scripts/generate-gpup-webgl	2022-02-23 13:19:45 UTC (rev 290367)
@@ -105,7 +105,9 @@
     void GetError() -> (uint32_t returnValue) Synchronous
     void PaintRenderingResultsToCanvas(WebCore::RenderingResourceIdentifier imageBuffer) -> () Synchronous
     void PaintCompositedResultsToCanvas(WebCore::RenderingResourceIdentifier imageBuffer) -> () Synchronous
-    void CopyTextureFromMedia(WebCore::MediaPlayerIdentifier identifier, uint32_t texture, uint32_t target, int32_t level, uint32_t internalFormat, uint32_t format, uint32_t type, bool premultiplyAlpha, bool flipY) -> (bool success) Synchronous
+#if ENABLE(VIDEO)
+    void CopyTextureFromVideoFrame(WebKit::RemoteVideoFrameReadReference videoFrame, uint32_t texture, uint32_t target, int32_t level, uint32_t internalFormat, uint32_t format, uint32_t type, bool premultiplyAlpha, bool flipY) -> (bool success) Synchronous
+#endif
 #if ENABLE(MEDIA_STREAM)
     void PaintCompositedResultsToMediaSample() -> (std::optional<WebKit::RemoteVideoFrameProxy::Properties> properties) Synchronous
 #endif
@@ -646,10 +648,10 @@
                 if o.type.is_dynamic_span():
                     self.pre_call_stmts += [f"{str(v.type)} {str(v.name)};"]
                 else:
-                    # FIXME: Likely this creates a dangling reference span<int, 2> aReply = { { } };.
-                    # https://bugs.webkit.org/show_bug.cgi?id=235889
-                    self.pre_call_stmts += [f"{str(v.type)} {str(v.name)} {{ {{ }} }};"]
-
+                    self.pre_call_stmts += [
+                        f"constexpr std::array<{str(v.type.get_contained_type())}, {str(v.type.get_arity())}> {str(v.name)}Empty {{ }};",
+                        f"{str(v.type)} {str(v.name)} {{ {str(v.name)}Empty }};"
+                    ]
                 self.out_exprs += [cpp_expr(v.type, v.name)]
                 if o.type.is_dynamic_span():
                     self.in_exprs += [cpp_expr(get_cpp_type("size_t"), f"{o.name}.bufSize")]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to