Bug 243819

Summary: webgl/2.0.y/deqp/functional/gles3/negativetextureapi.html assertion failure
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebGLAssignee: Dan Glastonbury <djg>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, kbr, kkinnunen
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=242614
Bug Depends on:    
Bug Blocks: 222812    

Description Kimmo Kinnunen 2022-08-11 03:55:53 PDT
webgl/2.0.y/deqp/functional/gles3/negativetextureapi.html assertion failure

The validation is not run when pixels == nullptr

Due to bug 242614
Comment 1 Kimmo Kinnunen 2022-08-11 03:57:30 PDT
<rdar://98347913>
Comment 2 Kimmo Kinnunen 2022-08-11 03:58:21 PDT
The issue is that validation is not done when user passes pixels=null, where as the teximage3dbase expect that the validation is done.

WebGL defines pixels=null means pixels=sufficiently large 0 filled pixels.

The philosophical rabbit hole:
Current WebGL implementation naturally "optimizes" so that it doesn't create the sufficiently large 0 filled pixels buffer, rather that it just passes pixels=nullptr down.

However, it also validates other arguments based on pixels. The validation shoudn't be done this way, it should be done based on the GL type, since pixels isn't always there.

The other philosophical rabbit hole:
the ASSERT_UNUSED(ok) is the smell that reveals the bug. Instead, the validation should return the computed properties, if the validation passes. This way the computation is done once
Comment 3 Dan Glastonbury 2022-08-12 03:04:39 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3263
Comment 4 EWS 2022-08-17 17:11:59 PDT
Committed 253543@main (592cd219941f): <https://commits.webkit.org/253543@main>

Reviewed commits have been landed. Closing PR #3263 and removing active labels.