Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Issue 1426903002: gpu: Make glTexSubImage2D work with GL_SRGB_ALPHA on OpenGL (Closed)

Created:
5 years, 1 month ago by Kimmo Kinnunen
Modified:
5 years, 1 month ago
Reviewers:
bajones, no sievers, piman
CC:
chromium-reviews, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

gpu: Make glTexSubImage2D work with GL_SRGB_ALPHA on OpenGL Make glTexSubImage2D work when client passes GL_SRGB_ALPHA as the format when running on OpenGL. Considering GL_SRGB_ALPHA texture: In OpenGL ES 2.0, Tex*Image2D format must be GL_SRGB_ALPHA (same as texture internal format). In OpenGL and OpenGL ES 3.0, format must not be GL_SRGB_ALPHA. The format was handled correctly for glTexImage2D, but not for glTexSubImage2D. The actual fix is to apply TextureManager::AdjustTexFormat to glTexSubImage2D format. Moves the glTexSubImage2D code from decoder to texture manager, and tries to follow the structure of glTexImage2D. This is due to hoping to reduce the amount of similar inconsistency bugs. The glTexSubImage3D, CopySubTexture* and compressed call variants are still potential sources of inconsistencies. The code duplication between glTexImage2D and glTexSubImage2D is not addressed, either. Changes the texture size of Service/GLES2DecoderTest.TexSubImage2DBadArgs. The check for behavior "!pixels -> kOutOfBounds" was moved before argument validation. In the test, there is a subtest that uses invalid type, GL_UNSIGNED_INT. This causes the texture data to be bigger than SHM buffer, the unexpected kOutOfBounds would be returned instead of normal GL error for invalid type. BUG=skia:2992 Committed: https://crrev.com/60da545176aed90d91874a456da2bac8b822c67d Cr-Commit-Position: refs/heads/master@{#356787} Committed: https://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4 Cr-Commit-Position: refs/heads/master@{#358578}

Patch Set 1 #

Total comments: 5

Patch Set 2 : rebase #

Patch Set 3 : address es3 #

Patch Set 4 : disable the test verification if it fails #

Total comments: 1

Patch Set 5 : use driver buglist to disable nexus5, 4.4.4 #

Patch Set 6 : remove an unneeded hunk now that workarounds are used #

Unified diffs Side-by-side diffs Delta from patch set Stats (+320 lines, -187 lines) Patch
M gpu/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/feature_info.cc View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 6 chunks +24 lines, -181 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.h View 1 2 3 4 2 chunks +37 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.cc View 1 2 3 4 3 chunks +158 lines, -0 lines 0 comments Download
A gpu/command_buffer/tests/gl_ext_srgb_unittest.cc View 1 2 3 4 5 1 chunk +74 lines, -0 lines 0 comments Download
M gpu/config/gpu_driver_bug_list_json.cc View 1 2 3 4 2 chunks +17 lines, -1 line 0 comments Download
M gpu/config/gpu_driver_bug_workaround_type.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/gpu.gyp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 44 (16 generated)
Kimmo Kinnunen
bajones: would you be able to review GL_EXT_sRGB -related fix? piman: added for .gyp/.gn files
5 years, 1 month ago (2015-10-28 14:17:40 UTC) #2
piman
LGTM. I would prefer if the AdjustTexFormat logic was moved to CustomTex[Sub]Image2D in gl_gl_api_implementation.cc similarly ...
5 years, 1 month ago (2015-10-28 20:16:16 UTC) #3
bajones
LGTM with a couple of nits https://codereview.chromium.org/1426903002/diff/1/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1426903002/diff/1/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode11161 gpu/command_buffer/service/gles2_cmd_decoder.cc:11161: return error::kOutOfBounds; Seems ...
5 years, 1 month ago (2015-10-28 20:23:26 UTC) #4
Kimmo Kinnunen
I'll not apply any nits and still commit. Feel free to revert if this is ...
5 years, 1 month ago (2015-10-29 06:21:18 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1426903002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1426903002/1
5 years, 1 month ago (2015-10-29 06:22:49 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/87453) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 1 month ago (2015-10-29 06:24:45 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1426903002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1426903002/20001
5 years, 1 month ago (2015-10-29 06:58:06 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 1 month ago (2015-10-29 09:27:53 UTC) #13
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/60da545176aed90d91874a456da2bac8b822c67d Cr-Commit-Position: refs/heads/master@{#356787}
5 years, 1 month ago (2015-10-29 09:29:13 UTC) #14
wychen
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/1418113009/ by wychen@chromium.org. ...
5 years, 1 month ago (2015-10-29 17:35:53 UTC) #15
boliu
On 2015/10/29 17:35:53, wychen wrote: > A revert of this CL (patchset #2 id:20001) has ...
5 years, 1 month ago (2015-10-29 17:47:39 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1426903002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1426903002/20001
5 years, 1 month ago (2015-10-30 09:53:16 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-10-30 10:54:22 UTC) #21
Kimmo Kinnunen
bajones: so there's a problem with Nexus5, Android 4.4.4. I filed it as: http://code.google.com/p/chromium/issues/detail?id=550292 Would ...
5 years, 1 month ago (2015-11-02 12:21:14 UTC) #23
Kimmo Kinnunen
On 2015/11/02 12:21:14, Kimmo Kinnunen wrote: > There's the problem that the real workaround becomes ...
5 years, 1 month ago (2015-11-02 12:22:47 UTC) #24
piman
+sievers for opinion. I would prefer if we disabled the extension on that configuration if ...
5 years, 1 month ago (2015-11-03 04:20:58 UTC) #26
piman
(I think it's unlikely we'll expose ES3.0 / WebGL2 on such an old configuration)
5 years, 1 month ago (2015-11-03 04:22:00 UTC) #27
no sievers
Blacklisting the extension sounds good, esp. if it was fixed in 5.0 (I'm therefore guessing ...
5 years, 1 month ago (2015-11-03 17:43:12 UTC) #28
no sievers
On 2015/11/03 17:43:12, sievers wrote: > Blacklisting the extension sounds good, esp. if it was ...
5 years, 1 month ago (2015-11-03 17:43:42 UTC) #29
Kimmo Kinnunen
On 2015/11/03 17:43:12, sievers wrote: > Blacklisting the extension sounds good, esp. if it was ...
5 years, 1 month ago (2015-11-04 08:47:28 UTC) #30
piman
LGTM, thanks!
5 years, 1 month ago (2015-11-04 18:07:23 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1426903002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1426903002/100001
5 years, 1 month ago (2015-11-05 06:26:24 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/130750)
5 years, 1 month ago (2015-11-05 07:42:28 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1426903002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1426903002/100001
5 years, 1 month ago (2015-11-06 11:22:31 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/137155)
5 years, 1 month ago (2015-11-06 12:33:32 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1426903002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1426903002/100001
5 years, 1 month ago (2015-11-09 09:47:33 UTC) #42
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 1 month ago (2015-11-09 11:14:09 UTC) #43
commit-bot: I haz the power
5 years, 1 month ago (2015-11-09 11:15:05 UTC) #44
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4
Cr-Commit-Position: refs/heads/master@{#358578}

Powered by Google App Engine
This is Rietveld 408576698