Bug 243819 - webgl/2.0.y/deqp/functional/gles3/negativetextureapi.html assertion failure
Summary: webgl/2.0.y/deqp/functional/gles3/negativetextureapi.html assertion failure
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dan Glastonbury
URL:
Keywords: InRadar
Depends on:
Blocks: webgl2conformance
  Show dependency treegraph
 
Reported: 2022-08-11 03:55 PDT by Kimmo Kinnunen
Modified: 2022-08-17 17:12 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.