|
|
DescriptionAdd a workaround for copyTexImage2D as it is sometimes broken on OSX.
copyTexImage2D fails when all of these conditions are met:
1. The internal format of the new texture is GL_ALPHA, GL_RED, or GL_RG. There
are probably a couple more. GL_RGB and GL_RGBA always work fine.
2. The GPU is from Nvidia.
3. The source texture is backed by an IOSurface.
BUG=581777
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel
Committed: https://crrev.com/38cbbce8977df77712707f9f64ae2e0b15e6f201
Cr-Commit-Position: refs/heads/master@{#381488}
Patch Set 1 #Patch Set 2 : Typo in comment. #Patch Set 3 : Rebase. #Patch Set 4 : Restrict workaround to Nvidia GPUs. #
Total comments: 11
Patch Set 5 : Rebase. #Patch Set 6 : Working test, maybe. [temp not ready for review] #Patch Set 7 : Add test. #Patch Set 8 : Test working locally. [Not ready for review]. #Patch Set 9 : Fix tests. #Patch Set 10 : Rebase. #Patch Set 11 : Comments from kbr. #
Total comments: 8
Patch Set 12 : Comments from zmo. #
Total comments: 4
Patch Set 13 : Comments from kbr. #Patch Set 14 : Compile error, nits. #
Total comments: 3
Messages
Total messages: 53 (22 generated)
Description was changed from ========== Add a workaround for copyTexImage2D as it is sometimes broken on OSX. copyTexImage2D fails when all of these conditions are met: 1. The internal format of the new texture is GL_ALPHA, GL_RED, or GL_RG. There are probably a couple more. GL_RGB and GL_RGBA always work fine. 2. The machine is a MacBookPro, not a MacPro. 3. The source texture is backed by an IOSurface. BUG=581777 ========== to ========== Add a workaround for copyTexImage2D as it is sometimes broken on OSX. copyTexImage2D fails when all of these conditions are met: 1. The internal format of the new texture is GL_ALPHA, GL_RED, or GL_RG. There are probably a couple more. GL_RGB and GL_RGBA always work fine. 2. The machine is a MacBookPro, not a MacPro. 3. The source texture is backed by an IOSurface. BUG=581777 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ==========
The CQ bit was checked by [email protected] to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736093002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736093002/20001
The CQ bit was unchecked by [email protected]
Dry run: Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...) cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator...) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ni...) win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/...) win_optional_gpu_tests_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_optional_gpu_...)
The CQ bit was checked by [email protected] to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736093002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736093002/40001
Description was changed from ========== Add a workaround for copyTexImage2D as it is sometimes broken on OSX. copyTexImage2D fails when all of these conditions are met: 1. The internal format of the new texture is GL_ALPHA, GL_RED, or GL_RG. There are probably a couple more. GL_RGB and GL_RGBA always work fine. 2. The machine is a MacBookPro, not a MacPro. 3. The source texture is backed by an IOSurface. BUG=581777 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Add a workaround for copyTexImage2D as it is sometimes broken on OSX. copyTexImage2D fails when all of these conditions are met: 1. The internal format of the new texture is GL_ALPHA, GL_RED, or GL_RG. There are probably a couple more. GL_RGB and GL_RGBA always work fine. 2. The GPU is from Nvidia. 3. The source texture is backed by an IOSurface. BUG=581777 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ==========
The CQ bit was checked by [email protected] to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736093002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736093002/60001
The CQ bit was unchecked by [email protected]
Dry run: This issue passed the CQ dry run.
[email protected] changed reviewers: + [email protected]
kbr: Please review. This CL causes the test conformance_textures_misc_copy_tex_image_2d_formats to pass when IOSurfaces are enabled for WebGL. Let me know if you want a more explicit test.
[email protected] changed reviewers: + [email protected], [email protected], [email protected]
The code changes look OK, but I am not an owner in this directory. CC'ing a few. One question. https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11563: glBindTexture(original_texture_target, temp_texture); This breaks the texture binding to |original_texture_target|. Does the glBindTexture(target, service_id) below really reset it to its original state? It's very important that this function restore all user-visible state after it's called. Are there any unit tests for this code path? It would be really good to add one. https://codereview.chromium.org/1736093002/diff/60001/gpu/config/gpu_driver_b... File gpu/config/gpu_driver_bug_list_json.cc (right): https://codereview.chromium.org/1736093002/diff/60001/gpu/config/gpu_driver_b... gpu/config/gpu_driver_bug_list_json.cc:22: "version": "8.45", Please update the version number.
https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11564: glTexParameteri(original_texture_target, GL_TEXTURE_MIN_FILTER, Why do you need to worry about tex parameters here? They make no difference in glCopyTexImage https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11576: glFramebufferTexture2DEXT(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, If this is on top of ES2, then READ_FRAMEBUFFER isn't a valid target. Since you didn't specialize the workaround to be mac only, so maybe it's better to be cautious here also. https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11587: glFramebufferTexture2DEXT(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, and here.
The CQ bit was checked by [email protected] to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736093002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736093002/140001
The CQ bit was unchecked by [email protected]
Dry run: 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_...)
The CQ bit was checked by [email protected] to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736093002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736093002/160001
The CQ bit was unchecked by [email protected]
Dry run: Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator...) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator...) ios_rel_device_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_gn...) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ni...) mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_r...) mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by [email protected] to run a CQ dry run
kbr, zmo: PTAL https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11563: glBindTexture(original_texture_target, temp_texture); On 2016/02/29 22:06:45, Ken Russell wrote: > This breaks the texture binding to |original_texture_target|. Does the > glBindTexture(target, service_id) below really reset it to its original state? > It's very important that this function restore all user-visible state after it's > called. > > Are there any unit tests for this code path? It would be really good to add one. I believe it does. Do you have reason to believe that texture binding does not get reset to its original state? I could use a ScopedTextureBinder if you want, although it requires some odd scoping. I added a gl_test that fails when the workaround is disabled, and succeeds when the workaround is enabled. https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11564: glTexParameteri(original_texture_target, GL_TEXTURE_MIN_FILTER, On 2016/03/02 00:22:40, Zhenyao Mo wrote: > Why do you need to worry about tex parameters here? They make no difference in > glCopyTexImage Removed. https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11576: glFramebufferTexture2DEXT(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, On 2016/03/02 00:22:40, Zhenyao Mo wrote: > If this is on top of ES2, then READ_FRAMEBUFFER isn't a valid target. > > Since you didn't specialize the workaround to be mac only, so maybe it's better > to be cautious here also. Done. https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11587: glFramebufferTexture2DEXT(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, On 2016/03/02 00:22:40, Zhenyao Mo wrote: > and here. Done. https://codereview.chromium.org/1736093002/diff/60001/gpu/config/gpu_driver_b... File gpu/config/gpu_driver_bug_list_json.cc (right): https://codereview.chromium.org/1736093002/diff/60001/gpu/config/gpu_driver_b... gpu/config/gpu_driver_bug_list_json.cc:22: "version": "8.45", On 2016/02/29 22:06:45, Ken Russell wrote: > Please update the version number. Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736093002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736093002/180001
https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11563: glBindTexture(original_texture_target, temp_texture); On 2016/03/14 23:57:30, erikchen wrote: > On 2016/02/29 22:06:45, Ken Russell wrote: > > This breaks the texture binding to |original_texture_target|. Does the > > glBindTexture(target, service_id) below really reset it to its original state? > > It's very important that this function restore all user-visible state after > it's > > called. > > > > Are there any unit tests for this code path? It would be really good to add > one. > > I believe it does. Do you have reason to believe that texture binding does not > get reset to its original state? Yes, because the code doesn't query the name of the texture object bound to the |original_texture_target| binding point, and re-bind it below. Instead, it calls: glBindTexture(target, service_id); It's difficult to reason about whether |target| and |original_texture_target| are guaranteed to be identical from reading the code. > I could use a ScopedTextureBinder if you want, > although it requires some odd scoping. If ScopedTextureBinder will make the code more contorted then let's not use it, but let's make it obvious from reading the code that all of the user-visible GL state has been restored. > I added a gl_test that fails when the workaround is disabled, and succeeds when > the workaround is enabled. Very good. The test should also verify that the binding to GL_TEXTURE_2D (or whatever other targets can be changed by this code -- GL_TEXTURE_RECTANGLE_ARB?) isn't changed during the CopyTexSubImage2D call.
The CQ bit was unchecked by [email protected]
Dry run: This issue passed the CQ dry run.
On 2016/03/15 00:47:38, Ken Russell wrote: > https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... > File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): > > https://codereview.chromium.org/1736093002/diff/60001/gpu/command_buffer/serv... > gpu/command_buffer/service/gles2_cmd_decoder.cc:11563: > glBindTexture(original_texture_target, temp_texture); > On 2016/03/14 23:57:30, erikchen wrote: > > On 2016/02/29 22:06:45, Ken Russell wrote: > > > This breaks the texture binding to |original_texture_target|. Does the > > > glBindTexture(target, service_id) below really reset it to its original > state? > > > It's very important that this function restore all user-visible state after > > it's > > > called. > > > > > > Are there any unit tests for this code path? It would be really good to add > > one. > > > > I believe it does. Do you have reason to believe that texture binding does not > > get reset to its original state? > > Yes, because the code doesn't query the name of the texture object bound to the > |original_texture_target| binding point, and re-bind it below. Instead, it > calls: > > glBindTexture(target, service_id); > > It's difficult to reason about whether |target| and |original_texture_target| > are guaranteed to be identical from reading the code. > > > I could use a ScopedTextureBinder if you want, > > although it requires some odd scoping. > > If ScopedTextureBinder will make the code more contorted then let's not use it, > but let's make it obvious from reading the code that all of the user-visible GL > state has been restored. > > > I added a gl_test that fails when the workaround is disabled, and succeeds > when > > the workaround is enabled. > > Very good. The test should also verify that the binding to GL_TEXTURE_2D (or > whatever other targets can be changed by this code -- GL_TEXTURE_RECTANGLE_ARB?) > isn't changed during the CopyTexSubImage2D call. I restructured the code slightly, and added more comments to alleviate the confusion. There are now locals: source_texture_target, source_texture_service_id, dest_texture_target, dest_texture_service_id which get reset at the end of the block. I modified the test to verify client bindings for GL_TEXTURE_2D and GL_TEXTURE_RECTANGLE_ARB. If you really want, I can add a unit test to gles2_cmd_decoder_unittest_textures.cc to verify the service bindings. I would prefer not to, since I dislike that style of unit test, which just copy-pastes the logic in mock form, and functions as a change-detector.
lgtm with nits fixed. https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... File gpu/command_buffer/tests/gl_manager.cc (right): https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... gpu/command_buffer/tests/gl_manager.cc:114: const gfx::Size& size, nit: wrong indent https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... File gpu/command_buffer/tests/gl_manager.h (right): https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... gpu/command_buffer/tests/gl_manager.h:96: void SetUseIOSurfaceMemoryBuffers(bool use_iosurface_memory_buffers); Nit: setter function should be named set_use_iosurface_memory_buffers() https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... gpu/command_buffer/tests/gl_manager.h:180: bool use_iosurface_memory_buffers_ = false; Is this even legal? Shouldn't it be initialized in the constructor instead? https://codereview.chromium.org/1736093002/diff/200001/gpu/config/gpu_driver_... File gpu/config/gpu_driver_bug_list_json.cc (right): https://codereview.chromium.org/1736093002/diff/200001/gpu/config/gpu_driver_... gpu/config/gpu_driver_bug_list_json.cc:22: "version": "8.49", Update the version here.
https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... File gpu/command_buffer/tests/gl_manager.cc (right): https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... gpu/command_buffer/tests/gl_manager.cc:114: const gfx::Size& size, On 2016/03/15 17:40:47, Zhenyao Mo wrote: > nit: wrong indent Done. https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... File gpu/command_buffer/tests/gl_manager.h (right): https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... gpu/command_buffer/tests/gl_manager.h:96: void SetUseIOSurfaceMemoryBuffers(bool use_iosurface_memory_buffers); On 2016/03/15 17:40:47, Zhenyao Mo wrote: > Nit: setter function should be named set_use_iosurface_memory_buffers() Done. Note that technically, Chrome style requires that inline functions use the style you mentioned. Setters, like SetSurface() on line 94, whose implementation is in the .cc file continue to use CapsLikeThis. https://codereview.chromium.org/1736093002/diff/200001/gpu/command_buffer/tes... gpu/command_buffer/tests/gl_manager.h:180: bool use_iosurface_memory_buffers_ = false; On 2016/03/15 17:40:48, Zhenyao Mo wrote: > Is this even legal? Shouldn't it be initialized in the constructor instead? This is a C++ 11 feature called in-class member initialization, and is allowed by the Chrome style guide. https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/zqB-DySA4V0 https://codereview.chromium.org/1736093002/diff/200001/gpu/config/gpu_driver_... File gpu/config/gpu_driver_bug_list_json.cc (right): https://codereview.chromium.org/1736093002/diff/200001/gpu/config/gpu_driver_... gpu/config/gpu_driver_bug_list_json.cc:22: "version": "8.49", On 2016/03/15 17:40:48, Zhenyao Mo wrote: > Update the version here. Oops. That got lost in a rebase. This class is not very rebase friendly. :(
piman: Please review gpu/BUILD.gn and gpu/gpu.gyp.
https://codereview.chromium.org/1736093002/diff/220001/gpu/command_buffer/ser... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1736093002/diff/220001/gpu/command_buffer/ser... gpu/command_buffer/service/gles2_cmd_decoder.cc:11682: glCopyTexImage2D(source_texture_target, 0, temp_internal_format, copyX, Is there any chance that source_texture_target will be something else than GL_TEXTURE_2D? If so, then this code needs to save/restore the source_texture_target texture binding (by querying it and resetting it afterward). https://codereview.chromium.org/1736093002/diff/220001/gpu/command_buffer/ser... gpu/command_buffer/service/gles2_cmd_decoder.cc:11695: glCopyTexImage2D(target, level, final_internal_format, 0, 0, copyWidth, This uses "target" while the glBindTexture call uses dest_texture_target. There should be a DCHECK that the two are the same.
https://codereview.chromium.org/1736093002/diff/220001/gpu/command_buffer/ser... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1736093002/diff/220001/gpu/command_buffer/ser... gpu/command_buffer/service/gles2_cmd_decoder.cc:11682: glCopyTexImage2D(source_texture_target, 0, temp_internal_format, copyX, On 2016/03/15 21:11:23, Ken Russell wrote: > Is there any chance that source_texture_target will be something else than > GL_TEXTURE_2D? If so, then this code needs to save/restore the > source_texture_target texture binding (by querying it and resetting it > afterward). Ooof. This is what I get for not using ScopedTextureBinder. I updated the logic to use that class. Please take another look and see if the logic scans well and appears correct. https://codereview.chromium.org/1736093002/diff/220001/gpu/command_buffer/ser... gpu/command_buffer/service/gles2_cmd_decoder.cc:11695: glCopyTexImage2D(target, level, final_internal_format, 0, 0, copyWidth, On 2016/03/15 21:11:23, Ken Russell wrote: > This uses "target" while the glBindTexture call uses dest_texture_target. There > should be a DCHECK that the two are the same. I switched both to use dest_texture_target. Actually, the former isn't necessary anymore because of ScopedTextureBinder.
Excellent work. The new code looks great. Thank you for persevering with it and for the good new test. LGTM. One question about the auxiliary changes (IOSurfaceGpuMemoryBuffer and users). https://codereview.chromium.org/1736093002/diff/260001/gpu/command_buffer/tes... File gpu/command_buffer/tests/gl_manager.cc (right): https://codereview.chromium.org/1736093002/diff/260001/gpu/command_buffer/tes... gpu/command_buffer/tests/gl_manager.cc:111: class IOSurfaceGpuMemoryBuffer : public gfx::GpuMemoryBuffer { Is this new code path tested?
https://codereview.chromium.org/1736093002/diff/260001/gpu/command_buffer/tes... File gpu/command_buffer/tests/gl_manager.cc (right): https://codereview.chromium.org/1736093002/diff/260001/gpu/command_buffer/tes... gpu/command_buffer/tests/gl_manager.cc:111: class IOSurfaceGpuMemoryBuffer : public gfx::GpuMemoryBuffer { On 2016/03/16 01:21:49, Ken Russell wrote: > Is this new code path tested? I'm not sure what you mean? If you're referring to whether IOSurfaceGpuMemoryBuffer is tested, no it's not [beyond its use in the new test]. But it's an anonymous class in a helper class for tests, so I don't see why we would test it?
https://codereview.chromium.org/1736093002/diff/260001/gpu/command_buffer/tes... File gpu/command_buffer/tests/gl_manager.cc (right): https://codereview.chromium.org/1736093002/diff/260001/gpu/command_buffer/tes... gpu/command_buffer/tests/gl_manager.cc:111: class IOSurfaceGpuMemoryBuffer : public gfx::GpuMemoryBuffer { On 2016/03/16 01:27:25, erikchen wrote: > On 2016/03/16 01:21:49, Ken Russell wrote: > > Is this new code path tested? > > I'm not sure what you mean? If you're referring to whether > IOSurfaceGpuMemoryBuffer is tested, no it's not [beyond its use in the new > test]. But it's an anonymous class in a helper class for tests, so I don't see > why we would test it? Sorry for the stupid question, but I didn't realize this was test-only code.
The CQ bit was checked by [email protected]
The patchset sent to the CQ was uploaded after l-g-t-m from [email protected] Link to the patchset: https://codereview.chromium.org/1736093002/#ps260001 (title: "Compile error, nits.")
The CQ bit was unchecked by [email protected]
The CQ bit was checked by [email protected] to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736093002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736093002/260001
The CQ bit was unchecked by [email protected]
Dry run: This issue passed the CQ dry run.
lgtm
The CQ bit was checked by [email protected]
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1736093002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1736093002/260001
Message was sent while issue was closed.
Committed patchset #14 (id:260001)
Message was sent while issue was closed.
Description was changed from ========== Add a workaround for copyTexImage2D as it is sometimes broken on OSX. copyTexImage2D fails when all of these conditions are met: 1. The internal format of the new texture is GL_ALPHA, GL_RED, or GL_RG. There are probably a couple more. GL_RGB and GL_RGBA always work fine. 2. The GPU is from Nvidia. 3. The source texture is backed by an IOSurface. BUG=581777 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Add a workaround for copyTexImage2D as it is sometimes broken on OSX. copyTexImage2D fails when all of these conditions are met: 1. The internal format of the new texture is GL_ALPHA, GL_RED, or GL_RG. There are probably a couple more. GL_RGB and GL_RGBA always work fine. 2. The GPU is from Nvidia. 3. The source texture is backed by an IOSurface. BUG=581777 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/38cbbce8977df77712707f9f64ae2e0b15e6f201 Cr-Commit-Position: refs/heads/master@{#381488} ==========
Message was sent while issue was closed.
Patchset 14 (id:??) landed as https://crrev.com/38cbbce8977df77712707f9f64ae2e0b15e6f201 Cr-Commit-Position: refs/heads/master@{#381488} |