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

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

Issue 1236053003: texture mipmap level is not zero-only in ES 3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code rebase Created 5 years 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 6065 matching lines...) Expand 10 before | Expand all | Expand 10 after
6076 texture_ref = GetTexture(client_texture_id); 6076 texture_ref = GetTexture(client_texture_id);
6077 if (!texture_ref) { 6077 if (!texture_ref) {
6078 LOCAL_SET_GL_ERROR( 6078 LOCAL_SET_GL_ERROR(
6079 GL_INVALID_OPERATION, 6079 GL_INVALID_OPERATION,
6080 name, "unknown texture_ref"); 6080 name, "unknown texture_ref");
6081 return; 6081 return;
6082 } 6082 }
6083 service_id = texture_ref->service_id(); 6083 service_id = texture_ref->service_id();
6084 } 6084 }
6085 6085
6086 if (!texture_manager()->ValidForTarget(textarget, level, 0, 0, 1)) { 6086 if ((level > 0 && !feature_info_->IsES3Enabled()) ||
6087 !texture_manager()->ValidForTarget(textarget, level, 0, 0, 1)) {
6087 LOCAL_SET_GL_ERROR( 6088 LOCAL_SET_GL_ERROR(
6088 GL_INVALID_VALUE, 6089 GL_INVALID_VALUE,
6089 name, "level out of range"); 6090 name, "level out of range");
6090 return; 6091 return;
6091 } 6092 }
6092 6093
6093 if (texture_ref) 6094 if (texture_ref)
6094 DoCopyTexImageIfNeeded(texture_ref->texture(), textarget); 6095 DoCopyTexImageIfNeeded(texture_ref->texture(), textarget);
6095 6096
6096 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER(name); 6097 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER(name);
(...skipping 9196 matching lines...) Expand 10 before | Expand all | Expand 10 after
15293 return error::kNoError; 15294 return error::kNoError;
15294 } 15295 }
15295 15296
15296 // Include the auto-generated part of this file. We split this because it means 15297 // 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 15298 // 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. 15299 // instead of having to edit some template or the code generator.
15299 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 15300 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
15300 15301
15301 } // namespace gles2 15302 } // namespace gles2
15302 } // namespace gpu 15303 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format_test_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698