OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrVkPipelineStateDataManager_DEFINED | 8 #ifndef GrVkPipelineStateDataManager_DEFINED |
9 #define GrVkPipelineStateDataManager_DEFINED | 9 #define GrVkPipelineStateDataManager_DEFINED |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 bool uploadUniformBuffers(const GrVkGpu* gpu, | 52 bool uploadUniformBuffers(const GrVkGpu* gpu, |
53 GrVkUniformBuffer* vertexBuffer, | 53 GrVkUniformBuffer* vertexBuffer, |
54 GrVkUniformBuffer* fragmentBuffer) const; | 54 GrVkUniformBuffer* fragmentBuffer) const; |
55 private: | 55 private: |
56 struct Uniform { | 56 struct Uniform { |
57 uint32_t fBinding; | 57 uint32_t fBinding; |
58 uint32_t fOffset; | 58 uint32_t fOffset; |
59 SkDEBUGCODE( | 59 SkDEBUGCODE( |
60 GrSLType fType; | 60 GrSLType fType; |
61 int fArrayCount; | 61 int fArrayCount; |
| 62 uint32_t fSetNumber; |
62 ); | 63 ); |
63 }; | 64 }; |
64 | 65 |
65 template<int N> inline void setMatrices(UniformHandle, int arrayCount, | 66 template<int N> inline void setMatrices(UniformHandle, int arrayCount, |
66 const float matrices[]) const; | 67 const float matrices[]) const; |
67 | 68 |
68 void* getBufferPtrAndMarkDirty(const Uniform& uni) const; | 69 void* getBufferPtrAndMarkDirty(const Uniform& uni) const; |
69 | 70 |
70 uint32_t fVertexUniformSize; | 71 uint32_t fVertexUniformSize; |
71 uint32_t fFragmentUniformSize; | 72 uint32_t fFragmentUniformSize; |
72 | 73 |
73 SkTArray<Uniform, true> fUniforms; | 74 SkTArray<Uniform, true> fUniforms; |
74 | 75 |
75 mutable SkAutoMalloc fVertexUniformData; | 76 mutable SkAutoMalloc fVertexUniformData; |
76 mutable SkAutoMalloc fFragmentUniformData; | 77 mutable SkAutoMalloc fFragmentUniformData; |
77 mutable bool fVertexUniformsDirty; | 78 mutable bool fVertexUniformsDirty; |
78 mutable bool fFragmentUniformsDirty; | 79 mutable bool fFragmentUniformsDirty; |
79 }; | 80 }; |
80 | 81 |
81 #endif | 82 #endif |
OLD | NEW |