summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 20:27:02 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 20:27:02 +0000
commitd9977d4420a190fad3bb269d6338a8696df0d20b (patch)
tree80f1d480f115f2cb29c75d941f8dab4ef7b97080 /gpu
parent0fa357d6171c2a917ebac9f1a0e37dc992a45f05 (diff)
downloadchromium_src-d9977d4420a190fad3bb269d6338a8696df0d20b.zip
chromium_src-d9977d4420a190fad3bb269d6338a8696df0d20b.tar.gz
chromium_src-d9977d4420a190fad3bb269d6338a8696df0d20b.tar.bz2
Added check that:
- all invalid shaders are rejected by the translator and - all translated shaders are compiled Review URL: http://codereview.chromium.org/3256007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 092b5d1..fe03abe 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3777,6 +3777,11 @@ void GLES2DecoderImpl::DoCompileShader(GLuint client_id) {
if (status) {
info->SetStatus(true, "");
} else {
+ // We cannot reach here if we are using the shader translator.
+ // All invalid shaders must be rejected by the translator.
+ // All translated shaders must compile.
+ LOG_IF(ERROR, use_shader_translator_)
+ << "Shader translator allowed/produced an invalid shader.";
GLint len = 0;
glGetShaderiv(info->service_id(), GL_INFO_LOG_LENGTH, &len);
scoped_array<char> temp(new char[len]);