Bug 176491 - [WebGL] accelerated texImage2D for video doesn't respect flipY
Summary: [WebGL] accelerated texImage2D for video doesn't respect flipY
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on: 176969
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-06 18:41 PDT by Dean Jackson
Modified: 2017-09-18 19:54 PDT (History)
7 users (show)

See Also:


Attachments
Patch (408.64 KB, patch)
2017-09-06 18:50 PDT, Dean Jackson
jer.noble: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2017-09-06 18:41:02 PDT
If we use the GPU->GPU path for video into texImage2D, it fails if the FLIPY texture parameter is set.

This affects Vimeo360.
Comment 1 Dean Jackson 2017-09-06 18:41:16 PDT
<rdar://problem/33833511>
Comment 2 Dean Jackson 2017-09-06 18:50:04 PDT
Created attachment 320088 [details]
Patch
Comment 3 Dean Jackson 2017-09-07 15:01:40 PDT
Committed r221762: <http://trac.webkit.org/changeset/221762>
Comment 4 Darin Adler 2017-09-10 14:38:32 PDT
Comment on attachment 320088 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=320088&action=review

> Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp:349
> +    ASSERT(context);

Any time we write this, we should be asking ourselves, "Why didn’t I make the argument a reference instead of a pointer that must never be null'?"
Comment 5 Dean Jackson 2017-09-11 13:03:39 PDT
Comment on attachment 320088 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=320088&action=review

>> Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp:349
>> +    ASSERT(context);
> 
> Any time we write this, we should be asking ourselves, "Why didn’t I make the argument a reference instead of a pointer that must never be null'?"

Good point. I'll fix this in a followup.
Comment 7 Ryan Haddad 2017-09-11 17:32:49 PDT
(In reply to Ryan Haddad from comment #6)
> It looks like LayoutTest
> webgl/1.0.2/conformance/textures/tex-image-and-sub-image-2d-with-video.html
> has become a flaky failure after this change:
> 
> https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK1%20(Tests)/
> r221874%20(3522)/results.html
> 
> https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.
> html#showAllRuns=true&tests=webgl%2F1.0.2%2Fconformance%2Ftextures%2Ftex-
> image-and-sub-image-2d-with-video.html
I am able to reproduce this locally with:
run-webkit-tests webgl/1.0.2/conformance/textures/tex-image-and-sub-image-2d-with-video.html --iter=10

I cannot reproduce with r221759.
Comment 8 Ryan Haddad 2017-09-11 17:48:33 PDT
Reverted r221762 for reason:

This change caused flakiness in a webgl LayoutTest.

Committed r221898: <http://trac.webkit.org/changeset/221898>
Comment 9 Dean Jackson 2017-09-12 12:34:52 PDT
Landed again in 221932, with the test being fixed in 221933.
Comment 11 Jon Lee 2017-09-15 16:12:42 PDT
This was reverted again in 222069.
Comment 12 Dean Jackson 2017-09-18 19:54:07 PDT
Committed r222197: <http://trac.webkit.org/changeset/222197>