Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 5 users
Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android, Windows
Pri: 2
Type: Bug

Blocked on:
issue 528145
issue 521578
issue 521904

Blocking:
issue 517548


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment
Need workaround for Cube map
Project Member Reported by dongseon...@intel.com, Aug 10 2015 Back to list
What steps will reproduce the problem?
1. apply https://codereview.chromium.org/1280163004
2. run it on either Android (Nexus 5) or Windows

What is the expected output? What do you see instead?

Pass like linux, but crash.
GL_TEXTURE_CUBE_MAP_POSITIVE_X is fine on both Android and Windows, but other faces [1] are in trouble.
[1] GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z

Please use labels and text to provide additional information.

In Android case,
When the cube map texture is bound to FBO, glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X) crashes if you don't call glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X) earlier.

See GLCubeMapTextureTest.DISABLED_FramebufferTexture2D and GLCubeMapTextureTest.DISABLED_TexImage2DAfterFBOBinding on the CL.

In Windows case, GLCubeMapTextureTest.DISABLED_ReadPixels crashes with following log.
TextureD3D_Cube seems to have a bug, which create only one render target for cube map. All 6 faces of cube map can be render target, so TextureD3D_Cube must handle 6 render targets.

rx::TextureD3D_Cube::getRenderTarget [0x02BB57CB+171] (c:\chromium\src\third_party\angle\src\libangle\renderer\d3d\textured3d.cpp:1577)
rx::TextureD3D::getAttachmentRenderTarget [0x02BB4F2E+30] (c:\chromium\src\third_party\angle\src\libangle\renderer\d3d\textured3d.cpp:618)
rx::FramebufferD3D::getImplementationColorReadFormat [0x02BD8A20+64] (c:\chromium\src\third_party\angle\src\libangle\renderer\d3d\framebufferd3d.cpp:216)
gl::ValidateReadPixelsParameters [0x02B618DC+220] (c:\chromium\src\third_party\angle\src\libangle\validationes.cpp:996)
gl::ReadPixels [0x02B22A57+71] (c:\chromium\src\third_party\angle\src\libglesv2\entry_points_gles_2_0.cpp:3313)
gpu::gles2::GLES2DecoderImpl::HandleReadPixels [0x55B24927+2087] (c:\chromium\src\gpu\command_buffer\service\gles2_cmd_decoder.cc:8636)
gpu::gles2::GLES2DecoderImpl::DoCommandsImpl<0> [0x55AFBEBD+205] (c:\chromium\src\gpu\command_buffer\service\gles2_cmd_decoder.cc:4377)
gpu::CommandParser::ProcessCommands [0x55AD9C76+54] (c:\chromium\src\gpu\command_buffer\service\cmd_parser.cc:54)
gpu::GpuScheduler::PutChanged [0x55B37806+598] (c:\chromium\src\gpu\command_buffer\service\gpu_scheduler.cc:75)
gpu::GLManager::PumpCommands [0x0037B049+73] (c:\chromium\src\gpu\command_buffer\tests\gl_manager.cc:432)
gpu::CommandBufferService::Flush [0x55ADA509+41] (c:\chromium\src\gpu\command_buffer\service\command_buffer_service.cc:79)
gpu::CommandBufferHelper::Flush [0x55AC12F5+69] (c:\chromium\src\gpu\command_buffer\client\cmd_buffer_helper.cc:163)
gpu::CommandBufferHelper::Finish [0x55AC118C+284] (c:\chromium\src\gpu\command_buffer\client\cmd_buffer_helper.cc:203)
gpu::gles2::GLES2Implementation::WaitForCmd [0x55A63018+168] (c:\chromium\src\gpu\command_buffer\client\gles2_implementation.cc:349)
gpu::gles2::GLES2Implementation::ReadPixels [0x55A5E7B6+582] (c:\chromium\src\gpu\command_buffer\client\gles2_implementation.cc:3467)
GLTestHelper::CheckPixels [0x00383C95+85] (c:\chromium\src\gpu\command_buffer\tests\gl_test_utils.cc:149)
gpu::GLCubeMapTextureTest_ReadPixels_Test::TestBody [0x00372732+1218] (c:\chromium\src\gpu\command_buffer\tests\gl_cube_map_texture_unittest.cc:121)
testing::Test::Run [0x003B73A0+224] (c:\chromium\src\testing\gtest\src\gtest.cc:2481)
testing::TestCase::Run [0x003B751B+267] (c:\chromium\src\testing\gtest\src\gtest.cc:2773)
testing::internal::UnitTestImpl::RunAllTests [0x003B7B49+665] (c:\chromium\src\testing\gtest\src\gtest.cc:4646)
testing::UnitTest::Run [0x003B788C+220] (c:\chromium\src\testing\gtest\src\gtest.cc:4258)
base::TestSuite::Run [0x003956D3+163] (c:\chromium\src\base\test\test_suite.cc:229)
`anonymous namespace'::RunHelper [0x00384E33+83] (c:\chromium\src\gpu\command_buffer\tests\gl_tests_main.cc:35)
base::`anonymous namespace'::LaunchUnitTestsInternal [0x00392702+722] (c:\chromium\src\base\test\launcher\unit_test_launcher.cc:222)
base::LaunchUnitTestsSerially [0x00392784+100] (c:\chromium\src\base\test\launcher\unit_test_launcher.cc:432)
main [0x00384EF2+130] (c:\chromium\src\gpu\command_buffer\tests\gl_tests_main.cc:53)
__tmainCRTStartup [0x00480D08+253] (f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:626)
BaseThreadInitThunk [0x752E7C04+36]
RtlInitializeExceptionChain [0x771DAD1F+143]
RtlInitializeExceptionChain [0x771DACEA+90]
 
Blocking: chromium:517548
Cc: siev...@chromium.org bajones@chromium.org
geofflang, zmo, could you fix the ANGLE crash?
You can reproduce it using GLCubeMapTextureTest.ReadPixels in https://codereview.chromium.org/1280163004/diff/60001/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc
Comment 4 by kbr@chromium.org, Aug 11 2015
Cc: jmad...@chromium.org
Owner: hendr...@chromium.org
Status: Assigned
I'll take a quick look
Project Member Comment 6 by bugdroid1@chromium.org, Aug 16 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1eebeac3e05c2035139c04226b34cef745cfd822

commit 1eebeac3e05c2035139c04226b34cef745cfd822
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Sun Aug 16 08:10:57 2015

gpu: workaround force_cube_map_positive_x_allocation fixes Android crash.

Adreno Android (e.g. Nexus5) crashes on allocating a cube map texture bound to FBO, if
the CUBE_MAP_POSITIVE_X texture is not allocated yet. The Workaround forces to allocate
the CUBE_MAP_POSITIVE_X texture.

Add new unittests to prevent regression. ANGLE crashes on GLCubeMapTextureTest.ReadPixels
It's will be fixed in ANGLE project.

TEST=gl_tests.GLCubeMapTextureTests.*
BUG=518889

Review URL: https://codereview.chromium.org/1280163004

Cr-Commit-Position: refs/heads/master@{#343600}

[modify] http://crrev.com/1eebeac3e05c2035139c04226b34cef745cfd822/gpu/BUILD.gn
[modify] http://crrev.com/1eebeac3e05c2035139c04226b34cef745cfd822/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] http://crrev.com/1eebeac3e05c2035139c04226b34cef745cfd822/gpu/command_buffer/service/texture_manager.cc
[modify] http://crrev.com/1eebeac3e05c2035139c04226b34cef745cfd822/gpu/command_buffer/service/texture_manager.h
[add] http://crrev.com/1eebeac3e05c2035139c04226b34cef745cfd822/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc
[modify] http://crrev.com/1eebeac3e05c2035139c04226b34cef745cfd822/gpu/config/gpu_driver_bug_list_json.cc
[modify] http://crrev.com/1eebeac3e05c2035139c04226b34cef745cfd822/gpu/config/gpu_driver_bug_workaround_type.h
[modify] http://crrev.com/1eebeac3e05c2035139c04226b34cef745cfd822/gpu/gpu.gyp

hendrikw, geofflang, zmo, could you fix the ANGLE crash?
You can reproduce it using gl_tests.

1. change source code
gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc
@@ -102,12 +102,7 @@ TEST_P(GLCubeMapTextureTest, ReadPixels) {
   EXPECT_TRUE(GL_NO_ERROR == glGetError());
 }
 
-#if defined(OS_WIN)
-// TODO(dshwang): ANGLE crashes. crbug.com/518889
-TEST_P(GLCubeMapTextureTest, DISABLED_ReadPixelsFromIncompleteFBO) {
-#else
 TEST_P(GLCubeMapTextureTest, ReadPixelsFromIncompleteFBO) {
-#endif
   GLenum cube_map_target = GetParam();
 
   glBindTexture(GL_TEXTURE_CUBE_MAP, texture_);

2. Run gl_tests
./out/Release/gl_tests --gtest_filter=*ReadPixelsFromIncompleteFBO*
Project Member Comment 8 by bugdroid1@chromium.org, Aug 17 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a814ea088d8c8f85485b3588996605767081cd79

commit a814ea088d8c8f85485b3588996605767081cd79
Author: jmadill <jmadill@chromium.org>
Date: Mon Aug 17 14:20:47 2015

Revert of gpu: workaround force_cube_map_positive_x_allocation fixes Android crash. (patchset #10 id:180001 of https://codereview.chromium.org/1280163004/ )

Reason for revert:
Causing failures on the Linux AMD GPU FYI bot.

[ RUN      ] GLCubeMapTextureTests/GLCubeMapTextureTest.ReadPixelsFromIncompleteFBO/5
Received signal 11 SEGV_MAPERR 000000000058
#0 0x000000486a35 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#1 0x7fe9b624ecb0 <unknown>
#2 0x7fe9b31f6b9e <unknown>
#3 0x7fe9b3209948 <unknown>
#4 0x7fe9b31d9d02 <unknown>
#5 0x7fe9b31d426e <unknown>
#6 0x7fe9b2fec29b <unknown>
#7 0x7fe9b268badd <unknown>
#8 0x0000005138c6 gpu::gles2::Framebuffer::GetStatus()
#9 0x000000537936 gpu::gles2::GLES2DecoderImpl::CheckFramebufferValid()

Original issue's description:
> gpu: workaround force_cube_map_positive_x_allocation fixes Android crash.
>
> Adreno Android (e.g. Nexus5) crashes on allocating a cube map texture bound to FBO, if
> the CUBE_MAP_POSITIVE_X texture is not allocated yet. The Workaround forces to allocate
> the CUBE_MAP_POSITIVE_X texture.
>
> Add new unittests to prevent regression. ANGLE crashes on GLCubeMapTextureTest.ReadPixels
> It's will be fixed in ANGLE project.
>
> TEST=gl_tests.GLCubeMapTextureTests.*
> BUG=518889
>
> Committed: https://crrev.com/1eebeac3e05c2035139c04226b34cef745cfd822
> Cr-Commit-Position: refs/heads/master@{#343600}

TBR=piman@chromium.org,zmo@google.com,kbr@chromium.org,sievers@chromium.org,dongseong.hwang@intel.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=518889

Review URL: https://codereview.chromium.org/1293123002

Cr-Commit-Position: refs/heads/master@{#343676}

[modify] http://crrev.com/a814ea088d8c8f85485b3588996605767081cd79/gpu/BUILD.gn
[modify] http://crrev.com/a814ea088d8c8f85485b3588996605767081cd79/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] http://crrev.com/a814ea088d8c8f85485b3588996605767081cd79/gpu/command_buffer/service/texture_manager.cc
[modify] http://crrev.com/a814ea088d8c8f85485b3588996605767081cd79/gpu/command_buffer/service/texture_manager.h
[delete] http://crrev.com/e5e7aa9323e8391a36a2e2a624078279362f62c6/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc
[modify] http://crrev.com/a814ea088d8c8f85485b3588996605767081cd79/gpu/config/gpu_driver_bug_list_json.cc
[modify] http://crrev.com/a814ea088d8c8f85485b3588996605767081cd79/gpu/config/gpu_driver_bug_workaround_type.h
[modify] http://crrev.com/a814ea088d8c8f85485b3588996605767081cd79/gpu/gpu.gyp

Comment 9 by kbr@chromium.org, Aug 18 2015
Blockedon: chromium:521578
Blockedon: chromium:521904
Blockedon: chromium:528145
Owner: ----
Status: Available
I won't have time to look at this after all.
Comment 13 by zmo@chromium.org, Mar 11 2016
Jamie, Geoff, can one of you take a shot at this?

The workaround is really nasty.
Cc: ynovikov@chromium.org
This affects Android? CC'ing Yuly who's looking into ANGLE on Android.
Comment 15 by zmo@chromium.org, Mar 12 2016
It affects Android Adreno, Linux ATI, and then ANGLE.
Project Member Comment 16 by sheriffbot@chromium.org, Mar 13
Labels: Hotlist-Recharge-Cold
Status: Untriaged
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: dongseon...@intel.com
dongseong.hwang@, do we still need to do something here?
ReadPixelsFromIncompleteFBO was deleted in https://codereview.chromium.org/1298263002.
A similar test, ReadPixelsFromIncompleteCubeTexture was added in https://codereview.chromium.org/1286193008, and looks like it passes everywhere.
Status: Assigned
Sign in to add a comment