aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Adrienne Walker <enne@chromium.org>2018-05-15 11:41:24 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-15 22:10:43 +0000
commitd7c7978d8c231894e8437e05db9ecd10f4b77c01 (patch)
tree3a75fcaa4747f6a0f1b7cdb05c1ea6b4b8a4ac86
parent001cae07d386038a5602663e1ce149cc51c6ebe9 (diff)
Driver bug workaround: max_msaa_sample_count_4
Bug: chromium: 829614 Change-Id: I54054191815ace6159585dab7dd811ebdc863095 Reviewed-on: https://skia-review.googlesource.com/126983 Commit-Queue: Adrienne Walker <enne@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
-rw-r--r--include/gpu/GrDriverBugWorkaroundsAutogen.h2
-rw-r--r--src/gpu/gl/GrGLCaps.cpp6
-rw-r--r--src/gpu/gpu_workaround_list.txt1
3 files changed, 8 insertions, 1 deletions
diff --git a/include/gpu/GrDriverBugWorkaroundsAutogen.h b/include/gpu/GrDriverBugWorkaroundsAutogen.h
index 1b3c8f8075..2fdcaa065d 100644
--- a/include/gpu/GrDriverBugWorkaroundsAutogen.h
+++ b/include/gpu/GrDriverBugWorkaroundsAutogen.h
@@ -12,6 +12,8 @@
disable_discard_framebuffer) \
GPU_OP(DISALLOW_LARGE_INSTANCED_DRAW, \
disallow_large_instanced_draw) \
+ GPU_OP(MAX_MSAA_SAMPLE_COUNT_4, \
+ max_msaa_sample_count_4) \
GPU_OP(MAX_TEXTURE_SIZE_LIMIT_4096, \
max_texture_size_limit_4096) \
// The End
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 727db6c648..dc4fc3130c 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -2786,7 +2786,11 @@ int GrGLCaps::getRenderTargetSampleCount(int requestedCount, GrPixelConfig confi
for (int i = 0; i < count; ++i) {
if (fConfigTable[config].fColorSampleCounts[i] >= requestedCount) {
- return fConfigTable[config].fColorSampleCounts[i];
+ int count = fConfigTable[config].fColorSampleCounts[i];
+ if (fDriverBugWorkarounds.max_msaa_sample_count_4) {
+ count = SkTMin(count, 4);
+ }
+ return count;
}
}
return 0;
diff --git a/src/gpu/gpu_workaround_list.txt b/src/gpu/gpu_workaround_list.txt
index 8c399a2f0b..aa1e1a2826 100644
--- a/src/gpu/gpu_workaround_list.txt
+++ b/src/gpu/gpu_workaround_list.txt
@@ -1,4 +1,5 @@
disable_blend_equation_advanced
disable_discard_framebuffer
disallow_large_instanced_draw
+max_msaa_sample_count_4
max_texture_size_limit_4096