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 28 matching lines...) Expand all Loading... |
39 void setMatrix2fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; | 39 void setMatrix2fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; |
40 void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; | 40 void setMatrix3fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; |
41 void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; | 41 void setMatrix4fv(UniformHandle, int arrayCount, const float matrices[]) con
st override; |
42 | 42 |
43 // for nvpr only | 43 // for nvpr only |
44 void setPathFragmentInputTransform(VaryingHandle u, int components, | 44 void setPathFragmentInputTransform(VaryingHandle u, int components, |
45 const SkMatrix& matrix) const override { | 45 const SkMatrix& matrix) const override { |
46 SkFAIL("Only supported in NVPR, which is not in vulkan"); | 46 SkFAIL("Only supported in NVPR, which is not in vulkan"); |
47 } | 47 } |
48 | 48 |
49 void uploadUniformBuffers(const GrVkGpu* gpu, | 49 // Returns true if either the vertex or fragment buffer needed to generate a
new underlying |
| 50 // VkBuffer object in order upload data. If true is returned, this is a sign
al to the caller |
| 51 // that they will need to update the descriptor set that is using these buff
ers. |
| 52 bool uploadUniformBuffers(const GrVkGpu* gpu, |
50 GrVkUniformBuffer* vertexBuffer, | 53 GrVkUniformBuffer* vertexBuffer, |
51 GrVkUniformBuffer* fragmentBuffer) const; | 54 GrVkUniformBuffer* fragmentBuffer) const; |
52 private: | 55 private: |
53 struct Uniform { | 56 struct Uniform { |
54 uint32_t fBinding; | 57 uint32_t fBinding; |
55 uint32_t fOffset; | 58 uint32_t fOffset; |
56 SkDEBUGCODE( | 59 SkDEBUGCODE( |
57 GrSLType fType; | 60 GrSLType fType; |
58 int fArrayCount; | 61 int fArrayCount; |
59 uint32_t fSetNumber; | 62 uint32_t fSetNumber; |
(...skipping 10 matching lines...) Expand all Loading... |
70 | 73 |
71 SkTArray<Uniform, true> fUniforms; | 74 SkTArray<Uniform, true> fUniforms; |
72 | 75 |
73 mutable SkAutoMalloc fVertexUniformData; | 76 mutable SkAutoMalloc fVertexUniformData; |
74 mutable SkAutoMalloc fFragmentUniformData; | 77 mutable SkAutoMalloc fFragmentUniformData; |
75 mutable bool fVertexUniformsDirty; | 78 mutable bool fVertexUniformsDirty; |
76 mutable bool fFragmentUniformsDirty; | 79 mutable bool fFragmentUniformsDirty; |
77 }; | 80 }; |
78 | 81 |
79 #endif | 82 #endif |
OLD | NEW |