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

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: update framebufferTexture2DMultisamplerEXT 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 6312 matching lines...) Expand 10 before | Expand all | Expand 10 after
6323 texture_ref = GetTexture(client_texture_id); 6323 texture_ref = GetTexture(client_texture_id);
6324 if (!texture_ref) { 6324 if (!texture_ref) {
6325 LOCAL_SET_GL_ERROR( 6325 LOCAL_SET_GL_ERROR(
6326 GL_INVALID_OPERATION, 6326 GL_INVALID_OPERATION,
6327 name, "unknown texture_ref"); 6327 name, "unknown texture_ref");
6328 return; 6328 return;
6329 } 6329 }
6330 service_id = texture_ref->service_id(); 6330 service_id = texture_ref->service_id();
6331 } 6331 }
6332 6332
6333 if (!texture_manager()->ValidForTarget(textarget, level, 0, 0, 1)) { 6333 if ((level > 0 && !feature_info_->IsES3Enabled()) ||
6334 !texture_manager()->ValidForTarget(textarget, level, 0, 0, 1)) {
6334 LOCAL_SET_GL_ERROR( 6335 LOCAL_SET_GL_ERROR(
6335 GL_INVALID_VALUE, 6336 GL_INVALID_VALUE,
6336 name, "level out of range"); 6337 name, "level out of range");
6337 return; 6338 return;
6338 } 6339 }
6339 6340
6340 if (texture_ref) 6341 if (texture_ref)
6341 DoCopyTexImageIfNeeded(texture_ref->texture(), textarget); 6342 DoCopyTexImageIfNeeded(texture_ref->texture(), textarget);
6342 6343
6343 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER(name); 6344 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER(name);
(...skipping 9256 matching lines...) Expand 10 before | Expand all | Expand 10 after
15600 return error::kNoError; 15601 return error::kNoError;
15601 } 15602 }
15602 15603
15603 // Include the auto-generated part of this file. We split this because it means 15604 // Include the auto-generated part of this file. We split this because it means
15604 // we can easily edit the non-auto generated parts right here in this file 15605 // we can easily edit the non-auto generated parts right here in this file
15605 // instead of having to edit some template or the code generator. 15606 // instead of having to edit some template or the code generator.
15606 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 15607 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
15607 15608
15608 } // namespace gles2 15609 } // namespace gles2
15609 } // namespace gpu 15610 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698