summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2015-08-20 10:25:59 +0300
committerEmil Velikov <emil.l.velikov@gmail.com>2015-09-02 21:06:35 +0100
commit5ab8bd7d99a2f8e235b1a02b92847cba55a13054 (patch)
tree9652dad518f3b99c6d62f9b647afe0b81c957ab1
parent38457285b755a879a953779702262fafd813d2b8 (diff)
mesa: update fbo state in glTexStorage
We have to re-validate FBOs rendering to the texture like is done with TexImage and CopyTexImage. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91673 Cc: "10.6" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7eda897bf05dc572dbe83f3a1075b773b0c65708)
-rw-r--r--src/mesa/main/texstorage.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index 53cb2c091f8..d589b73592f 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -189,6 +189,20 @@ clear_texture_fields(struct gl_context *ctx,
}
+/**
+ * Update/re-validate framebuffer object.
+ */
+static void
+update_fbo_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
+{
+ const unsigned numFaces = _mesa_num_tex_faces(texObj->Target);
+ for (int level = 0; level < ARRAY_SIZE(texObj->Image[0]); level++) {
+ for (unsigned face = 0; face < numFaces; face++)
+ _mesa_update_fbo_texture(ctx, texObj, face, level);
+ }
+}
+
+
GLboolean
_mesa_is_legal_tex_storage_format(struct gl_context *ctx, GLenum internalformat)
{
@@ -445,6 +459,7 @@ _mesa_texture_storage(struct gl_context *ctx, GLuint dims,
_mesa_set_texture_view_state(ctx, texObj, target, levels);
+ update_fbo_texture(ctx, texObj);
}
}