Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: gpu/command_buffer/service/texture_manager.cc

Issue 2821913002: Force cube map texture complete on Linux AMD (Closed)
Patch Set: remove webgl2ores3 condition Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | gpu/config/gpu_driver_bug_list.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 68cd6bf3e182ae549100085bb16a2ca101962ac9..3a655827f75efa7ac3312f866295dc400fda5642 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -395,6 +395,24 @@ class ScopedResetPixelUnpackBuffer{
} // namespace anonymous
+DecoderTextureState::DecoderTextureState(
+ const GpuDriverBugWorkarounds& workarounds)
+ : tex_image_failed(false),
+ texture_upload_count(0),
+ texsubimage_faster_than_teximage(
+ workarounds.texsubimage_faster_than_teximage),
+ force_cube_map_positive_x_allocation(
+ workarounds.force_cube_map_positive_x_allocation),
+ force_cube_complete(workarounds.force_cube_complete),
+ force_int_or_srgb_cube_texture_complete(
+ workarounds.force_int_or_srgb_cube_texture_complete),
+ unpack_alignment_workaround_with_unpack_buffer(
+ workarounds.unpack_alignment_workaround_with_unpack_buffer),
+ unpack_overlapping_rows_separately_unpack_buffer(
+ workarounds.unpack_overlapping_rows_separately_unpack_buffer),
+ unpack_image_height_workaround_with_unpack_buffer(
+ workarounds.unpack_image_height_workaround_with_unpack_buffer) {}
+
TextureManager::DestructionObserver::DestructionObserver() {}
TextureManager::DestructionObserver::~DestructionObserver() {}
@@ -2527,7 +2545,8 @@ void TextureManager::DoCubeMapWorkaround(
std::vector<GLenum> undefined_faces;
Texture* texture = texture_ref->texture();
- if (texture_state->force_cube_complete) {
+ if (texture_state->force_cube_complete ||
+ texture_state->force_int_or_srgb_cube_texture_complete) {
int width = 0;
int height = 0;
for (unsigned i = 0; i < 6; i++) {
@@ -2585,6 +2604,15 @@ void TextureManager::ValidateAndDoTexImage(
(texture_state->force_cube_complete ||
(texture_state->force_cube_map_positive_x_allocation &&
args.target != GL_TEXTURE_CUBE_MAP_POSITIVE_X));
+ // Force integer or srgb cube map texture complete, see crbug.com/712117.
+ need_cube_map_workaround =
+ need_cube_map_workaround ||
+ (texture->target() == GL_TEXTURE_CUBE_MAP &&
+ texture_state->force_int_or_srgb_cube_texture_complete &&
+ (GLES2Util::IsIntegerFormat(args.internal_format) ||
+ GLES2Util::GetColorEncodingFromInternalFormat(args.internal_format) ==
+ GL_SRGB));
+
if (need_cube_map_workaround && !buffer) {
DoCubeMapWorkaround(texture_state, state, framebuffer_state,
texture_ref, function_name, args);
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | gpu/config/gpu_driver_bug_list.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698