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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1415763009: command_buffer: Make inactive bound fragment inputs reserve the location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@binduniformlocation-reserve-location
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 15517 matching lines...) Expand 10 before | Expand all | Expand 10 after
15528 } 15528 }
15529 15529
15530 if ((components != 0 && gen_mode == GL_NONE) || 15530 if ((components != 0 && gen_mode == GL_NONE) ||
15531 (components == 0 && gen_mode != GL_NONE)) { 15531 (components == 0 && gen_mode != GL_NONE)) {
15532 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, kFunctionName, 15532 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, kFunctionName,
15533 "components and genMode do not match"); 15533 "components and genMode do not match");
15534 return error::kNoError; 15534 return error::kNoError;
15535 } 15535 }
15536 15536
15537 GLint location = static_cast<GLint>(c.location); 15537 GLint location = static_cast<GLint>(c.location);
15538 if (location == -1) { 15538 if (program->IsInactiveFragmentInputLocationByFakeLocation(location))
15539 return error::kNoError; 15539 return error::kNoError;
15540 }
15541 15540
15542 const Program::FragmentInputInfo* fragment_input_info = 15541 const Program::FragmentInputInfo* fragment_input_info =
15543 program->GetFragmentInputInfoByFakeLocation(location); 15542 program->GetFragmentInputInfoByFakeLocation(location);
15544 if (!fragment_input_info) { 15543 if (!fragment_input_info) {
15545 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, kFunctionName, "unknown location"); 15544 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, kFunctionName, "unknown location");
15546 return error::kNoError; 15545 return error::kNoError;
15547 } 15546 }
15548 GLint real_location = fragment_input_info->location; 15547 GLint real_location = fragment_input_info->location;
15549 15548
15550 const GLfloat* coeffs = NULL; 15549 const GLfloat* coeffs = NULL;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
15601 return error::kNoError; 15600 return error::kNoError;
15602 } 15601 }
15603 15602
15604 // Include the auto-generated part of this file. We split this because it means 15603 // Include the auto-generated part of this file. We split this because it means
15605 // we can easily edit the non-auto generated parts right here in this file 15604 // we can easily edit the non-auto generated parts right here in this file
15606 // instead of having to edit some template or the code generator. 15605 // instead of having to edit some template or the code generator.
15607 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 15606 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
15608 15607
15609 } // namespace gles2 15608 } // namespace gles2
15610 } // namespace gpu 15609 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698