aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLShaderBuilder.h
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2016-03-11 10:07:37 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-11 10:07:37 -0800
commit9c3f14327a38e79ab7d0cf30dfd9bf89676fde06 (patch)
treef4695cc85cf19bf471ed8c956083f2234f18d4e1 /src/gpu/glsl/GrGLSLShaderBuilder.h
parent6b563156eb7ce05b51997695ec9ab2aedcc2e6b1 (diff)
Add support for vertex and geometry shader textures
Adds a visibility bitfield to GrTextureAccess that controls in which shaders the texture should be accessible. Also adds caps and validation to ensure we don't exceed texture limits. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1782583002 Review URL: https://codereview.chromium.org/1782583002
Diffstat (limited to 'src/gpu/glsl/GrGLSLShaderBuilder.h')
-rw-r--r--src/gpu/glsl/GrGLSLShaderBuilder.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.h b/src/gpu/glsl/GrGLSLShaderBuilder.h
index 7bfc610bde..c408c8ae84 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.h
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.h
@@ -25,16 +25,6 @@ public:
GrGLSLShaderBuilder(GrGLSLProgramBuilder* program);
virtual ~GrGLSLShaderBuilder() {}
- /*
- * We put texture lookups in the base class because it is TECHNICALLY possible to do texture
- * lookups in any kind of shader. However, for the time being using these calls on non-fragment
- * shaders will result in a shader compilation error as texture sampler uniforms are only
- * visible to the fragment shader. It would not be hard to change this behavior, if someone
- * actually wants to do texture lookups in a non-fragment shader
- *
- * TODO if append texture lookup is used on a non-fragment shader, sampler uniforms should be
- * made visible to that shaders
- */
/** Appends a 2D texture sample with projection if necessary. coordType must either be Vec2f or
Vec3f. The latter is interpreted as projective texture coords. The vec length and swizzle
order of the result depends on the GrTextureAccess associated with the GrGLSLTextureSampler.