Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: src/gpu/vk/GrVkPipelineStateDataManager.h

Issue 2076143003: Integers can now be passed as uniforms (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix namespace/parameter name bug Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <cstdint>
egdaniel 2016/06/20 16:21:49 do we really not have int32_t accessable already?
12
11 #include "glsl/GrGLSLProgramDataManager.h" 13 #include "glsl/GrGLSLProgramDataManager.h"
12 14
13 #include "vk/GrVkUniformHandler.h" 15 #include "vk/GrVkUniformHandler.h"
14 16
15 class GrVkGpu; 17 class GrVkGpu;
16 class GrVkUniformBuffer; 18 class GrVkUniformBuffer;
17 19
18 class GrVkPipelineStateDataManager : public GrGLSLProgramDataManager { 20 class GrVkPipelineStateDataManager : public GrGLSLProgramDataManager {
19 public: 21 public:
20 typedef GrVkUniformHandler::UniformInfoArray UniformInfoArray; 22 typedef GrVkUniformHandler::UniformInfoArray UniformInfoArray;
21 23
22 GrVkPipelineStateDataManager(const UniformInfoArray&, 24 GrVkPipelineStateDataManager(const UniformInfoArray&,
23 uint32_t vertexUniformSize, 25 uint32_t vertexUniformSize,
24 uint32_t fragmentUniformSize); 26 uint32_t fragmentUniformSize);
25 27
28 void set1i(UniformHandle, int32_t) const override;
26 void set1f(UniformHandle, float v0) const override; 29 void set1f(UniformHandle, float v0) const override;
27 void set1fv(UniformHandle, int arrayCount, const float v[]) const override; 30 void set1fv(UniformHandle, int arrayCount, const float v[]) const override;
28 void set2f(UniformHandle, float, float) const override; 31 void set2f(UniformHandle, float, float) const override;
29 void set2fv(UniformHandle, int arrayCount, const float v[]) const override; 32 void set2fv(UniformHandle, int arrayCount, const float v[]) const override;
30 void set3f(UniformHandle, float, float, float) const override; 33 void set3f(UniformHandle, float, float, float) const override;
31 void set3fv(UniformHandle, int arrayCount, const float v[]) const override; 34 void set3fv(UniformHandle, int arrayCount, const float v[]) const override;
32 void set4f(UniformHandle, float, float, float, float) const override; 35 void set4f(UniformHandle, float, float, float, float) const override;
33 void set4fv(UniformHandle, int arrayCount, const float v[]) const override; 36 void set4fv(UniformHandle, int arrayCount, const float v[]) const override;
34 // matrices are column-major, the first two upload a single matrix, the latt er two upload 37 // matrices are column-major, the first two upload a single matrix, the latt er two upload
35 // arrayCount matrices into a uniform array. 38 // arrayCount matrices into a uniform array.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 75
73 SkTArray<Uniform, true> fUniforms; 76 SkTArray<Uniform, true> fUniforms;
74 77
75 mutable SkAutoMalloc fVertexUniformData; 78 mutable SkAutoMalloc fVertexUniformData;
76 mutable SkAutoMalloc fFragmentUniformData; 79 mutable SkAutoMalloc fFragmentUniformData;
77 mutable bool fVertexUniformsDirty; 80 mutable bool fVertexUniformsDirty;
78 mutable bool fFragmentUniformsDirty; 81 mutable bool fFragmentUniformsDirty;
79 }; 82 };
80 83
81 #endif 84 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698