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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1299683002: gpu: If not cube complete, the texture isn't renderable, no matter mipmap complete. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index db91adffc8aeb47aa9fc43e733c8386914bd8bfa..742e60391ffa27da4e6fdcd35892c915467ea7a1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -6942,7 +6942,8 @@ bool GLES2DecoderImpl::PrepareTexturesForRender() {
TextureRef* texture_ref =
texture_unit.GetInfoForSamplerType(uniform_info->type).get();
GLenum textarget = GetBindTargetForSamplerType(uniform_info->type);
- if (!texture_ref || !texture_manager()->CanRender(texture_ref)) {
+ if (!texture_ref ||
+ !texture_manager()->IsTextureComplete(texture_ref)) {
textures_set = true;
glActiveTexture(GL_TEXTURE0 + texture_unit_index);
glBindTexture(
@@ -6995,7 +6996,8 @@ void GLES2DecoderImpl::RestoreStateForTextures() {
TextureUnit& texture_unit = state_.texture_units[texture_unit_index];
TextureRef* texture_ref =
texture_unit.GetInfoForSamplerType(uniform_info->type).get();
- if (!texture_ref || !texture_manager()->CanRender(texture_ref)) {
+ if (!texture_ref ||
+ !texture_manager()->IsTextureComplete(texture_ref)) {
glActiveTexture(GL_TEXTURE0 + texture_unit_index);
// Get the texture_ref info that was previously bound here.
texture_ref = texture_unit.bind_target == GL_TEXTURE_2D

Powered by Google App Engine
This is Rietveld 408576698