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 |
11 #include "glsl/GrGLSLProgramDataManager.h" | 11 #include "glsl/GrGLSLProgramDataManager.h" |
12 | 12 |
13 #include "vk/GrVkUniformHandler.h" | 13 #include "vk/GrVkUniformHandler.h" |
14 | 14 |
15 class GrVkGpu; | 15 class GrVkGpu; |
16 class GrVkUniformBuffer; | 16 class GrVkUniformBuffer; |
17 | 17 |
18 class GrVkPipelineStateDataManager : public GrGLSLProgramDataManager { | 18 class GrVkPipelineStateDataManager : public GrGLSLProgramDataManager { |
19 public: | 19 public: |
20 typedef GrVkUniformHandler::UniformInfoArray UniformInfoArray; | 20 typedef GrVkUniformHandler::UniformInfoArray UniformInfoArray; |
21 | 21 |
22 GrVkPipelineStateDataManager(const UniformInfoArray&, | 22 GrVkPipelineStateDataManager(const UniformInfoArray&, |
23 uint32_t vertexUniformSize, | 23 uint32_t vertexUniformSize, |
24 uint32_t fragmentUniformSize); | 24 uint32_t fragmentUniformSize); |
25 | 25 |
26 void set1i(UniformHandle, int32_t) const override; | 26 void set1i(UniformHandle, int32_t) const override; |
| 27 void set1iv(UniformHandle, int arrayCount, const int32_t v[]) const override
; |
27 void set1f(UniformHandle, float v0) const override; | 28 void set1f(UniformHandle, float v0) const override; |
28 void set1fv(UniformHandle, int arrayCount, const float v[]) const override; | 29 void set1fv(UniformHandle, int arrayCount, const float v[]) const override; |
29 void set2f(UniformHandle, float, float) const override; | 30 void set2f(UniformHandle, float, float) const override; |
30 void set2fv(UniformHandle, int arrayCount, const float v[]) const override; | 31 void set2fv(UniformHandle, int arrayCount, const float v[]) const override; |
31 void set3f(UniformHandle, float, float, float) const override; | 32 void set3f(UniformHandle, float, float, float) const override; |
32 void set3fv(UniformHandle, int arrayCount, const float v[]) const override; | 33 void set3fv(UniformHandle, int arrayCount, const float v[]) const override; |
33 void set4f(UniformHandle, float, float, float, float) const override; | 34 void set4f(UniformHandle, float, float, float, float) const override; |
34 void set4fv(UniformHandle, int arrayCount, const float v[]) const override; | 35 void set4fv(UniformHandle, int arrayCount, const float v[]) const override; |
35 // matrices are column-major, the first two upload a single matrix, the latt
er two upload | 36 // matrices are column-major, the first two upload a single matrix, the latt
er two upload |
36 // arrayCount matrices into a uniform array. | 37 // arrayCount matrices into a uniform array. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 74 |
74 SkTArray<Uniform, true> fUniforms; | 75 SkTArray<Uniform, true> fUniforms; |
75 | 76 |
76 mutable SkAutoMalloc fVertexUniformData; | 77 mutable SkAutoMalloc fVertexUniformData; |
77 mutable SkAutoMalloc fFragmentUniformData; | 78 mutable SkAutoMalloc fFragmentUniformData; |
78 mutable bool fVertexUniformsDirty; | 79 mutable bool fVertexUniformsDirty; |
79 mutable bool fFragmentUniformsDirty; | 80 mutable bool fFragmentUniformsDirty; |
80 }; | 81 }; |
81 | 82 |
82 #endif | 83 #endif |
OLD | NEW |