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:
authorClément Foucault <foucault.clem@gmail.com>2018-11-16 21:26:23 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-16 21:26:23 +0300
commit2c347ebbba9b76c26f3a4b1e4f8bbe84cb90d1f4 (patch)
tree9224a975548570da64af7700be3a389905ab5879 /source/blender/gpu
parent64dc0f2685afbd829fffa1a95741006b7a734f7d (diff)
Fix T57874: Crash due to IMM_BUFFER_SIZE when drawing cached frames...
... in the timeline.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_immediate_util.h1
-rw-r--r--source/blender/gpu/intern/gpu_immediate_util.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_immediate_util.h b/source/blender/gpu/GPU_immediate_util.h
index 7baf359c52e..e5b259b4783 100644
--- a/source/blender/gpu/GPU_immediate_util.h
+++ b/source/blender/gpu/GPU_immediate_util.h
@@ -33,6 +33,7 @@ void immRectf(uint pos, float x1, float y1, float x2, float y2);
void immRecti(uint pos, int x1, int y1, int x2, int y2);
/* Same as immRectf/immRecti but does not call immBegin/immEnd. To use with GPU_PRIM_TRIS. */
+void immRectf_fast(uint pos, float x1, float y1, float x2, float y2);
void immRectf_fast_with_color(uint pos, uint col, float x1, float y1, float x2, float y2, const float color[4]);
void immRecti_fast_with_color(uint pos, uint col, int x1, int y1, int x2, int y2, const float color[4]);
diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c
index 983c70281a2..5cba0c42ee3 100644
--- a/source/blender/gpu/intern/gpu_immediate_util.c
+++ b/source/blender/gpu/intern/gpu_immediate_util.c
@@ -87,6 +87,17 @@ void immRecti(uint pos, int x1, int y1, int x2, int y2)
immEnd();
}
+void immRectf_fast(uint pos, float x1, float y1, float x2, float y2)
+{
+ immVertex2f(pos, x1, y1);
+ immVertex2f(pos, x2, y1);
+ immVertex2f(pos, x2, y2);
+
+ immVertex2f(pos, x1, y1);
+ immVertex2f(pos, x2, y2);
+ immVertex2f(pos, x1, y2);
+}
+
void immRectf_fast_with_color(uint pos, uint col, float x1, float y1, float x2, float y2, const float color[4])
{
immAttr4fv(col, color);