| Index: gpu/command_buffer/service/program_manager.h
|
| diff --git a/gpu/command_buffer/service/program_manager.h b/gpu/command_buffer/service/program_manager.h
|
| index 6858cedc2452179567086773146c8a40e8347275..c995e2f2eb39f1143250d79dd85179e3cee2c570 100644
|
| --- a/gpu/command_buffer/service/program_manager.h
|
| +++ b/gpu/command_buffer/service/program_manager.h
|
| @@ -195,6 +195,10 @@ class GPU_EXPORT Program : public base::RefCounted<Program> {
|
| // is not declared in vertex shader.
|
| bool DetectVaryingsMismatch() const;
|
|
|
| + // Return false if varyings can't be packed into the max available
|
| + // varying registers.
|
| + bool CheckVaryingsPacking() const;
|
| +
|
| // Visible for testing
|
| const LocationMap& bind_attrib_location_map() const {
|
| return bind_attrib_location_map_;
|
| @@ -329,7 +333,8 @@ class GPU_EXPORT Program : public base::RefCounted<Program> {
|
| // need to be shared by multiple GLES2Decoders.
|
| class GPU_EXPORT ProgramManager {
|
| public:
|
| - explicit ProgramManager(ProgramCache* program_cache);
|
| + explicit ProgramManager(ProgramCache* program_cache,
|
| + uint32 max_varying_vectors);
|
| ~ProgramManager();
|
|
|
| // Must call before destruction.
|
| @@ -371,12 +376,19 @@ class GPU_EXPORT ProgramManager {
|
| ShaderTranslator* translator,
|
| FeatureInfo* feature_info);
|
|
|
| + uint32 max_varying_vectors() const {
|
| + return max_varying_vectors_;
|
| + }
|
| +
|
| private:
|
| friend class Program;
|
|
|
| void StartTracking(Program* program);
|
| void StopTracking(Program* program);
|
|
|
| + void RemoveProgramInfoIfUnused(
|
| + ShaderManager* shader_manager, Program* program);
|
| +
|
| // Info for each "successfully linked" program by service side program Id.
|
| // TODO(gman): Choose a faster container.
|
| typedef std::map<GLuint, scoped_refptr<Program> > ProgramMap;
|
| @@ -395,8 +407,7 @@ class GPU_EXPORT ProgramManager {
|
|
|
| ProgramCache* program_cache_;
|
|
|
| - void RemoveProgramInfoIfUnused(
|
| - ShaderManager* shader_manager, Program* program);
|
| + uint32 max_varying_vectors_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ProgramManager);
|
| };
|
|
|