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

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

Issue 182413006: Workaround Linux AMD driver bug where TEXTURE_MAX_ANISOTROPY init value is incorrect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rid of ppapi change Created 6 years, 10 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.cc » ('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 38516e7d49a7887c5685917a36fb585463ad9d1b..e090e0bb7b0bec779c39969e406765f6e22dcc65 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -119,7 +119,8 @@ Texture::Texture(GLuint service_id)
immutable_(false),
has_images_(false),
estimated_size_(0),
- can_render_condition_(CAN_RENDER_ALWAYS) {
+ can_render_condition_(CAN_RENDER_ALWAYS),
+ texture_max_anisotropy_initialized_(false) {
}
Texture::~Texture() {
@@ -755,6 +756,14 @@ bool Texture::IsLevelCleared(GLenum target, GLint level) const {
return info.cleared;
}
+void Texture::InitTextureMaxAnisotropyIfNeeded(GLenum target) {
+ if (texture_max_anisotropy_initialized_)
+ return;
+ texture_max_anisotropy_initialized_ = true;
+ GLfloat params[] = { 1.0f };
+ glTexParameterfv(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, params);
+}
+
bool Texture::ClearLevel(
GLES2Decoder* decoder, GLenum target, GLint level) {
DCHECK(decoder);
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698