gpu: Update GrGLCaps usage of fTextureRectangle with chromium.
R=bsalomon@google.com Bug:900706 Change-Id: I0ca0062f12f905c47e9f096acf675b93f131e390 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234990 Commit-Queue: Khushal Sagar <khushalsagar@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
3c8f9cb45d
commit
c43ab22a8c
@ -220,9 +220,9 @@ void GrTextureDomain::GLDomain::setData(const GrGLSLProgramDataManager& pdman,
|
||||
};
|
||||
|
||||
if (proxy->textureType() == GrTextureType::kRectangle) {
|
||||
SkASSERT(values[0] >= 0.0f && values[0] <= proxy->height());
|
||||
SkASSERT(values[0] >= 0.0f && values[0] <= proxy->width());
|
||||
SkASSERT(values[1] >= 0.0f && values[1] <= proxy->height());
|
||||
SkASSERT(values[2] >= 0.0f && values[2] <= proxy->height());
|
||||
SkASSERT(values[2] >= 0.0f && values[2] <= proxy->width());
|
||||
SkASSERT(values[3] >= 0.0f && values[3] <= proxy->height());
|
||||
} else {
|
||||
SkASSERT(values[0] >= 0.0f && values[0] <= 1.0f);
|
||||
|
@ -237,10 +237,14 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
|
||||
fRectangleTextureSupport = true;
|
||||
}
|
||||
} else if (GR_IS_GR_GL_ES(standard)) {
|
||||
// ANGLE will advertise the extension in ES2 contexts but actually using the texture in
|
||||
// a shader requires ES3 shading language.
|
||||
fRectangleTextureSupport = ctxInfo.hasExtension("GL_ANGLE_texture_rectangle") &&
|
||||
ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
|
||||
if (kChromium_GrGLDriver == ctxInfo.driver()) {
|
||||
fRectangleTextureSupport = ctxInfo.hasExtension("GL_ARB_texture_rectangle");
|
||||
} else {
|
||||
// ANGLE will advertise the extension in ES2 contexts but actually using the texture in
|
||||
// a shader requires ES3 shading language.
|
||||
fRectangleTextureSupport = ctxInfo.hasExtension("GL_ANGLE_texture_rectangle") &&
|
||||
ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
|
||||
}
|
||||
} // no WebGL support
|
||||
|
||||
// GrCaps defaults fClampToBorderSupport to true, so disable when unsupported
|
||||
|
@ -656,7 +656,7 @@ void GLSLCodeGenerator::writeFunctionCall(const FunctionCall& c) {
|
||||
proj = false;
|
||||
break;
|
||||
case SpvDimRect:
|
||||
dim = "Rect";
|
||||
dim = "2DRect";
|
||||
proj = false;
|
||||
break;
|
||||
case SpvDimBuffer:
|
||||
|
Loading…
Reference in New Issue
Block a user