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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.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 | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a06770b571851593214b4e885aa41f2c9ba40893..4532096bd8cd421f6ca2780a3e0cddde5539d78e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -23,6 +23,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/numerics/safe_math.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_synthetic_delay.h"
#include "build/build_config.h"
@@ -11724,8 +11725,10 @@ void GLES2DecoderImpl::DoCompressedTexSubImage3D(
Texture* texture = texture_ref->texture();
GLenum type = 0, internal_format = 0;
if (!texture->GetLevelType(target, level, &type, &internal_format)) {
+ std::string msg = base::StringPrintf(
+ "level %d does not exist", level);
LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glCompressedTexSubImage3D",
- "level does not exist");
+ msg.c_str());
return;
}
if (internal_format != format) {
@@ -11995,9 +11998,10 @@ void GLES2DecoderImpl::DoCompressedTexSubImage2D(
GLenum type = 0;
GLenum internal_format = 0;
if (!texture->GetLevelType(target, level, &type, &internal_format)) {
+ std::string msg = base::StringPrintf(
+ "level %d does not exist", level);
LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION,
- "glCompressedTexSubImage2D", "level does not exist.");
+ GL_INVALID_OPERATION, "glCompressedTexSubImage2D", msg.c_str());
return;
}
if (internal_format != format) {
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698