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

Issue 604436 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 429053



Sign in to add a comment

BindBufferRange behaves differently in ES and Desktop GL

Project Member Reported by zmo@chromium.org, Apr 18 2016

Issue description

On Desktop GL, "The error INVALID_VALUE is generated if offset + size is greater than the value of BUFFER_SIZE."

On ES 3.0, "Regardless of the size specified with BindBufferRange, the GL will never read or write beyond the end of a bound buffer."

So we will need to emulate the ES behavior on top of Desktop GL.
 

Comment 1 by zmo@chromium.org, Apr 18 2016

Both conformance2/buffers/buffer-overflow-test.html
and conformance2/buffers/buffer-type-restrictions.html
test about this.

Both fail on Mac OSX, core profile.
Interestingly, both pass on Linux, AMD and NVIDIA, compatibility profile.

Comment 2 by zmo@chromium.org, Apr 20 2016

OK, further clarification, On OpenGL 4.1, "The error INVALID_VALUE is generated if offset + size is greater than the value of BUFFER_SIZE."

However, on OpenGL 4.2 or above, the behavior has been changed and is the same as ES3.

That's why we see the tests fail on Mac (4.1 or lower) but pass on Linux (4.2 and above).
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 21 2016

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

commit 706399be0de1905a9aa03b47852c0dc093b7232b
Author: zmo <zmo@chromium.org>
Date: Thu Apr 21 00:01:08 2016

Improve BindBufferBase/BindBufferRange in GPU command buffer.

The first step to emulate ES3 BindBufferRange semantics on
Desktop GL 4.1 or lower.

BUG= 604436 
TEST=gpu_unittests
R=piman@chromium.org
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

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

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

[modify] https://crrev.com/706399be0de1905a9aa03b47852c0dc093b7232b/gpu/command_buffer/service/context_group.cc
[modify] https://crrev.com/706399be0de1905a9aa03b47852c0dc093b7232b/gpu/command_buffer/service/context_group.h
[modify] https://crrev.com/706399be0de1905a9aa03b47852c0dc093b7232b/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/706399be0de1905a9aa03b47852c0dc093b7232b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc
[modify] https://crrev.com/706399be0de1905a9aa03b47852c0dc093b7232b/gpu/command_buffer/service/test_helper.cc
[modify] https://crrev.com/706399be0de1905a9aa03b47852c0dc093b7232b/gpu/command_buffer/service/test_helper.h

Project Member

Comment 4 by bugdroid1@chromium.org, May 4 2016

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

commit 6c468baf6600fe4846e73203ce2e83398ee73813
Author: zmo <zmo@chromium.org>
Date: Wed May 04 20:00:51 2016

Implement TransformFeedbackManager in GPU command buffer.

A few design points:
1) create a "default" transform feedback for each context (instead of using
   the default 0). This will make context switching easier.
2) Emulate BindBufferRange behaviors on GL 4.1 or lower by tracking indexed
   buffer bindings.

WHat's left to be done:
1) Intercept GetIntegeri_v and GetIntegeri64_v on GL 4.1 or lower (due to the
   emulation)
2) Hook up indexed buffer bindings to Program (for uniform buffer bindings)

BUG= 604436 
TEST=gpu_unittests,webgl2_conformance
R=piman@chromium.org
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

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

[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/BUILD.gn
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/build_gles2_cmd_buffer.py
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/BUILD.gn
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/buffer_manager.cc
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/buffer_manager.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/context_group.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/context_state.cc
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/context_state.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc
[add] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/indexed_buffer_binding_host.cc
[add] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/indexed_buffer_binding_host.h
[add] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/indexed_buffer_binding_host_unittest.cc
[add] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/transform_feedback_manager.cc
[add] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/transform_feedback_manager.h
[add] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer/service/transform_feedback_manager_unittest.cc
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/command_buffer_service.gypi
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/gpu/gpu.gyp
[modify] https://crrev.com/6c468baf6600fe4846e73203ce2e83398ee73813/mojo/gpu/mojo_gles2_impl_autogen.h

Project Member

Comment 5 by bugdroid1@chromium.org, May 6 2016

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

commit 48ee6d3fd938f151f1d3f84c8e54738438c86de0
Author: zmo <zmo@chromium.org>
Date: Fri May 06 20:33:26 2016

Improve indexed gl state related GL commands.

1) draw* calls check for transformfeedback states.
2) add auto-generated parameter validation for unsafe commands
   (and remove them from handwritten code)
3) Implement indexed UNIFORM_BUFFER bindings tracking and
   restoring in context switching
4) shadow GetIntegeri_v and GetInteger64i_v
5) Improve validation for FramebufferTextureLayer().

BUG= 604436 
TEST=gpu_unittests, webgl2_conformance
R=piman@chromium.org,kbr@chromium.org
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

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

[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/build_gles2_cmd_buffer.py
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/cmd_buffer_functions.txt
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/context_state.cc
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/context_state.h
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/gles2_cmd_validation_autogen.h
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/indexed_buffer_binding_host.cc
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/indexed_buffer_binding_host.h
[modify] https://crrev.com/48ee6d3fd938f151f1d3f84c8e54738438c86de0/gpu/command_buffer/service/indexed_buffer_binding_host_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, May 6 2016

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

commit 4e8906698d053c56d8331eb6715ba27a9b08b5f5
Author: zmo <zmo@chromium.org>
Date: Fri May 06 23:40:41 2016

Fix a bug related with indexed buffer binding.

With bindBufferBase/bindBufferRange, the non-indexed binding should also be set.

BUG= 604436 
TEST=webgl2_conformance
R=piman@chromium.org
NOTRY=true
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

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

[modify] https://crrev.com/4e8906698d053c56d8331eb6715ba27a9b08b5f5/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
[modify] https://crrev.com/4e8906698d053c56d8331eb6715ba27a9b08b5f5/gpu/command_buffer/service/gles2_cmd_decoder.cc

Project Member

Comment 7 by bugdroid1@chromium.org, May 15 2016

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

commit 83810f7de22537159e4625147a24ea55d9b38ffe
Author: zmo <zmo@chromium.org>
Date: Sun May 15 23:18:09 2016

Remove a webgl 2 conformance test from flaky list.

Now we handled transform feedback state tracking in context switching,
(see https://codereview.chromium.org/1922633002/), the flakiness should
be gone (in theory).

BUG= 604436 
TEST=webgl2_conformance
R=kbr@chromium.org
NOTRY=true
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

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

[modify] https://crrev.com/83810f7de22537159e4625147a24ea55d9b38ffe/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py

Comment 8 by zmo@chromium.org, Nov 8 2016

Status: Fixed (was: Assigned)
Components: -Internals>GPU>WebGL Blink>WebGL

Sign in to add a comment