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

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

Issue 1825593002: GrVkGpu initialization cleanup. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments (and rebase to ToT) Created 4 years, 9 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
« no previous file with comments | « src/gpu/vk/GrVkInterface.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 GrVkUniformHandler_DEFINED 8 #ifndef GrVkUniformHandler_DEFINED
9 #define GrVkUniformHandler_DEFINED 9 #define GrVkUniformHandler_DEFINED
10 10
11 #include "glsl/GrGLSLUniformHandler.h" 11 #include "glsl/GrGLSLUniformHandler.h"
12 12
13 #include "GrAllocator.h" 13 #include "GrAllocator.h"
14 #include "glsl/GrGLSLShaderVar.h" 14 #include "glsl/GrGLSLShaderVar.h"
15 15
16 static const int kUniformsPerBlock = 8;
17
18 class GrVkUniformHandler : public GrGLSLUniformHandler { 16 class GrVkUniformHandler : public GrGLSLUniformHandler {
19 public: 17 public:
18 static const int kUniformsPerBlock = 8;
19
20 enum { 20 enum {
21 kSamplerDescSet = 0, 21 kSamplerDescSet = 0,
22 kUniformBufferDescSet = 1, 22 kUniformBufferDescSet = 1,
23 }; 23 };
24 enum { 24 enum {
25 kVertexBinding = 0, 25 kVertexBinding = 0,
26 kFragBinding = 1, 26 kFragBinding = 1,
27 }; 27 };
28 28
29 // fUBOffset is only valid if the GrSLType of the fVariable is not a sampler 29 // fUBOffset is only valid if the GrSLType of the fVariable is not a sampler
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 UniformInfoArray fUniforms; 75 UniformInfoArray fUniforms;
76 uint32_t fCurrentVertexUBOOffset; 76 uint32_t fCurrentVertexUBOOffset;
77 uint32_t fCurrentFragmentUBOOffset; 77 uint32_t fCurrentFragmentUBOOffset;
78 uint32_t fCurrentSamplerBinding; 78 uint32_t fCurrentSamplerBinding;
79 79
80 friend class GrVkProgramBuilder; 80 friend class GrVkProgramBuilder;
81 81
82 typedef GrGLSLUniformHandler INHERITED; 82 typedef GrGLSLUniformHandler INHERITED;
83 }; 83 };
84 84
85 #endif 85 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkInterface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698