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:
authorGermano Cavalcantemano-wii <germano.costa@ig.com.br>2021-01-11 03:05:17 +0300
committerGermano Cavalcantemano-wii <germano.costa@ig.com.br>2021-01-11 03:07:04 +0300
commitaf88d23ffaab650f050886afc7595a8f6bff08b8 (patch)
tree92ad61d638000bd18d816438c7ae2a8a981eae2f /source/blender/gpu
parentd4330ae70be6a924d40ae7efccb988d51109c5c4 (diff)
Revert "Fix typo; Documentation; Expose layer for framebuffer attachament; Add framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask"
This reverts commit 9db3d1951da15254efbbcf028176facb78118ec1. This was an accidental commit of the patch D8826
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_framebuffer.h4
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.cc26
2 files changed, 7 insertions, 23 deletions
diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h
index 726dcbf0174..c0f91756bf6 100644
--- a/source/blender/gpu/GPU_framebuffer.h
+++ b/source/blender/gpu/GPU_framebuffer.h
@@ -209,10 +209,6 @@ void GPU_framebuffer_recursive_downsample(GPUFrameBuffer *fb,
void (*callback)(void *userData, int level),
void *userData);
-void GPU_framebuffer_push(GPUFrameBuffer *fb);
-GPUFrameBuffer *GPU_framebuffer_pop(void);
-uint GPU_framebuffer_stack_level_get(void);
-
/* GPU OffScreen
* - wrapper around frame-buffer and texture for simple off-screen drawing
*/
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc
index 910bdc531fe..d5d7994a154 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.cc
+++ b/source/blender/gpu/intern/gpu_framebuffer.cc
@@ -476,8 +476,10 @@ void GPU_framebuffer_recursive_downsample(GPUFrameBuffer *gpu_fb,
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Framebuffer Push/Pop
+/** \name GPUOffScreen
*
+ * Container that holds a frame-buffer and its textures.
+ * Might be bound to multiple contexts.
* \{ */
#define FRAMEBUFFER_STACK_DEPTH 16
@@ -487,36 +489,22 @@ static struct {
uint top;
} FrameBufferStack = {{nullptr}};
-void GPU_framebuffer_push(GPUFrameBuffer *fb)
+static void gpuPushFrameBuffer(GPUFrameBuffer *fb)
{
BLI_assert(FrameBufferStack.top < FRAMEBUFFER_STACK_DEPTH);
FrameBufferStack.framebuffers[FrameBufferStack.top] = fb;
FrameBufferStack.top++;
}
-GPUFrameBuffer *GPU_framebuffer_pop(void)
+static GPUFrameBuffer *gpuPopFrameBuffer()
{
BLI_assert(FrameBufferStack.top > 0);
FrameBufferStack.top--;
return FrameBufferStack.framebuffers[FrameBufferStack.top];
}
-uint GPU_framebuffer_stack_level_get(void)
-{
- return FrameBufferStack.top;
-}
-
#undef FRAMEBUFFER_STACK_DEPTH
-/** \} */
-
-/* -------------------------------------------------------------------- */
-/** \name GPUOffScreen
- *
- * Container that holds a frame-buffer and its textures.
- * Might be bound to multiple contexts.
- * \{ */
-
#define MAX_CTX_FB_LEN 3
struct GPUOffScreen {
@@ -626,7 +614,7 @@ void GPU_offscreen_bind(GPUOffScreen *ofs, bool save)
{
if (save) {
GPUFrameBuffer *fb = GPU_framebuffer_active_get();
- GPU_framebuffer_push(fb);
+ gpuPushFrameBuffer(fb);
}
unwrap(gpu_offscreen_fb_get(ofs))->bind(false);
}
@@ -635,7 +623,7 @@ void GPU_offscreen_unbind(GPUOffScreen *UNUSED(ofs), bool restore)
{
GPUFrameBuffer *fb = nullptr;
if (restore) {
- fb = GPU_framebuffer_pop();
+ fb = gpuPopFrameBuffer();
}
if (fb) {