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

Unified Diff: src/gpu/vk/GrVkUniformHandler.h

Issue 1885863004: Refactor how we store and use samplers in Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove unneeded assert Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkPipelineStateDataManager.cpp ('k') | src/gpu/vk/GrVkUniformHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkUniformHandler.h
diff --git a/src/gpu/vk/GrVkUniformHandler.h b/src/gpu/vk/GrVkUniformHandler.h
index 46d27cda7c6fb13bf4a3fe346fd8650a01a44f50..f6060b05327518ef294b14716df0f0ffcd5a7e5b 100644
--- a/src/gpu/vk/GrVkUniformHandler.h
+++ b/src/gpu/vk/GrVkUniformHandler.h
@@ -11,6 +11,7 @@
#include "glsl/GrGLSLUniformHandler.h"
#include "GrAllocator.h"
+#include "GrVkGLSLSampler.h"
#include "glsl/GrGLSLShaderVar.h"
class GrVkUniformHandler : public GrGLSLUniformHandler {
@@ -30,8 +31,6 @@ public:
struct UniformInfo {
GrGLSLShaderVar fVariable;
uint32_t fVisibility;
- uint32_t fSetNumber;
- uint32_t fBinding;
uint32_t fUBOffset;
};
typedef GrTAllocator<UniformInfo> UniformInfoArray;
@@ -61,6 +60,17 @@ private:
int arrayCount,
const char** outName) override;
+ SamplerHandle internalAddSampler(uint32_t visibility,
+ GrPixelConfig config,
+ GrSLType type,
+ GrSLPrecision precision,
+ const char* name) override;
+
+ int numSamplers() const override { return fSamplers.count(); }
+ const GrGLSLSampler& getSampler(SamplerHandle handle) const override {
+ return fSamplers[handle.toIndex()];
+ }
+
void appendUniformDecls(GrShaderFlags, SkString*) const override;
bool hasVertexUniforms() const { return fCurrentVertexUBOOffset > 0; }
@@ -73,6 +83,8 @@ private:
UniformInfoArray fUniforms;
+ SkTArray<GrVkGLSLSampler> fSamplers;
+
uint32_t fCurrentVertexUBOOffset;
uint32_t fCurrentFragmentUBOOffset;
uint32_t fCurrentSamplerBinding;
« no previous file with comments | « src/gpu/vk/GrVkPipelineStateDataManager.cpp ('k') | src/gpu/vk/GrVkUniformHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698