aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-10-26 13:32:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-26 18:14:17 +0000
commit25019175eb82f2b0788e43987702f91551d88544 (patch)
tree80c12169765a1d73922ff033c5776961c56cea78 /src/gpu/gl
parentf232581c67aa4fc6e6bd5e397ba9030de9ce1346 (diff)
Add GalliumLLVM GrGLRenderer and fix alpha8 renderability
Bug: skia: Change-Id: I20f41966ed140327e0a92618da8e4091e1de1ea8 Reviewed-on: https://skia-review.googlesource.com/64260 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp7
-rw-r--r--src/gpu/gl/GrGLUtil.cpp3
-rw-r--r--src/gpu/gl/GrGLUtil.h1
3 files changed, 10 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 05bb1212b1..9d031ce4ad 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -1152,6 +1152,12 @@ void GrGLCaps::initFSAASupport(const GrContextOptions& contextOptions, const GrG
}
if (kGL_GrGLStandard != ctxInfo.standard()) {
+ if (ctxInfo.version() >= GR_GL_VER(3,0) &&
+ ctxInfo.renderer() != kGalliumLLVM_GrGLRenderer) {
+ // The gallium llvmpipe renderer for es3.0 does not have textureRed support even though
+ // it is part of the spec. Thus alpha8 will not be renderable for those devices.
+ fAlpha8IsRenderable = true;
+ }
// We prefer the EXT/IMG extension over ES3 MSAA because we've observed
// ES3 driver bugs on at least one device with a tiled GPU (N10).
if (ctxInfo.hasExtension("GL_EXT_multisampled_render_to_texture")) {
@@ -1162,7 +1168,6 @@ void GrGLCaps::initFSAASupport(const GrContextOptions& contextOptions, const GrG
fMSFBOType = kMixedSamples_MSFBOType;
} else if (ctxInfo.version() >= GR_GL_VER(3,0)) {
fMSFBOType = kStandard_MSFBOType;
- fAlpha8IsRenderable = true;
} else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {
fMSFBOType = kStandard_MSFBOType;
} else if (ctxInfo.hasExtension("GL_ANGLE_framebuffer_multisample")) {
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index a0ea477e2c..e3ae5447e2 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -372,6 +372,9 @@ GrGLRenderer GrGLGetRendererFromString(const char* rendererString) {
if (0 == strcmp("Mesa Offscreen", rendererString)) {
return kOSMesa_GrGLRenderer;
}
+ if (strstr(rendererString, "llvmpipe")) {
+ return kGalliumLLVM_GrGLRenderer;
+ }
static const char kMaliTStr[] = "Mali-T";
if (0 == strncmp(rendererString, kMaliTStr, SK_ARRAY_COUNT(kMaliTStr) - 1)) {
return kMaliT_GrGLRenderer;
diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h
index 04aa5bc6cc..9ba2db6dc0 100644
--- a/src/gpu/gl/GrGLUtil.h
+++ b/src/gpu/gl/GrGLUtil.h
@@ -59,6 +59,7 @@ enum GrGLRenderer {
kIntel4xxx_GrGLRenderer,
/** Either HD 6xxx or Iris 6xxx */
kIntel6xxx_GrGLRenderer,
+ kGalliumLLVM_GrGLRenderer,
/** T-6xx, T-7xx, or T-8xx */
kMaliT_GrGLRenderer,
kANGLE_GrGLRenderer,