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

Unified Diff: gpu/command_buffer/service/shader_translator.h

Issue 5626008: Exposed support for dynamically enabling extensions in command buffer... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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/mocks.h ('k') | gpu/command_buffer/service/shader_translator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/shader_translator.h
===================================================================
--- gpu/command_buffer/service/shader_translator.h (revision 68245)
+++ gpu/command_buffer/service/shader_translator.h (working copy)
@@ -15,7 +15,8 @@
namespace gpu {
namespace gles2 {
-// Translates GLSL ES 2.0 shader to desktop GLSL shader.
+// Translates a GLSL ES 2.0 shader to desktop GLSL shader, or just
+// validates GLSL ES 2.0 shaders on a true GLSL ES implementation.
class ShaderTranslatorInterface {
public:
virtual ~ShaderTranslatorInterface() { }
@@ -25,7 +26,8 @@
virtual bool Init(
ShShaderType shader_type,
ShShaderSpec shader_spec,
- const ShBuiltInResources* resources) = 0;
+ const ShBuiltInResources* resources,
+ bool implementation_is_glsl_es) = 0;
// Translates the given shader source.
// Returns true if translation is successful, false otherwise.
@@ -66,7 +68,8 @@
virtual bool Init(
ShShaderType shader_type,
ShShaderSpec shader_spec,
- const ShBuiltInResources* resources);
+ const ShBuiltInResources* resources,
+ bool implementation_is_glsl_es);
// Overridden from ShaderTranslatorInterface.
virtual bool Translate(const char* shader);
@@ -88,6 +91,7 @@
scoped_array<char> info_log_;
VariableMap attrib_map_;
VariableMap uniform_map_;
+ bool implementation_is_glsl_es_;
DISALLOW_COPY_AND_ASSIGN(ShaderTranslator);
};
« no previous file with comments | « gpu/command_buffer/service/mocks.h ('k') | gpu/command_buffer/service/shader_translator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698