Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-04-03 13:08:02 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-04-03 13:08:02 +0400
commitbfeef2f5f07094c4014ce7c7bf7e933c168c2bd0 (patch)
tree3aa0d09177fe75ec884fca39eaf78e0f961fd546 /source/blender/editors/screen
parent9512ae1a4a7b6242f425c219b4dec572f6a88bb8 (diff)
Fix/Workaround #34854: render buffer update writes to wrong layer
Was caused by recent change in image_buffer_rect_update which was writing data to ibuf-rect_float. Apparently, this buffer could point to different render layer than came from RenderResult. Made quick fix for this, which ends up in skipping float buffer update in image_buffer_rect_update and skipping GLSL when image has both byte and float buffers. This will bring speed down a bit, but slower blender is better than broken blender. Proper fix will arrive later this week.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/glutil.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index fecb3c58a2d..74086c7cc8b 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -998,7 +998,14 @@ void glaDrawImBuf_glsl_ctx(const bContext *C, ImBuf *ibuf, float x, float y, int
bool need_fallback = true;
/* Bytes and dithering are not supported on GLSL yet */
- if (ibuf->rect_float && ibuf->dither == 0.0f) {
+
+ /* WORKAROUND: only use GLSL if there's no byte buffer at all,
+ * this is because of how render results are handled,
+ * they're not updating image buffer's float buffer,
+ * but writes data directly to it's byte buffer and
+ * modifies display buffer.
+ */
+ if (ibuf->rect == NULL && ibuf->rect_float && ibuf->dither == 0.0f) {
if (IMB_colormanagement_setup_glsl_draw_from_ctx(C)) {
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glColor4f(1.0, 1.0, 1.0, 1.0);