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

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: rebase 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 15209 matching lines...) Expand 10 before | Expand all | Expand 10 after
15220 } 15220 }
15221 15221
15222 if ((components != 0 && gen_mode == GL_NONE) || 15222 if ((components != 0 && gen_mode == GL_NONE) ||
15223 (components == 0 && gen_mode != GL_NONE)) { 15223 (components == 0 && gen_mode != GL_NONE)) {
15224 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, kFunctionName, 15224 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, kFunctionName,
15225 "components and genMode do not match"); 15225 "components and genMode do not match");
15226 return error::kNoError; 15226 return error::kNoError;
15227 } 15227 }
15228 15228
15229 GLint location = static_cast<GLint>(c.location); 15229 GLint location = static_cast<GLint>(c.location);
15230 if (location == -1) { 15230 if (program->IsInactiveFragmentInputLocationByFakeLocation(location))
15231 return error::kNoError; 15231 return error::kNoError;
15232 }
15233 15232
15234 const Program::FragmentInputInfo* fragment_input_info = 15233 const Program::FragmentInputInfo* fragment_input_info =
15235 program->GetFragmentInputInfoByFakeLocation(location); 15234 program->GetFragmentInputInfoByFakeLocation(location);
15236 if (!fragment_input_info) { 15235 if (!fragment_input_info) {
15237 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, kFunctionName, "unknown location"); 15236 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, kFunctionName, "unknown location");
15238 return error::kNoError; 15237 return error::kNoError;
15239 } 15238 }
15240 GLint real_location = fragment_input_info->location; 15239 GLint real_location = fragment_input_info->location;
15241 15240
15242 const GLfloat* coeffs = NULL; 15241 const GLfloat* coeffs = NULL;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
15293 return error::kNoError; 15292 return error::kNoError;
15294 } 15293 }
15295 15294
15296 // Include the auto-generated part of this file. We split this because it means 15295 // Include the auto-generated part of this file. We split this because it means
15297 // we can easily edit the non-auto generated parts right here in this file 15296 // we can easily edit the non-auto generated parts right here in this file
15298 // instead of having to edit some template or the code generator. 15297 // instead of having to edit some template or the code generator.
15299 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 15298 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
15300 15299
15301 } // namespace gles2 15300 } // namespace gles2
15302 } // namespace gpu 15301 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/GLES2/extensions/CHROMIUM/CHROMIUM_path_rendering.txt ('k') | gpu/command_buffer/service/program_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698