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

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

Issue 1696012: Added shader type to shader info. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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/shader_manager.h » ('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
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder.cc (revision 45803)
+++ gpu/command_buffer/service/gles2_cmd_decoder.cc (working copy)
@@ -512,8 +512,10 @@
}
// Creates a ShaderInfo for the given shader.
- void CreateShaderInfo(GLuint client_id, GLuint service_id) {
- shader_manager()->CreateShaderInfo(client_id, service_id);
+ void CreateShaderInfo(GLuint client_id,
+ GLuint service_id,
+ GLenum shader_type) {
+ shader_manager()->CreateShaderInfo(client_id, service_id, shader_type);
}
// Gets the shader info for the given shader. Returns NULL if none exists.
@@ -1705,7 +1707,7 @@
}
GLuint service_id = glCreateShader(type);
if (service_id != 0) {
- CreateShaderInfo(client_id, service_id);
+ CreateShaderInfo(client_id, service_id, type);
}
return true;
}
@@ -2506,7 +2508,8 @@
#if !defined(GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2)
#if defined(GLES2_GPU_SERVICE_TRANSLATE_SHADER)
int dbg_options = 0;
- EShLanguage language = EShLangVertex;
+ EShLanguage language = info->shader_type() == GL_VERTEX_SHADER ?
+ EShLangVertex : EShLangFragment;
TBuiltInResource resources;
// TODO(alokp): Ask gman how to get appropriate values.
resources.maxVertexAttribs = 8;
« no previous file with comments | « no previous file | gpu/command_buffer/service/shader_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698