aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-10-21 10:45:48 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-21 10:45:48 -0700
commit0d3f061262a53b775f0a92b0abf8a4a846290d65 (patch)
treebc17cd4c004d97c5989951bc26e5d4b26925e7b6 /bench
parent3d9d7a7213748761d46ade183e11aa7cb55313c1 (diff)
Move GrGLShaderVar to GrGLSL
Diffstat (limited to 'bench')
-rw-r--r--bench/GLInstancedArraysBench.cpp10
-rw-r--r--bench/GLVec4ScalarBench.cpp12
-rw-r--r--bench/GLVertexAttributesBench.cpp14
3 files changed, 18 insertions, 18 deletions
diff --git a/bench/GLInstancedArraysBench.cpp b/bench/GLInstancedArraysBench.cpp
index 3d5a662a12..bf9aaac0bc 100644
--- a/bench/GLInstancedArraysBench.cpp
+++ b/bench/GLInstancedArraysBench.cpp
@@ -14,9 +14,9 @@
#include "gl/GrGLContext.h"
#include "gl/GrGLGLSL.h"
#include "gl/GrGLInterface.h"
-#include "gl/GrGLShaderVar.h"
#include "gl/GrGLUtil.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
@@ -110,9 +110,9 @@ GrGLuint GLCpuPosInstancedArraysBench::setupShader(const GrGLContext* ctx) {
const char* version = GrGLGetGLSLVersionDecl(*ctx);
// setup vertex shader
- GrGLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
- GrGLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
- GrGLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kVaryingOut_TypeModifier);
+ GrGLSLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
+ GrGLSLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
+ GrGLSLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kVaryingOut_TypeModifier);
SkString vshaderTxt(version);
aPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
@@ -132,7 +132,7 @@ GrGLuint GLCpuPosInstancedArraysBench::setupShader(const GrGLContext* ctx) {
const GrGLInterface* gl = ctx->interface();
// setup fragment shader
- GrGLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier);
+ GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier);
SkString fshaderTxt(version);
GrGLAppendGLSLDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, gl->fStandard,
&fshaderTxt);
diff --git a/bench/GLVec4ScalarBench.cpp b/bench/GLVec4ScalarBench.cpp
index e210499401..ed61ce0fbd 100644
--- a/bench/GLVec4ScalarBench.cpp
+++ b/bench/GLVec4ScalarBench.cpp
@@ -14,9 +14,9 @@
#include "gl/GrGLContext.h"
#include "gl/GrGLGLSL.h"
#include "gl/GrGLInterface.h"
-#include "gl/GrGLShaderVar.h"
#include "gl/GrGLUtil.h"
#include "glsl/GrGLSLCaps.h"
+#include "glsl/GrGLSLShaderVar.h"
#include <stdio.h>
@@ -100,10 +100,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
- GrGLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
- GrGLShaderVar oPosition("o_position", kVec2f_GrSLType, GrShaderVar::kVaryingOut_TypeModifier);
- GrGLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
- GrGLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kVaryingOut_TypeModifier);
+ GrGLSLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
+ GrGLSLShaderVar oPosition("o_position", kVec2f_GrSLType, GrShaderVar::kVaryingOut_TypeModifier);
+ GrGLSLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
+ GrGLSLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kVaryingOut_TypeModifier);
SkString vshaderTxt(version);
aPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
@@ -130,7 +130,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.
- GrGLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier);
+ GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier);
SkString fshaderTxt(version);
GrGLAppendGLSLDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, gl->fStandard,
&fshaderTxt);
diff --git a/bench/GLVertexAttributesBench.cpp b/bench/GLVertexAttributesBench.cpp
index 34c99deca1..f8325e4e77 100644
--- a/bench/GLVertexAttributesBench.cpp
+++ b/bench/GLVertexAttributesBench.cpp
@@ -14,9 +14,9 @@
#include "gl/GrGLContext.h"
#include "gl/GrGLGLSL.h"
#include "gl/GrGLInterface.h"
-#include "gl/GrGLShaderVar.h"
#include "gl/GrGLUtil.h"
#include "glsl/GrGLSLCaps.h"
+#include "glsl/GrGLSLShaderVar.h"
#include <stdio.h>
/*
@@ -68,9 +68,9 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
const char* version = GrGLGetGLSLVersionDecl(*ctx);
// setup vertex shader
- GrGLShaderVar aPosition("a_position", kVec4f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
- SkTArray<GrGLShaderVar> aVars;
- SkTArray<GrGLShaderVar> oVars;
+ GrGLSLShaderVar aPosition("a_position", kVec4f_GrSLType, GrShaderVar::kAttribute_TypeModifier);
+ SkTArray<GrGLSLShaderVar> aVars;
+ SkTArray<GrGLSLShaderVar> oVars;
SkString vshaderTxt(version);
aPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
@@ -79,7 +79,7 @@ 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(GrGLShaderVar(aname.c_str(),
+ aVars.push_back(GrGLSLShaderVar(aname.c_str(),
kVec4f_GrSLType,
GrShaderVar::kAttribute_TypeModifier));
aVars.back().appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
@@ -90,7 +90,7 @@ 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(GrGLShaderVar(oname.c_str(),
+ oVars.push_back(GrGLSLShaderVar(oname.c_str(),
kVec4f_GrSLType,
GrShaderVar::kVaryingOut_TypeModifier));
oVars.back().appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
@@ -116,7 +116,7 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
const GrGLInterface* gl = ctx->interface();
// setup fragment shader
- GrGLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier);
+ GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier);
SkString fshaderTxt(version);
GrGLAppendGLSLDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision, gl->fStandard,
&fshaderTxt);