| 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 42bf2b02895f3e4d7490cb9877c129673c66dd98..8b9d62f150ff3d3c9c6c6b7723a3504af4dffb28 100644
|
| --- a/gpu/command_buffer/service/program_manager.h
|
| +++ b/gpu/command_buffer/service/program_manager.h
|
| @@ -124,6 +124,10 @@ class GPU_EXPORT Program : public base::RefCounted<Program> {
|
| GLint location;
|
| std::string name;
|
| };
|
| + struct UniformBlockSizeInfo {
|
| + uint32_t binding;
|
| + uint32_t data_size;
|
| + };
|
|
|
| template <typename T>
|
| class ShaderVariableLocationEntry {
|
| @@ -399,6 +403,13 @@ class GPU_EXPORT Program : public base::RefCounted<Program> {
|
| return fragment_output_written_mask_;
|
| }
|
|
|
| + // Update uniform block binding after a successful glUniformBlockBinding().
|
| + void SetUniformBlockBinding(GLuint index, GLuint binding);
|
| +
|
| + const std::vector<UniformBlockSizeInfo>& uniform_block_size_info() const {
|
| + return uniform_block_size_info_;
|
| + }
|
| +
|
| private:
|
| friend class base::RefCounted<Program>;
|
| friend class ProgramManager;
|
| @@ -436,6 +447,7 @@ class GPU_EXPORT Program : public base::RefCounted<Program> {
|
| void UpdateFragmentInputs();
|
| void UpdateProgramOutputs();
|
| void UpdateFragmentOutputBaseTypes();
|
| + void UpdateUniformBlockSizeInfo();
|
|
|
| // Process the program log, replacing the hashed names with original names.
|
| std::string ProcessLogInfo(const std::string& log);
|
| @@ -542,6 +554,10 @@ class GPU_EXPORT Program : public base::RefCounted<Program> {
|
| // glBindFragDataLocation() and ..IndexedEXT() calls.
|
| LocationIndexMap bind_program_output_location_index_map_;
|
|
|
| + // It's stored in the order of uniform block indices, i.e., the first
|
| + // entry is the info about UniformBlock with index 0, etc.
|
| + std::vector<UniformBlockSizeInfo> uniform_block_size_info_;
|
| +
|
| // Fragment output variable base types: FLOAT, INT, or UINT.
|
| // We have up to 16 outputs, each is encoded into 2 bits, total 32 bits:
|
| // the lowest 2 bits for location 0, the highest 2 bits for location 15.
|
|
|