diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-12-17 13:37:27 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-12-17 19:05:57 +0300 |
commit | 7ac49a07c60111fe75805a5eb72824ab7d0bc777 (patch) | |
tree | 719fac8f3a2453d23d198a151e99a4e105d616e1 /source/blender/gpu | |
parent | 9bb70e59b89423070c065f6b120b563bad47113b (diff) |
Mesh Batch Cache: Port Texture paint batches to new batch request
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_batch.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index d47df08afb6..c77f0707ee5 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -197,6 +197,13 @@ void gpu_batch_exit(void); } \ } while (0) +#define GPU_BATCH_CLEAR_SAFE(batch) do { \ + if (batch != NULL) { \ + GPU_batch_clear(batch); \ + memset(batch, 0, sizeof(*(batch))); \ + } \ +} while (0) + #define GPU_BATCH_DISCARD_ARRAY_SAFE(_batch_array, _len) do { \ if (_batch_array != NULL) { \ BLI_assert(_len > 0); \ |