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

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

Issue 840763003: gpu: Make the log of texture binding failure more specific. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change the log comments Created 5 years, 11 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <list> 10 #include <list>
(...skipping 6409 matching lines...) Expand 10 before | Expand all | Expand 10 after
6420 TextureUnit& texture_unit = state_.texture_units[texture_unit_index]; 6420 TextureUnit& texture_unit = state_.texture_units[texture_unit_index];
6421 TextureRef* texture_ref = 6421 TextureRef* texture_ref =
6422 texture_unit.GetInfoForSamplerType(uniform_info->type).get(); 6422 texture_unit.GetInfoForSamplerType(uniform_info->type).get();
6423 GLenum textarget = GetBindTargetForSamplerType(uniform_info->type); 6423 GLenum textarget = GetBindTargetForSamplerType(uniform_info->type);
6424 if (!texture_ref || !texture_manager()->CanRender(texture_ref)) { 6424 if (!texture_ref || !texture_manager()->CanRender(texture_ref)) {
6425 textures_set = true; 6425 textures_set = true;
6426 glActiveTexture(GL_TEXTURE0 + texture_unit_index); 6426 glActiveTexture(GL_TEXTURE0 + texture_unit_index);
6427 glBindTexture( 6427 glBindTexture(
6428 textarget, 6428 textarget,
6429 texture_manager()->black_texture_id(uniform_info->type)); 6429 texture_manager()->black_texture_id(uniform_info->type));
6430 LOCAL_RENDER_WARNING( 6430 if (!texture_ref) {
6431 std::string("texture bound to texture unit ") + 6431 LOCAL_RENDER_WARNING(
6432 base::IntToString(texture_unit_index) + 6432 std::string("there is no texture bound to the unit ") +
6433 " is not renderable. It maybe non-power-of-2 and have" 6433 base::IntToString(texture_unit_index));
6434 " incompatible texture filtering or is not" 6434 } else {
6435 " 'texture complete'"); 6435 LOCAL_RENDER_WARNING(
6436 std::string("texture bound to texture unit ") +
6437 base::IntToString(texture_unit_index) +
6438 " is not renderable. It maybe non-power-of-2 and have"
6439 " incompatible texture filtering.");
6440 }
6436 continue; 6441 continue;
6437 } 6442 }
6438 6443
6439 if (textarget != GL_TEXTURE_CUBE_MAP) { 6444 if (textarget != GL_TEXTURE_CUBE_MAP) {
6440 Texture* texture = texture_ref->texture(); 6445 Texture* texture = texture_ref->texture();
6441 gfx::GLImage* image = texture->GetLevelImage(textarget, 0); 6446 gfx::GLImage* image = texture->GetLevelImage(textarget, 0);
6442 if (image && !texture->IsAttachedToFramebuffer()) { 6447 if (image && !texture->IsAttachedToFramebuffer()) {
6443 ScopedGLErrorSuppressor suppressor( 6448 ScopedGLErrorSuppressor suppressor(
6444 "GLES2DecoderImpl::PrepareTexturesForRender", GetErrorState()); 6449 "GLES2DecoderImpl::PrepareTexturesForRender", GetErrorState());
6445 textures_set = true; 6450 textures_set = true;
(...skipping 5189 matching lines...) Expand 10 before | Expand all | Expand 10 after
11635 } 11640 }
11636 } 11641 }
11637 11642
11638 // Include the auto-generated part of this file. We split this because it means 11643 // Include the auto-generated part of this file. We split this because it means
11639 // we can easily edit the non-auto generated parts right here in this file 11644 // we can easily edit the non-auto generated parts right here in this file
11640 // instead of having to edit some template or the code generator. 11645 // instead of having to edit some template or the code generator.
11641 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 11646 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
11642 11647
11643 } // namespace gles2 11648 } // namespace gles2
11644 } // namespace gpu 11649 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698