diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-30 17:20:39 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-30 17:20:39 +0300 |
commit | 2bd9a28ff8d7a7bcb5481b8f9e029959b8b055e8 (patch) | |
tree | 769b76c96d80d987e16f80bb307fa4cf87b3a5bb /source/blender/gpu | |
parent | a711aa5b3c715da29546d860f4fde24c27e34593 (diff) |
Cleanup: Rename `#if GPU_USE_PY_REFERENCES` to `#ifndef GPU_NO_USE_PY_REFERENCES`
This is safer for incremental build.
And there was already a macro `GPU_USE_PY_REFERENCES` used elsewhere.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_common.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/GPU_framebuffer.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.cc | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer_private.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.cc | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_texture_private.hh | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/gpu/GPU_common.h b/source/blender/gpu/GPU_common.h index bc57a381f00..c00bf581e8c 100644 --- a/source/blender/gpu/GPU_common.h +++ b/source/blender/gpu/GPU_common.h @@ -24,7 +24,7 @@ #pragma once #define PROGRAM_NO_OPTI 0 -#define USE_PY_REFERENCES 1 +//#define GPU_NO_USE_PY_REFERENCES #if defined(NDEBUG) # define TRUST_NO_ONE 0 diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h index ccab80c5702..6482d9a9d3e 100644 --- a/source/blender/gpu/GPU_framebuffer.h +++ b/source/blender/gpu/GPU_framebuffer.h @@ -209,7 +209,7 @@ void GPU_framebuffer_recursive_downsample(GPUFrameBuffer *fb, void (*callback)(void *userData, int level), void *userData); -#if USE_PY_REFERENCES +#ifndef GPU_NO_USE_PY_REFERENCES void **GPU_framebuffer_py_reference_get(GPUFrameBuffer *gpu_fb); void GPU_framebuffer_py_reference_set(GPUFrameBuffer *gpu_fb, void **py_ref); #endif diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index 21d3070e252..f980c8fdcd7 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -270,7 +270,7 @@ bool GPU_texture_depth(const GPUTexture *tex); bool GPU_texture_stencil(const GPUTexture *tex); bool GPU_texture_integer(const GPUTexture *tex); -#if USE_PY_REFERENCES +#ifndef GPU_NO_USE_PY_REFERENCES void **GPU_texture_py_reference_get(GPUTexture *tex); void GPU_texture_py_reference_set(GPUTexture *tex, void **py_ref); #endif diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc index 487835a9d35..1293cc0953d 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.cc +++ b/source/blender/gpu/intern/gpu_framebuffer.cc @@ -72,7 +72,7 @@ FrameBuffer::~FrameBuffer() } } -#if USE_PY_REFERENCES +#ifndef GPU_NO_USE_PY_REFERENCES if (this->py_ref) { *this->py_ref = nullptr; } @@ -479,7 +479,7 @@ void GPU_framebuffer_recursive_downsample(GPUFrameBuffer *gpu_fb, unwrap(gpu_fb)->recursive_downsample(max_lvl, callback, userData); } -#if USE_PY_REFERENCES +#ifndef GPU_NO_USE_PY_REFERENCES void **GPU_framebuffer_py_reference_get(GPUFrameBuffer *gpu_fb) { return unwrap(gpu_fb)->py_ref; diff --git a/source/blender/gpu/intern/gpu_framebuffer_private.hh b/source/blender/gpu/intern/gpu_framebuffer_private.hh index d6a30677840..ab4e22ebb80 100644 --- a/source/blender/gpu/intern/gpu_framebuffer_private.hh +++ b/source/blender/gpu/intern/gpu_framebuffer_private.hh @@ -100,7 +100,7 @@ class FrameBuffer { bool scissor_test_ = false; bool dirty_state_ = true; -#if USE_PY_REFERENCES +#ifndef GPU_NO_USE_PY_REFERENCES public: /** * Reference of a pointer that needs to be cleaned when deallocating the frame-buffer. diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc index b0b0fb970d7..997064e82a2 100644 --- a/source/blender/gpu/intern/gpu_texture.cc +++ b/source/blender/gpu/intern/gpu_texture.cc @@ -61,7 +61,7 @@ Texture::~Texture() } } -#if USE_PY_REFERENCES +#ifndef GPU_NO_USE_PY_REFERENCES if (this->py_ref) { *this->py_ref = nullptr; } @@ -587,7 +587,7 @@ bool GPU_texture_array(const GPUTexture *tex) return (reinterpret_cast<const Texture *>(tex)->type_get() & GPU_TEXTURE_ARRAY) != 0; } -#if USE_PY_REFERENCES +#ifndef GPU_NO_USE_PY_REFERENCES void **GPU_texture_py_reference_get(GPUTexture *tex) { return unwrap(tex)->py_ref; diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh index 9f185e03493..a8f2e482bdd 100644 --- a/source/blender/gpu/intern/gpu_texture_private.hh +++ b/source/blender/gpu/intern/gpu_texture_private.hh @@ -80,7 +80,7 @@ class Texture { int refcount = 1; /** Width & Height (of source data), optional. */ int src_w = 0, src_h = 0; -#if USE_PY_REFERENCES +#ifndef GPU_NO_USE_PY_REFERENCES /** * Reference of a pointer that needs to be cleaned when deallocating the texture. * Points to #BPyGPUTexture.tex |