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

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

Issue 1955723002: Improve detail of some texture-related errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try again. Created 4 years, 7 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index e061d77cda5230002a2e9c30455d15fc2634bec9..befe9ea7bcd2c7f1a9bf824bb8fd066f12e9220a 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -2154,15 +2154,18 @@ bool TextureManager::ValidateTextureParameters(
// So the validation is not necessary for TexSubImage.
if (tex_image_call &&
!validators->texture_internal_format.IsValid(internal_format)) {
- ERRORSTATE_SET_GL_ERROR(
- error_state, GL_INVALID_VALUE, function_name,
- "invalid internal_format");
+ std::string msg = base::StringPrintf("invalid internal_format 0x%x",
+ internal_format);
+ ERRORSTATE_SET_GL_ERROR(error_state, GL_INVALID_VALUE, function_name,
+ msg.c_str());
return false;
}
if (!g_format_type_validator.Get().IsValid(internal_format, format, type)) {
- ERRORSTATE_SET_GL_ERROR(
- error_state, GL_INVALID_OPERATION, function_name,
- "invalid internalformat/format/type combination");
+ std::string msg = base::StringPrintf(
+ "invalid internalformat/format/type combination 0x%x/0x%x/0x%x",
+ internal_format, format, type);
+ ERRORSTATE_SET_GL_ERROR(error_state, GL_INVALID_OPERATION, function_name,
+ msg.c_str());
return false;
}
if (!feature_info_->IsES3Enabled()) {
@@ -2448,8 +2451,10 @@ bool TextureManager::ValidateTexSubImage(ContextState* state,
GLenum internal_format = 0;
if (!texture->GetLevelType(args.target, args.level, &current_type,
&internal_format)) {
+ std::string msg = base::StringPrintf(
+ "level %d does not exist", args.level);
ERRORSTATE_SET_GL_ERROR(error_state, GL_INVALID_OPERATION, function_name,
- "level does not exist.");
+ msg.c_str());
return false;
}
if (!ValidateTextureParameters(error_state, function_name, false, args.format,
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698