diff options
author | Brian Salomon <bsalomon@google.com> | 2016-11-21 13:41:08 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-21 19:13:43 +0000 |
commit | 99938a8ef24e2dd5b39f78638742e9b50ab6d9bf (patch) | |
tree | e3842210db20a4574e9cec37ae7f049aaff27b65 /bench | |
parent | d728f0c1a94fe926b59d8ebc9ae174019ccd3606 (diff) |
Merge GrGLSLShaderVar and GrShaderVar
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5087
Change-Id: Ib8943a1da1ea495554feaf5b0992b94fbb9539ab
Reviewed-on: https://skia-review.googlesource.com/5087
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'bench')
-rw-r--r-- | bench/GLInstancedArraysBench.cpp | 10 | ||||
-rw-r--r-- | bench/GLVec4ScalarBench.cpp | 12 | ||||
-rw-r--r-- | bench/GLVertexAttributesBench.cpp | 22 |
3 files changed, 22 insertions, 22 deletions
diff --git a/bench/GLInstancedArraysBench.cpp b/bench/GLInstancedArraysBench.cpp index a97e6c8a17..ca20673988 100644 --- a/bench/GLInstancedArraysBench.cpp +++ b/bench/GLInstancedArraysBench.cpp @@ -11,12 +11,12 @@ #if SK_SUPPORT_GPU #include "GLBench.h" +#include "GrShaderVar.h" #include "gl/GrGLContext.h" #include "gl/GrGLInterface.h" #include "gl/GrGLUtil.h" #include "glsl/GrGLSL.h" #include "glsl/GrGLSLCaps.h" -#include "glsl/GrGLSLShaderVar.h" /* * This is a native GL benchmark for instanced arrays vs vertex buffer objects. To benchmark this @@ -111,9 +111,9 @@ GrGLuint GLCpuPosInstancedArraysBench::setupShader(const GrGLContext* ctx) { const char* version = glslCaps->versionDeclString(); // setup vertex shader - GrGLSLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kIn_TypeModifier); - GrGLSLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kIn_TypeModifier); - GrGLSLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kOut_TypeModifier); + GrShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kIn_TypeModifier); + GrShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kIn_TypeModifier); + GrShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kOut_TypeModifier); SkString vshaderTxt(version); aPosition.appendDecl(glslCaps, &vshaderTxt); @@ -131,7 +131,7 @@ GrGLuint GLCpuPosInstancedArraysBench::setupShader(const GrGLContext* ctx) { "}\n"); // setup fragment shader - GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier); + GrShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier); SkString fshaderTxt(version); GrGLSLAppendDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, *glslCaps, &fshaderTxt); oColor.setTypeModifier(GrShaderVar::kIn_TypeModifier); diff --git a/bench/GLVec4ScalarBench.cpp b/bench/GLVec4ScalarBench.cpp index 01eda889d6..0da0a0dc0e 100644 --- a/bench/GLVec4ScalarBench.cpp +++ b/bench/GLVec4ScalarBench.cpp @@ -11,12 +11,12 @@ #if SK_SUPPORT_GPU #include "GLBench.h" +#include "GrShaderVar.h" #include "gl/GrGLContext.h" #include "gl/GrGLInterface.h" #include "gl/GrGLUtil.h" #include "glsl/GrGLSL.h" #include "glsl/GrGLSLCaps.h" -#include "glsl/GrGLSLShaderVar.h" #include <stdio.h> @@ -101,10 +101,10 @@ GrGLuint GLVec4ScalarBench::setupShader(const GrGLContext* ctx) { // corner of the screen than the previous circle. // set up vertex shader; this is a trivial vertex shader that passes through position and color - GrGLSLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kIn_TypeModifier); - GrGLSLShaderVar oPosition("o_position", kVec2f_GrSLType, GrShaderVar::kOut_TypeModifier); - GrGLSLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kIn_TypeModifier); - GrGLSLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kOut_TypeModifier); + GrShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kIn_TypeModifier); + GrShaderVar oPosition("o_position", kVec2f_GrSLType, GrShaderVar::kOut_TypeModifier); + GrShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kIn_TypeModifier); + GrShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kOut_TypeModifier); SkString vshaderTxt(version); aPosition.appendDecl(glslCaps, &vshaderTxt); @@ -129,7 +129,7 @@ GrGLuint GLVec4ScalarBench::setupShader(const GrGLContext* ctx) { // coded center and compare that to some hard-coded circle radius to compute a coverage. // Then, this coverage is mixed with the coverage from the previous stage and passed to the // next stage. - GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier); + GrShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier); SkString fshaderTxt(version); GrGLSLAppendDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, *glslCaps, &fshaderTxt); oPosition.setTypeModifier(GrShaderVar::kIn_TypeModifier); diff --git a/bench/GLVertexAttributesBench.cpp b/bench/GLVertexAttributesBench.cpp index 1bd4ff3f30..c588f9b6b8 100644 --- a/bench/GLVertexAttributesBench.cpp +++ b/bench/GLVertexAttributesBench.cpp @@ -11,12 +11,12 @@ #if SK_SUPPORT_GPU #include "GLBench.h" +#include "GrShaderVar.h" #include "gl/GrGLContext.h" #include "gl/GrGLInterface.h" #include "gl/GrGLUtil.h" #include "glsl/GrGLSL.h" #include "glsl/GrGLSLCaps.h" -#include "glsl/GrGLSLShaderVar.h" #include <stdio.h> /* @@ -69,9 +69,9 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a const char* version = glslCaps->versionDeclString(); // setup vertex shader - GrGLSLShaderVar aPosition("a_position", kVec4f_GrSLType, GrShaderVar::kIn_TypeModifier); - SkTArray<GrGLSLShaderVar> aVars; - SkTArray<GrGLSLShaderVar> oVars; + GrShaderVar aPosition("a_position", kVec4f_GrSLType, GrShaderVar::kIn_TypeModifier); + SkTArray<GrShaderVar> aVars; + SkTArray<GrShaderVar> oVars; SkString vshaderTxt(version); aPosition.appendDecl(glslCaps, &vshaderTxt); @@ -80,9 +80,9 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a for (uint32_t i = 0; i < attribs; i++) { SkString aname; aname.appendf("a_color_%d", i); - aVars.push_back(GrGLSLShaderVar(aname.c_str(), - kVec4f_GrSLType, - GrShaderVar::kIn_TypeModifier)); + aVars.push_back(GrShaderVar(aname.c_str(), + kVec4f_GrSLType, + GrShaderVar::kIn_TypeModifier)); aVars.back().appendDecl(glslCaps, &vshaderTxt); vshaderTxt.append(";\n"); @@ -91,9 +91,9 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a for (uint32_t i = 0; i < maxAttribs; i++) { SkString oname; oname.appendf("o_color_%d", i); - oVars.push_back(GrGLSLShaderVar(oname.c_str(), - kVec4f_GrSLType, - GrShaderVar::kOut_TypeModifier)); + oVars.push_back(GrShaderVar(oname.c_str(), + kVec4f_GrSLType, + GrShaderVar::kOut_TypeModifier)); oVars.back().appendDecl(glslCaps, &vshaderTxt); vshaderTxt.append(";\n"); } @@ -115,7 +115,7 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a vshaderTxt.append("}\n"); // setup fragment shader - GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier); + GrShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier); SkString fshaderTxt(version); GrGLSLAppendDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, *glslCaps, &fshaderTxt); |