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

Issue 9570023: Fails glLinkProgram if two glBindAttribLocation conflicts. (Closed)

Created:
8 years, 9 months ago by Zhenyao Mo
Modified:
8 years, 9 months ago
Reviewers:
gman1, greggman
CC:
chromium-reviews, apatrick_chromium
Visibility:
Public.

Description

Fails glLinkProgram if two glBindAttribLocation conflicts. i.e., two declared attributes are bound to the same location, then we fail the link. Many drivers already do this, but not all of them. For example, mesa does not, and it caused memory corruption actually. So we do this in chrome command buffer. BUG=112569 TEST=test case in 112569 R=gman Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=124707

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -1 line) Patch
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/program_manager.h View 1 2 2 chunks +14 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/program_manager.cc View 1 2 3 chunks +30 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/program_manager_unittest.cc View 1 2 3 3 chunks +81 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Zhenyao Mo
Please review.
8 years, 9 months ago (2012-03-01 19:54:28 UTC) #1
greggman
can you add a unit test? https://chromiumcodereview.appspot.com/9570023/diff/1005/gpu/command_buffer/service/program_manager.cc File gpu/command_buffer/service/program_manager.cc (right): https://chromiumcodereview.appspot.com/9570023/diff/1005/gpu/command_buffer/service/program_manager.cc#newcode450 gpu/command_buffer/service/program_manager.cc:450: std::map<GLint, int> location_binding_count; ...
8 years, 9 months ago (2012-03-01 22:49:36 UTC) #2
Zhenyao Mo
Revised and added a unit test. Please have another look.
8 years, 9 months ago (2012-03-02 00:40:27 UTC) #3
greggman
lgtm though it seems like a unit test that calls ProgramManager::Link would be good https://chromiumcodereview.appspot.com/9570023/diff/7001/gpu/command_buffer/service/program_manager_unittest.cc ...
8 years, 9 months ago (2012-03-02 01:32:36 UTC) #4
Zhenyao Mo
8 years, 9 months ago (2012-03-02 18:58:21 UTC) #5
Updated the unittest to do Link()

https://chromiumcodereview.appspot.com/9570023/diff/7001/gpu/command_buffer/s...
File gpu/command_buffer/service/program_manager_unittest.cc (right):

https://chromiumcodereview.appspot.com/9570023/diff/7001/gpu/command_buffer/s...
gpu/command_buffer/service/program_manager_unittest.cc:974: // Set up prgram
On 2012/03/02 01:32:36, greggman wrote:
> prgram->program

Done.

Powered by Google App Engine
This is Rietveld 408576698