New issue
Advanced search Search tips

Issue 645532 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

error X3003: redefinition of 'gl_texture2D'

Project Member Reported by hubbe@chromium.org, Sep 9 2016

Issue description

Version: ToT
OS: Win8/10 (not sure about win7)
GPU: Intel

What steps will reproduce the problem?
(1) Start chrome with --enable-features=video-color-management
(2) play an h264 video (hardware accelerated)

What is the expected output?

Video plays.

What do you see instead?

Broken rendering.

If I use a debug build, I see error messages indicating that the YUV-to-RGB shader didn't link, with the error message:

C:\fakepath(63,19-54): error X3003: redefinition of 'gl_texture2D'

Not sure if this is a bug in my shader, angle or the driver.
(I did a code search for gl_texture2D, but only found it in a test.)

This problem does NOT reproduce on my workstation, which runs win7 and has a nvidia gpu. I'm not sure if it's win7 or nvidia that makes it work though.

The shader that breaks is defined in cc/output/shader.cc (FragemtShaderYUVVideo) and it only seems to break if use_nv12 AND use_color_lut are both set to true.

 
Cc: -crouleau@google.com crouleau@chromium.org
Cc: geoffl...@chromium.org cwallez@chromium.org jmad...@chromium.org

Comment 3 by hubbe@chromium.org, Sep 13 2016

Ping? If not already in progress, could someone take a look at this?

Owner: geoffl...@chromium.org
Status: Assigned (was: Untriaged)
I'll take a look, probably wont get to it today though
I tried to repro this on Win7 and Win10, wasn't able to. Does this only happen on Intel? Can you post about:gpu and a link to a video?

Comment 6 by hubbe@chromium.org, Sep 14 2016

Yes, it only happens on intel. gpu.html attached.
When you say "link to video", do you mean a video of what it looks like, or just any h264 video for testing?
The broken rendering is actually because it just uses the wrong shader program and is not very interesting.

Does angle have any debug flags/modes for the shader compiler that I could use to obtain more information on my end?

gpu.html
98.1 KB View Download
A link to the video would be appreciated, as I don't know how to tell if a video is h264 or other format.

Chrome does have some methods of getting additional shader info from WebGL, see https://www.khronos.org/registry/webgl/extensions/WEBGL_debug_shaders/. I'm not really sure how useful these are. Honestly just putting a breakpoint in ANGLE is the only thing I think would be useful, and it's pretty easy to debug at that point, just need a repro case.

Comment 9 by hubbe@chromium.org, Sep 20 2016

Ping?

I've tried to repro in a couple places but nothing yet.  Seems to work on all GPUs for me.

On my NVIDIA machine, it doesn't hit the path you mentioned because use_nv12 is false.  I'm trying to force it on to inspect the shader that's being generated.  The error you're seeing is from the D3D compiler which is used before any calls to the driver are made so this should reproduce on all platforms that attempt to compile this shader.

Comment 11 by hubbe@chromium.org, Sep 20 2016

You can try forcing use_nv12 to be true by editing media/gpu/dxva_video_decode_accelerator_win.cc and force copy_nv12_textures_ and/or share_nv12_textures_ to be true.

I can get an intel test machine again try it from my side again.
It doesn't have a proper development environment, so I'm pretty much limited to printf debugging. If I do that, what should I print out/log?

Knowing the GL shader that's being compiled would be the easiest.  I should be able to get that myself though.
Project Member

Comment 13 by bugdroid1@chromium.org, Sep 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/28a97ee11a38d9b4ac1e7adfb9343e228a5ed6ce

commit 28a97ee11a38d9b4ac1e7adfb9343e228a5ed6ce
Author: Geoff Lang <geofflang@chromium.org>
Date: Thu Sep 22 17:01:26 2016

Generate unique HLSL texture function names for external textures.

Because 2D and external textures have the same HLSL texture type, they were
generating texture functions with the same name.  This causes conflicts when
both 2D and external textures are used in the same shader.

BUG= angleproject:1534 
BUG= 645532 

Change-Id: I4b324014b7d9b4851d358730cf4e31fc8461584c
Reviewed-on: https://chromium-review.googlesource.com/388551
Reviewed-by: Corentin Wallez <cwallez@chromium.org>

[modify] https://crrev.com/28a97ee11a38d9b4ac1e7adfb9343e228a5ed6ce/src/compiler/translator/TextureFunctionHLSL.cpp
[modify] https://crrev.com/28a97ee11a38d9b4ac1e7adfb9343e228a5ed6ce/src/compiler/translator/UtilsHLSL.cpp
[modify] https://crrev.com/28a97ee11a38d9b4ac1e7adfb9343e228a5ed6ce/src/tests/gl_tests/GLSLTest.cpp

Comment 14 by hubbe@chromium.org, Sep 23 2016

Nice! Does this show up in chromium right away, or is there a rolling procedure we need to wait for?

We have to roll, I plan on doing it today but the bots are in bad shape.

Comment 16 by hubbe@chromium.org, Sep 23 2016

Let me know when the roll happens, so I can verify things on our end.

Sure, it will show as a CL on this bug.
Project Member

Comment 18 by bugdroid1@chromium.org, Sep 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/86dc7effdd78ad7aacdaf3af7fb8eb7e380e9f64

commit 86dc7effdd78ad7aacdaf3af7fb8eb7e380e9f64
Author: cwallez <cwallez@chromium.org>
Date: Fri Sep 23 21:21:19 2016

Roll ANGLE c287ea6..28a97ee

https://chromium.googlesource.com/angle/angle.git/+log/c287ea6..28a97ee

BUG= chromium:648031 , chromium:648135 , 648063 , 607283 , 645532 , chromium:648074 

TBR=geofflang@chromium.org

TEST=bots

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Merge branch 'master' of https://chromium.googlesource.com/chromium/src

fuzzers: add a fuzzer for the ANGLE shader translator

BUG= angleproject:1522 

Review-Url: https://codereview.chromium.org/2364873003
Cr-Commit-Position: refs/heads/master@{#420732}

[modify] https://crrev.com/86dc7effdd78ad7aacdaf3af7fb8eb7e380e9f64/DEPS

Status: Fixed (was: Assigned)

Sign in to add a comment