New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 654258 link

Starred by 3 users

Issue metadata

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

Blocking:
issue 295792
issue 429053



Sign in to add a comment

Bug in glTexImage3D/glTexSubImage3D from GL_PIXEL_UNPACK_BUFFER with GL_UNPACK_IMAGE_HEIGHT > 0 on Intel Macs

Project Member Reported by jiajia....@intel.com, Oct 9 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Steps to reproduce the problem:
On macOS machines with Intel GPUs, When framebuffer attaches to a single layer of a texture which loaded data from unpack buffer, readPixels is incorrect if the unpack buffer's image height parameter is greater than zero and not equal to texture's height. This bug causes failures of tex-unpack-params.html's tests in the WebGL 2.0 conformance suite.

Some tests in the other file (teximage3d_pbo_params.html/texsubimage3d_pbo_params.html) are also failed due to the same reason.

Steps to reproduce

1. Download Chrome Canary and run from the Terminal:
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --enable-unsafe-es3-apis

2. Check out the KhronosGroup/WebGL repository:
git clone https://github.com/KhronosGroup/WebGL.git

3. Launch an HTTP server against that repository:
cd WebGL
python -m SimpleHTTPServer

4. Navigate the browser to the test cases:
http://localhost:8000/sdk/tests/conformance2/textures/misc/tex-unpack-params.html?webglVersion=2&quiet=0
This test is also available online at:
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/misc/tex-unpack-params.html?webglVersion=2&quiet=0

What is the expected behavior?
Expect all tests to pass, as they do on other operating systems and on other GPU types on macOS.

What went wrong?
The test cases with imageHeight (set by gl.pixelStorei using gl.UNPACK_IMAGE_HEIGHT param) greater than texture height are failed.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 55.0.2868.0  Channel: n/a
OS Version: OS X 10.12.0
Flash Version:
 
Blocking: 295792 429053
Cc: kbr@chromium.org zmo@chromium.org yang...@intel.com qiankun....@intel.com yunchao...@intel.com
Components: Blink>WebGL

Comment 2 by hdodda@chromium.org, Oct 10 2016

Labels: TE-NeedsTriageHelp

Comment 3 by kbr@chromium.org, Oct 12 2016

Components: Internals>GPU>Internals
Labels: GPU-Intel
Status: Available (was: Unconfirmed)
Summary: Bug in glTexImage3D/glTexSubImage3D from GL_PIXEL_UNPACK_BUFFER with GL_UNPACK_IMAGE_HEIGHT > 0 on Intel Macs (was: readPixels is incorrect when the attached 3d texture using unpack buffer with UNPACK_IMAGE_HEIGHT > 0 on Intel Mac)
Updating the summary of this bug; the bug's in texture uploading, not ReadPixels.

Filed as Radar 28727178. Not clear whether a workaround is possible.

Comment 4 by kbr@chromium.org, Oct 12 2016

Here's the full description of the Radar. It's slightly different than originally filed.

Description:

On macOS machines with Intel GPUs, glTexImage3D/glTexSubImage3D performs incorrectly when uploading a texture from the bound GL_PIXEL_UNPACK_BUFFER and glPixelStorei has set the GL_UNPACK_IMAGE_HEIGHT parameter to be greater than zero but not equal to the texture's height. It seems that glTexImage3D/glTexSubImage3D uses the texture's height, and not GL_UNPACK_IMAGE_HEIGHT's value, during the upload.

This bug causes failures of several tests in the WebGL 2.0 conformance suite.

This bug does not occur on other GPU types on macOS, nor on other operating systems.


Steps to reproduce:

1. Download Chrome Canary and run from the Terminal:
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --enable-unsafe-es3-apis

2. Check out the KhronosGroup/WebGL repository:
git clone https://github.com/KhronosGroup/WebGL.git

3. Launch an HTTP server against that repository:
cd WebGL
python -m SimpleHTTPServer

4. Navigate the browser to the test cases:
http://localhost:8000/sdk/tests/conformance2/textures/misc/tex-unpack-params.html?webglVersion=2&quiet=0
http://localhost:8000/sdk/tests/deqp/functional/gles3/texturespecification/teximage3d_pbo_params.html?runSkippedTests=1
http://localhost:8000/sdk/tests/deqp/functional/gles3/texturespecification/texsubimage3d_pbo_params.html?runSkippedTests=1

These tests are also available online at:
http://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/misc/tex-unpack-params.html?webglVersion=2&quiet=0
http://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/texturespecification/teximage3d_pbo_params.html?runSkippedTests=1
http://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/texturespecification/texsubimage3d_pbo_params.html?runSkippedTests=1

(Note the use of the runSkippedTests flag -- these tests will likely be disabled for WebGL 2.0.0, though the plan is to enable them for WebGL 2.0.1.)

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 18 2016

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

commit a45987580db93baa6565efe4cc72380b8631c18b
Author: jiajia.qin <jiajia.qin@intel.com>
Date: Tue Oct 18 02:04:19 2016

Add workaround for glTex(Sub)Image3D on Intel Macs

On macOS machines with Intel GPUs, glTexImage3D/glTexSubImage3D performs
incorrectly when uploading a texture from the bound GL_PIXEL_UNPACK_BUFFER
and glPixelStorei has set the GL_UNPACK_IMAGE_HEIGHT parameter to be
greater than zero but not equal to the texture's height. It seems that
glTexImage3D/glTexSubImage3D uses the texture's height, and not
GL_UNPACK_IMAGE_HEIGHT's value, during the upload.

Work around this issue by uploading texture layer by layer.

BUG= 654258 
TEST=WebGL 2 conformance tests
     conformance2/textures/misc/tex-unpack-params.html
     deqp/functional/gles3/texturespecification/teximage3d_pbo_params.html
     deqp/functional/gles3/texturespecification/texsubimage3d_pbo_params.html
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

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

[modify] https://crrev.com/a45987580db93baa6565efe4cc72380b8631c18b/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
[modify] https://crrev.com/a45987580db93baa6565efe4cc72380b8631c18b/gpu/command_buffer/service/texture_manager.cc
[modify] https://crrev.com/a45987580db93baa6565efe4cc72380b8631c18b/gpu/command_buffer/service/texture_manager.h
[modify] https://crrev.com/a45987580db93baa6565efe4cc72380b8631c18b/gpu/config/gpu_driver_bug_list_json.cc
[modify] https://crrev.com/a45987580db93baa6565efe4cc72380b8631c18b/gpu/config/gpu_driver_bug_workaround_type.h

Comment 6 by zmo@chromium.org, Nov 5 2016

Owner: yang...@intel.com
Status: Fixed (was: Available)
Since we already had the workaround, let's close this.

Sign in to add a comment