aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/gpu/GrDriverBugWorkaroundsAutogen.h32
-rw-r--r--src/gpu/gl/GrGLCaps.cpp9
-rw-r--r--src/gpu/gpu_workaround_list.txt1
3 files changed, 27 insertions, 15 deletions
diff --git a/include/gpu/GrDriverBugWorkaroundsAutogen.h b/include/gpu/GrDriverBugWorkaroundsAutogen.h
index a3e2dc80cf..1c22cebdd6 100644
--- a/include/gpu/GrDriverBugWorkaroundsAutogen.h
+++ b/include/gpu/GrDriverBugWorkaroundsAutogen.h
@@ -5,19 +5,21 @@
// This file is auto-generated from build_workaround_header.py
// DO NOT EDIT!
-#define GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)\
- GPU_OP(DISABLE_BLEND_EQUATION_ADVANCED, \
- disable_blend_equation_advanced) \
- GPU_OP(DISABLE_DISCARD_FRAMEBUFFER, \
- disable_discard_framebuffer) \
- GPU_OP(DISALLOW_LARGE_INSTANCED_DRAW, \
- disallow_large_instanced_draw) \
- GPU_OP(GL_CLEAR_BROKEN, \
- gl_clear_broken) \
- GPU_OP(MAX_MSAA_SAMPLE_COUNT_4, \
- max_msaa_sample_count_4) \
- GPU_OP(MAX_TEXTURE_SIZE_LIMIT_4096, \
- max_texture_size_limit_4096) \
- GPU_OP(RESTORE_SCISSOR_ON_FBO_CHANGE, \
- restore_scissor_on_fbo_change) \
+#define GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) \
+ GPU_OP(DISABLE_BLEND_EQUATION_ADVANCED, \
+ disable_blend_equation_advanced) \
+ GPU_OP(DISABLE_DISCARD_FRAMEBUFFER, \
+ disable_discard_framebuffer) \
+ GPU_OP(DISALLOW_LARGE_INSTANCED_DRAW, \
+ disallow_large_instanced_draw) \
+ GPU_OP(GL_CLEAR_BROKEN, \
+ gl_clear_broken) \
+ GPU_OP(MAX_MSAA_SAMPLE_COUNT_4, \
+ max_msaa_sample_count_4) \
+ GPU_OP(MAX_TEXTURE_SIZE_LIMIT_4096, \
+ max_texture_size_limit_4096) \
+ GPU_OP(PACK_PARAMETERS_WORKAROUND_WITH_PACK_BUFFER, \
+ pack_parameters_workaround_with_pack_buffer) \
+ GPU_OP(RESTORE_SCISSOR_ON_FBO_CHANGE, \
+ restore_scissor_on_fbo_change) \
// The End
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 61f4aa0009..39520189d7 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -109,6 +109,15 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
ctxInfo.hasExtension("GL_ANGLE_pack_reverse_row_order");
}
+ if (fDriverBugWorkarounds.pack_parameters_workaround_with_pack_buffer) {
+ // In some cases drivers handle copying the last row incorrectly
+ // when using GL_PACK_ROW_LENGTH. Chromium handles this by iterating
+ // through every row and conditionally clobbering that value, but
+ // Skia already has a scratch buffer workaround when pack row length
+ // is not supported, so just use that.
+ fPackRowLengthSupport = false;
+ }
+
fTextureUsageSupport = (kGLES_GrGLStandard == standard) &&
ctxInfo.hasExtension("GL_ANGLE_texture_usage");
diff --git a/src/gpu/gpu_workaround_list.txt b/src/gpu/gpu_workaround_list.txt
index fb79bfc570..3c8d37f1d2 100644
--- a/src/gpu/gpu_workaround_list.txt
+++ b/src/gpu/gpu_workaround_list.txt
@@ -4,4 +4,5 @@ disallow_large_instanced_draw
gl_clear_broken
max_msaa_sample_count_4
max_texture_size_limit_4096
+pack_parameters_workaround_with_pack_buffer
restore_scissor_on_fbo_change