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

Issue 2164723003: Fix gpu mipmap support on ChromeOS (Closed)

Created:
4 years, 5 months ago by Justin Novosad
Modified:
4 years, 5 months ago
Reviewers:
marcheu, Zhenyao Mo, piman, spang
CC:
chromium-reviews, piman+watch_chromium.org, Geoff Lang
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix gpu mipmap support on ChromeOS Fix gl version info check used to control texture internal format substitutions so that it does the right thing on ChromeOS. Without this substitution we'd hit a Mesa bug that prevents mipmapping from working when the internal format is GL_BGRA BUG=540761 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/0c614148f9336a81f3cdbc2da692528811f15fc8 Cr-Commit-Position: refs/heads/master@{#406924}

Patch Set 1 #

Total comments: 3

Patch Set 2 : alternate fix #

Patch Set 3 : this really fixes it #

Patch Set 4 : added comment #

Patch Set 5 : fix indentation #

Total comments: 2

Patch Set 6 : restrict fix to ES3 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -2 lines) Patch
M gpu/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A gpu/command_buffer/tests/gl_bgra_mipmap_unittest.cc View 1 chunk +50 lines, -0 lines 0 comments Download
M gpu/gpu.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_gl_api_implementation.cc View 1 2 3 4 5 2 chunks +7 lines, -2 lines 0 comments Download
M ui/gl/gl_version_info.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_version_info.cc View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 60 (23 generated)
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-19 18:11:53 UTC) #4
Justin Novosad
PTAL
4 years, 5 months ago (2016-07-19 18:36:26 UTC) #6
Zhenyao Mo
Looks good to me, but I don't know much about the BGRA usage on desktop ...
4 years, 5 months ago (2016-07-19 19:49:42 UTC) #9
piman
https://codereview.chromium.org/2164723003/diff/1/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/2164723003/diff/1/gpu/command_buffer/service/texture_manager.cc#newcode2890 gpu/command_buffer/service/texture_manager.cc:2890: return GL_RGBA8; This transformation should already happen at a ...
4 years, 5 months ago (2016-07-19 20:32:31 UTC) #10
Justin Novosad
https://codereview.chromium.org/2164723003/diff/1/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/2164723003/diff/1/gpu/command_buffer/service/texture_manager.cc#newcode2890 gpu/command_buffer/service/texture_manager.cc:2890: return GL_RGBA8; Thanks for pointing this out. I did ...
4 years, 5 months ago (2016-07-19 21:45:26 UTC) #11
piman
https://codereview.chromium.org/2164723003/diff/1/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/2164723003/diff/1/gpu/command_buffer/service/texture_manager.cc#newcode2890 gpu/command_buffer/service/texture_manager.cc:2890: return GL_RGBA8; On 2016/07/19 21:45:25, Justin Novosad wrote: > ...
4 years, 5 months ago (2016-07-19 21:56:09 UTC) #12
Justin Novosad
What I am observing on ChromeOS is that according to g_gl_implementation (in src/ui/gl/gl_implementation.cc), the implementation ...
4 years, 5 months ago (2016-07-19 21:59:14 UTC) #13
Justin Novosad
I am not super familiar with this area of the code, but it looks to ...
4 years, 5 months ago (2016-07-19 22:23:58 UTC) #14
piman
On Tue, Jul 19, 2016 at 2:59 PM, <junov@chromium.org> wrote: > What I am observing ...
4 years, 5 months ago (2016-07-19 22:52:15 UTC) #15
Justin Novosad
That worked. New Patch.
4 years, 5 months ago (2016-07-20 14:31:55 UTC) #16
Justin Novosad
On 2016/07/20 14:31:55, Justin Novosad wrote: > That worked. New Patch. Something I noticed: I ...
4 years, 5 months ago (2016-07-20 14:43:31 UTC) #17
piman
On 2016/07/20 14:43:31, Justin Novosad wrote: > On 2016/07/20 14:31:55, Justin Novosad wrote: > > ...
4 years, 5 months ago (2016-07-20 22:28:15 UTC) #19
piman
LGTM on this. This looks like a strict improvement. But I'm really wondering what's going ...
4 years, 5 months ago (2016-07-20 22:29:53 UTC) #20
piman
On Wed, Jul 20, 2016 at 7:43 AM, <junov@chromium.org> wrote: > On 2016/07/20 14:31:55, Justin ...
4 years, 5 months ago (2016-07-20 22:36:03 UTC) #21
marcheu1
On 2016/07/20 22:36:03, piman wrote: > On Wed, Jul 20, 2016 at 7:43 AM, <mailto:junov@chromium.org> ...
4 years, 5 months ago (2016-07-20 23:28:19 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2164723003/20001
4 years, 5 months ago (2016-07-21 14:00:53 UTC) #24
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-21 14:00:55 UTC) #25
Justin Novosad
On 2016/07/20 23:28:19, marcheu1 wrote: > On 2016/07/20 22:36:03, piman wrote: > > On Wed, ...
4 years, 5 months ago (2016-07-21 14:02:15 UTC) #26
Justin Novosad
I stopped the commit. This patch does not actually fix the bug. I must have ...
4 years, 5 months ago (2016-07-21 14:38:02 UTC) #28
Justin Novosad
New Patch
4 years, 5 months ago (2016-07-21 15:02:15 UTC) #31
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-21 15:02:15 UTC) #32
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-21 15:04:49 UTC) #35
spang
On Wed, Jul 20, 2016 at 6:35 PM Antoine Labour <piman@chromium.org> wrote: > > > ...
4 years, 5 months ago (2016-07-21 15:30:16 UTC) #36
piman
+marcheu is this a known mesa bug? https://codereview.chromium.org/2164723003/diff/80001/ui/gl/gl_gl_api_implementation.cc File ui/gl/gl_gl_api_implementation.cc (right): https://codereview.chromium.org/2164723003/diff/80001/ui/gl/gl_gl_api_implementation.cc#newcode46 ui/gl/gl_gl_api_implementation.cc:46: return GL_RGBA; ...
4 years, 5 months ago (2016-07-21 16:31:38 UTC) #40
Justin Novosad
https://codereview.chromium.org/2164723003/diff/80001/ui/gl/gl_gl_api_implementation.cc File ui/gl/gl_gl_api_implementation.cc (right): https://codereview.chromium.org/2164723003/diff/80001/ui/gl/gl_gl_api_implementation.cc#newcode46 ui/gl/gl_gl_api_implementation.cc:46: return GL_RGBA; On 2016/07/21 16:31:37, piman wrote: > This ...
4 years, 5 months ago (2016-07-21 17:33:57 UTC) #41
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-21 17:34:37 UTC) #44
piman
Ok, reluctant LGTM, we should really do this through a workaround, but it's hard to ...
4 years, 5 months ago (2016-07-21 18:14:46 UTC) #45
Justin Novosad
Should I file the bug in Mesa's issue tracker or in ours?
4 years, 5 months ago (2016-07-21 18:51:12 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2164723003/100001
4 years, 5 months ago (2016-07-21 18:51:47 UTC) #50
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-21 18:51:49 UTC) #51
marcheu1
On 2016/07/21 18:14:46, piman wrote: > Ok, reluctant LGTM, we should really do this through ...
4 years, 5 months ago (2016-07-21 18:54:13 UTC) #52
Justin Novosad
On 2016/07/21 18:54:13, marcheu1 wrote: > On 2016/07/21 18:14:46, piman wrote: > > Ok, reluctant ...
4 years, 5 months ago (2016-07-21 18:55:47 UTC) #53
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 5 months ago (2016-07-21 18:56:20 UTC) #55
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/0c614148f9336a81f3cdbc2da692528811f15fc8 Cr-Commit-Position: refs/heads/master@{#406924}
4 years, 5 months ago (2016-07-21 18:58:01 UTC) #57
marcheu1
On 2016/07/21 18:55:47, Justin Novosad wrote: > On 2016/07/21 18:54:13, marcheu1 wrote: > > On ...
4 years, 5 months ago (2016-07-21 19:01:12 UTC) #58
Justin Novosad
My understanding is that ES2 requires the internal and external format to be the same ...
4 years, 5 months ago (2016-07-21 19:20:00 UTC) #59
piman
4 years, 5 months ago (2016-07-21 19:51:58 UTC) #60
Message was sent while issue was closed.
On Thu, Jul 21, 2016 at 12:20 PM, <junov@chromium.org> wrote:

> My understanding is that ES2 requires the internal and external format to
> be the
> same value.
>

Correct.


> Currently, skia uses BGRA on ES2 profiles if it detects the extension
> GL_EXT_texture_format_BGRA8888
>

Actually, BGRA is not even in core ES3. The only way to have BGRA on ES (2
or 3) is via  GL_EXT_texture_format_BGRA8888 or
GL_APPLE_texture_format_BGRA8888.
Mesa exposes the former. It is specified against ES2 (well, ES1 actually),
and still requires internal_format == format as is the case on unextended
ES2.
There is no specific mention of the interaction with ES3 which suggests the
same constraint is still true, as is the case with other unsized internal
formats in ES3 - see section 3.7.2 Transfer of Pixel Rectangles, table 3.3.

(this is as opposed to desktop GL where the internal format would be
GL_RGBA or GL_RGBA8).


>
>
>
>
> https://codereview.chromium.org/2164723003/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698