Commit Graph

190 Commits

Author SHA1 Message Date
Thomas Dinges
431619e45b Windows compile fix:
* r54117 broke Windows, __func__ not declared.
2013-01-27 15:12:52 +00:00
Campbell Barton
9d36fade8f make MEM_reallocN and MEM_recallocN behave as libc's realloc() - alloc when receiving a NULL value. 2013-01-27 11:20:50 +00:00
Sergey Sharybin
5e739ddae2 Added some code which helps troubleshooting issues caused by
non-threadsafe usage of guarded allocator.

Also added small chunk of code to check consistency of begin/end
threaded malloc.

All this additional checks are commented and wouldn't affect on
builds, however found them helpful to troubleshoot issues so
decided to commit it to SVN.
2013-01-24 08:14:05 +00:00
Sergey Sharybin
6571713ddb Ambient occlusion baker from multi-resolution mesh
This implements AO baking directly from multi-resolution mesh with much
less memory overhead than regular baker.

Uses rays distribution implementation from Morten Mikkelsen, raycast
is based on RayObject also used by Blender Internal.

Works in single-thread yet, multi-threading would be implemented later.
2012-12-18 17:46:42 +00:00
Bastien Montagne
ab2c273b12 Added GPL header to sconscripts!
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
2012-12-17 08:01:43 +00:00
Campbell Barton
60808c5ed6 disable openmp thread assert, would fail in cases where the caller was locking for its self (sculpt mode) 2012-12-13 10:37:04 +00:00
Campbell Barton
21a2660290 assert in debug builds if MEM_ alloc's are called in openmp threads.
note: the caller can do locking to prevent errors - but this isn't being done in blender yet, so this prevents accidental allocs in openmp for now.
2012-12-12 04:41:23 +00:00
Sergey Sharybin
a8905364c3 Typo fix in comment. No functional changes. 2012-11-28 09:49:26 +00:00
Campbell Barton
936f0388e8 code cleanup: some warnings and formatting for PyMethodDef's in the BGE. 2012-11-10 05:42:50 +00:00
Campbell Barton
fbe13ab84a style cleanup 2012-09-20 12:29:28 +00:00
Campbell Barton
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
Campbell Barton
9a776daca8 code cleanup: vfont's used confusing and over complicated method of storing memory for loaded fonts, not store as a temp var in the fonts. 2012-08-21 10:39:02 +00:00
Campbell Barton
b96c622015 style cleanup 2012-08-11 22:12:32 +00:00
Campbell Barton
51182bc78d add MEM_recallocN(), so bytes are ensured to be zero'd when growing. 2012-08-11 12:16:09 +00:00
Campbell Barton
7fd1bd18e5 fix crash when polling image sample outside image space.
also remove historic comment which isnt helpful.
2012-08-01 14:29:24 +00:00
Brecht Van Lommel
aac3f0eaeb Fix warnings on old apple GCC compiler due to no support for alloc_size attribute. 2012-07-31 15:05:09 +00:00
Sergey Sharybin
3337887fd1 Debug option for guarded allocation: store name of original datablock
when using MEM_dupallocN. This helps figuring out issues with non-freed
dup_alloc blocks,

Simply enable DEBUG_MEMDUPLINAME in mallocn.c file.
2012-07-24 15:17:03 +00:00
Campbell Barton
e4cfcdc3a6 header comment cleanup, explain whats the difference between confusingly named drarnode.c and node_draw.c. 2012-07-14 15:29:45 +00:00
Campbell Barton
98520ce4de use gcc attributes for BLI alloc functions 2012-07-14 12:47:49 +00:00
Bastien Montagne
4c6abb8105 Fix for error from grumpy gcc in "over-warning" mode. Must explicitely cast uintptr_t to unsigned int (othe solution would be to use PRIuPTR macro from inttypes.h, but that would probably causes some problems with windows...). 2012-07-08 15:48:47 +00:00
Campbell Barton
76629c11ae correct use of __attribute__((nonnull)) 2012-07-08 15:11:13 +00:00
Campbell Barton
b91bc4f037 use gcc attrubutes to warn on unused return values and arguments which shouldnt be NULL.
also remove IDP_AppendArray's return value which wasnt the new item in the array (which is odd/misleading), but wasnt used anywhere either.
2012-07-08 06:00:27 +00:00
Campbell Barton
1d29ee0d3b use alloc_size attribute for guarded alloc functions with gcc. 2012-07-08 03:15:37 +00:00
Campbell Barton
c8c743b609 code cleanup: compile with clang and quiet some warnings. 2012-06-28 12:32:06 +00:00
Campbell Barton
a89d551a1c committed debug memcount by accident 2012-06-27 22:27:04 +00:00
Campbell Barton
a09feb7386 option so operators can be executed with undo enabled (and redo). 2012-06-27 21:41:17 +00:00
Campbell Barton
d008807a2d style cleanup: header comments, use more doxy compat formatting 2012-06-27 17:48:39 +00:00
Brecht Van Lommel
ae797383b7 Guardedalloc/C++: delete is valid on a NULL pointer, add a check so MEM_freeN
doesn't print warning messages.
2012-06-25 11:43:12 +00:00
Campbell Barton
3c8a4c458b more guardedalloc use in C++, also make compositorMutex a static var, was allocated and never freed. 2012-06-25 10:35:24 +00:00
Campbell Barton
cc0784c1b9 optionally use guarded alloc for tiles compositor, also replace allocation functions with a macro. 2012-06-25 09:14:37 +00:00
Campbell Barton
26ca0008ee typo/style edits 2012-06-08 05:53:30 +00:00
Campbell Barton
a6f3e15d6e - remove redundant NULL checks from mallocn's local linked list functions.
- minor changes to warning cleanup.
2012-06-08 05:46:00 +00:00
Campbell Barton
857dedbc58 style cleanup 2012-05-27 00:36:50 +00:00
Campbell Barton
76599a4989 update python script memory printout to python3 and some style cleanup 2012-05-26 13:59:34 +00:00
Campbell Barton
88e646b0d4 style cleanup: our own malloc code 2012-05-26 13:36:12 +00:00
Campbell Barton
ed98de3398 code cleanup: dutch -> english (comments) 2012-05-26 13:31:57 +00:00
Campbell Barton
eb023322ef style cleanup: mmap_win32 2012-05-22 13:20:01 +00:00
Brecht Van Lommel
0c318c4a47 Fix (harmless) uninitialized memory usage in BVH binning.
Fix unneeded warnings with c++ guardedalloc, delete NULL is valid.
2012-05-04 16:38:11 +00:00
Campbell Barton
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
Antony Riakiotakis
8b476d0275 First MinGW-w64 support for cmake has been added. To test I recommend this build:
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/ray_linn/GCC-4.7.0-with-ada/mingw-w64-gcc-4.7.0-runtime-2.0.1-static-ada-20120330.7z/download

Other builds may also work but due to the constantly changing nature of the compiler this cannot be guaranteed. I often had to change compilers while building the libraries and this one is the one that did the job for most of them.

This first support is experimental and considered "advanced". To enable pass -DWITH_MINGW64 during cmake configuration. Also make sure to extract the compiler on C:/MinGW and that MinGW/bin is in your path. To build check out lib/mingw64.

Initially the support is lacking until I get every library compiled correctly. For now you should disable WITH_CYCLES(sorry, I know some people are dying to do benchmarks, but still a few libs to go), WITH_IMAGE_OPENEXR, WITH_OPENCOLLADA, WITH_LIBMV and WITH_CODEC_FFMPEG(links but hangs on startup).

Still the tools are working, the memory limit is increased and due to the experimental nature of the setup, full optimization with SSE2 is available, which makes the build quite fast. Also the compiler and especially, the linker are way faster than regular MinGW.

The wiki docs have also updated. Happy testing!
2012-04-23 20:09:59 +00:00
Campbell Barton
df29e91a69 code cleanup: header cleanup, remove commented workaround for mingw since its no longer needed. 2012-04-06 04:46:47 +00:00
Campbell Barton
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
Campbell Barton
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
Campbell Barton
2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Campbell Barton
65c74f1570 workaround for error building with clang and quiet some warnings building without libmv. 2011-12-31 03:01:18 +00:00
Campbell Barton
eb3beca8d4 replace u_int64_t with cc99's uint64_t as suggested by Nicholas Bishop. 2011-12-24 03:03:42 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Sergey Sharybin
3be50219fd Abort on guarded memory manager errors if WITH_ASSERT_ABORT is set 2011-09-26 14:21:40 +00:00
Campbell Barton
4b449aefea remove support for irix 2011-09-21 08:40:30 +00:00
Campbell Barton
83a2f02a78 cleanup endian handling
- define __BIG_ENDIAN__ or __LITTLE_ENDIAN__ with cmake & scons.
- ENDIAN_ORDER is now a define rather than a global short.
- replace checks like this with single ifdef: #if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
- remove BKE_endian.h which isn't used
2011-09-19 08:02:17 +00:00