From 452ba88066b51931696fc3d0a2a1c0f8809a4143 Mon Sep 17 00:00:00 2001 From: brianosman Date: Sun, 19 Jun 2016 18:05:12 -0700 Subject: [PATCH] Revert of Integers can now be passed as uniforms (patchset #1 id:1 of https://codereview.chromium.org/2076143003/ ) Reason for revert: Compile failures on Vulkan platforms (eg https://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan) Original issue's description: > Integers can now be passed as uniforms; needed for passing color count to fragment shader > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2076143003 > > Committed: https://skia.googlesource.com/skia/+/cc3a22b369e1a60fa2acf2987f2934baf7c4b198 TBR=tomhudson@google.com,bsalomon@google.com,fmenozzi@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia: Review-Url: https://codereview.chromium.org/2080133002 --- src/gpu/gl/GrGLProgramDataManager.cpp | 13 ------------- src/gpu/gl/GrGLProgramDataManager.h | 1 - src/gpu/glsl/GrGLSLProgramDataManager.h | 1 - 3 files changed, 15 deletions(-) diff --git a/src/gpu/gl/GrGLProgramDataManager.cpp b/src/gpu/gl/GrGLProgramDataManager.cpp index fa232b73fd..9513a3fd57 100644 --- a/src/gpu/gl/GrGLProgramDataManager.cpp +++ b/src/gpu/gl/GrGLProgramDataManager.cpp @@ -89,19 +89,6 @@ void GrGLProgramDataManager::setSamplers(const SkTArray& samplers) } } -void GrGLProgramDataManager::set1i(UniformHandle u, int i) const { - const Uniform& uni = fUniforms[u.toIndex()]; - SkASSERT(uni.fType == kInt_GrSLType); - SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount); - SkDEBUGCODE(this->printUnused(uni)); - if (kUnusedUniform != uni.fFSLocation) { - GR_GL_CALL(fGpu->glInterface(), Uniform1i(uni.fFSLocation, i)); - } - if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { - GR_GL_CALL(fGpu->glInterface(), Uniform1i(uni.fVSLocation, i)); - } -} - void GrGLProgramDataManager::set1f(UniformHandle u, float v0) const { const Uniform& uni = fUniforms[u.toIndex()]; SkASSERT(uni.fType == kFloat_GrSLType); diff --git a/src/gpu/gl/GrGLProgramDataManager.h b/src/gpu/gl/GrGLProgramDataManager.h index 62da06dbec..513b6a4ce6 100644 --- a/src/gpu/gl/GrGLProgramDataManager.h +++ b/src/gpu/gl/GrGLProgramDataManager.h @@ -53,7 +53,6 @@ public: /** Functions for uploading uniform values. The varities ending in v can be used to upload to an * array of uniforms. arrayCount must be <= the array count of the uniform. */ - void set1i(UniformHandle, int) const override; void set1f(UniformHandle, float v0) const override; void set1fv(UniformHandle, int arrayCount, const float v[]) const override; void set2f(UniformHandle, float, float) const override; diff --git a/src/gpu/glsl/GrGLSLProgramDataManager.h b/src/gpu/glsl/GrGLSLProgramDataManager.h index 7b310628c5..5d502cfd75 100644 --- a/src/gpu/glsl/GrGLSLProgramDataManager.h +++ b/src/gpu/glsl/GrGLSLProgramDataManager.h @@ -26,7 +26,6 @@ public: /** Functions for uploading uniform values. The varities ending in v can be used to upload to an * array of uniforms. arrayCount must be <= the array count of the uniform. */ - virtual void set1i(UniformHandle, int) const = 0; virtual void set1f(UniformHandle, float v0) const = 0; virtual void set1fv(UniformHandle, int arrayCount, const float v[]) const = 0; virtual void set2f(UniformHandle, float, float) const = 0;