Chromium Code Reviews| 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..7a4d012ddb489883fae5d0fe6a841aebb2962633 100644 |
| --- a/gpu/command_buffer/service/program_manager.h |
| +++ b/gpu/command_buffer/service/program_manager.h |
| @@ -399,6 +399,14 @@ class GPU_EXPORT Program : public base::RefCounted<Program> { |
| return fragment_output_written_mask_; |
| } |
| + // The data are only valid after a successful link. |
| + uint32_t vertex_input_type_mask() const { |
| + return vertex_input_type_mask_; |
| + } |
| + uint32_t vertex_input_written_mask() const { |
| + return vertex_input_written_mask_; |
| + } |
| + |
| private: |
| friend class base::RefCounted<Program>; |
| friend class ProgramManager; |
| @@ -436,6 +444,7 @@ class GPU_EXPORT Program : public base::RefCounted<Program> { |
| void UpdateFragmentInputs(); |
| void UpdateProgramOutputs(); |
| void UpdateFragmentOutputBaseTypes(); |
| + void UpdateVertexInputBaseTypes(); |
| // Process the program log, replacing the hashed names with original names. |
| std::string ProcessLogInfo(const std::string& log); |
| @@ -549,6 +558,13 @@ class GPU_EXPORT Program : public base::RefCounted<Program> { |
| // Same layout as above, 2 bits per location, 0x03 if a location is occupied |
| // by an output variable, 0x00 if not. |
| uint32_t fragment_output_written_mask_; |
| + |
| + // Vertex input variable base types: FLOAT, INT, or UINT. |
| + // We have up to 16 inputs, each is encoded into 2 bits, total 32 bits |
| + uint32_t vertex_input_type_mask_; |
|
Zhenyao Mo
2016/07/20 17:54:56
Again, you will need to have arrays here. It can b
yunchao
2016/07/22 13:43:53
Done.
|
| + // Same layout as above, 2 bits per location, 0x03 if a location is occupied |
| + // by an input variable, 0x00 if not. |
| + uint32_t vertex_input_written_mask_; |
| }; |
| // Tracks the Programs. |