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

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

Issue 2895493002: Fix fbo completeness check when non-base-level texture image is attached. (Closed)
Patch Set: handle a bug related to TexStorage Created 3 years, 7 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/mailbox_manager_sync.h ('k') | gpu/command_buffer/service/texture_manager.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.h
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
index 0d62faf78bb7b9ac8e9aad6453da7df079ca8bbf..02c5c1119c781cf6a62d236fcfe521d00ac3ceef 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -290,9 +290,7 @@ class GPU_EXPORT Texture final : public TextureBase {
--framebuffer_attachment_count_;
}
- void SetImmutable(bool immutable) {
- immutable_ = immutable;
- }
+ void SetImmutable(bool immutable);
bool IsImmutable() const {
return immutable_;
@@ -326,6 +324,14 @@ class GPU_EXPORT Texture final : public TextureBase {
bool EmulatingRGB();
+ // In GLES2 "texture complete" means it has all required mips for filtering
+ // down to a 1x1 pixel texture, they are in the correct order, they are all
+ // the same format.
+ bool texture_complete() const {
+ DCHECK(!completeness_dirty_);
+ return texture_complete_;
+ }
+
static bool ColorRenderable(const FeatureInfo* feature_info,
GLenum internal_format,
bool immutable);
@@ -419,16 +425,10 @@ class GPU_EXPORT Texture final : public TextureBase {
void MarkLevelAsInternalWorkaround(GLenum target, GLint level);
- // In GLES2 "texture complete" means it has all required mips for filtering
- // down to a 1x1 pixel texture, they are in the correct order, they are all
- // the same format.
- bool texture_complete() const {
- return texture_complete_;
- }
-
// In GLES2 "cube complete" means all 6 faces level 0 are defined, all the
// same format, all the same dimensions and all width = height.
bool cube_complete() const {
+ DCHECK(!completeness_dirty_);
return cube_complete_;
}
@@ -613,12 +613,13 @@ class GPU_EXPORT Texture final : public TextureBase {
// Whether or not this texture is "texture complete"
bool texture_complete_;
- // Whether mip levels have changed and should be reverified.
- bool texture_mips_dirty_;
-
// Whether or not this texture is "cube complete"
bool cube_complete_;
+ // Whether mip levels, base_level, or max_level have changed and
+ // texture_completeness_ and cube_completeness_ should be reverified.
+ bool completeness_dirty_;
+
// Whether or not this texture is non-power-of-two
bool npot_;
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager_sync.h ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698