summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorrahul.g <rahul.g@samsung.com>2015-04-29 07:18:04 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-29 14:18:53 +0000
commit0aaf8db1aff9bc9b0c73bab6c603d21f95288ef3 (patch)
tree0c7c5dd3d44a6af4f7c41c84e0f832f302355483 /gpu
parent57d7cbe499248a6ce91ff5b0c954da634cba713c (diff)
downloadchromium_src-0aaf8db1aff9bc9b0c73bab6c603d21f95288ef3.zip
chromium_src-0aaf8db1aff9bc9b0c73bab6c603d21f95288ef3.tar.gz
chromium_src-0aaf8db1aff9bc9b0c73bab6c603d21f95288ef3.tar.bz2
Offscreen framebuffer creation on Mali-400 GPU
Make GPU bug workaround to disable using GL_RGB format on Mali-400 This CL manages offscreen framebuffer creation based on GL_RGBA format and ignoring GL_RGB format because it is not supported on Mali-400 GPU. BUG=449150 Review URL: https://codereview.chromium.org/996163003 Cr-Commit-Position: refs/heads/master@{#327487}
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc18
-rw-r--r--gpu/config/gpu_driver_bug_list_json.cc12
-rw-r--r--gpu/config/gpu_driver_bug_workaround_type.h2
3 files changed, 25 insertions, 7 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 0e69077..2fe9f1b 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2624,8 +2624,10 @@ bool GLES2DecoderImpl::Initialize(
GL_RGBA8 : GL_RGB8;
} else {
offscreen_target_samples_ = 1;
- offscreen_target_color_format_ = attrib_parser.alpha_size > 0 ?
- GL_RGBA : GL_RGB;
+ offscreen_target_color_format_ =
+ attrib_parser.alpha_size > 0 || workarounds().disable_gl_rgb_format
+ ? GL_RGBA
+ : GL_RGB;
}
// ANGLE only supports packed depth/stencil formats, so use it if it is
@@ -2647,8 +2649,10 @@ bool GLES2DecoderImpl::Initialize(
GL_STENCIL_INDEX8 : 0;
}
} else {
- offscreen_target_color_format_ = attrib_parser.alpha_size > 0 ?
- GL_RGBA : GL_RGB;
+ offscreen_target_color_format_ =
+ attrib_parser.alpha_size > 0 || workarounds().disable_gl_rgb_format
+ ? GL_RGBA
+ : GL_RGB;
// If depth is requested at all, use the packed depth stencil format if
// it's available, as some desktop GL drivers don't support any non-packed
@@ -2670,8 +2674,10 @@ bool GLES2DecoderImpl::Initialize(
}
}
- offscreen_saved_color_format_ = attrib_parser.alpha_size > 0 ?
- GL_RGBA : GL_RGB;
+ offscreen_saved_color_format_ =
+ attrib_parser.alpha_size > 0 || workarounds().disable_gl_rgb_format
+ ? GL_RGBA
+ : GL_RGB;
// Create the target frame buffer. This is the one that the client renders
// directly to.
diff --git a/gpu/config/gpu_driver_bug_list_json.cc b/gpu/config/gpu_driver_bug_list_json.cc
index 172aca0..f9b9191 100644
--- a/gpu/config/gpu_driver_bug_list_json.cc
+++ b/gpu/config/gpu_driver_bug_list_json.cc
@@ -19,7 +19,7 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST(
{
"name": "gpu driver bug list",
// Please update the version number whenever you change this file.
- "version": "7.24",
+ "version": "7.25",
"entries": [
{
"id": 1,
@@ -1253,6 +1253,16 @@ LONG_STRING_CONST(
"avoid_egl_image_target_texture_reuse",
"disable_egl_khr_wait_sync"
]
+ },
+ {
+ "id": 108,
+ "cr_bugs": [449150],
+ "description": "Mali-400 does not support GL_RGB format",
+ "gl_vendor": "ARM.*",
+ "gl_renderer": ".*Mali-400.*",
+ "features": [
+ "disable_gl_rgb_format"
+ ]
}
]
}
diff --git a/gpu/config/gpu_driver_bug_workaround_type.h b/gpu/config/gpu_driver_bug_workaround_type.h
index db5174c..4eb5913 100644
--- a/gpu/config/gpu_driver_bug_workaround_type.h
+++ b/gpu/config/gpu_driver_bug_workaround_type.h
@@ -126,6 +126,8 @@
validate_multisample_buffer_allocation) \
GPU_OP(WAKE_UP_GPU_BEFORE_DRAWING, \
wake_up_gpu_before_drawing) \
+ GPU_OP(DISABLE_GL_RGB_FORMAT, \
+ disable_gl_rgb_format) \
namespace gpu {