Hi,
On 04/28/11 12:28, Brecht Van Lommel wrote:
> Actually, anything on this list is open to be implemented by others.
> >From the point of view of the core engine, if implemented well they
> can fit in right away. I guess the first ones go from a couple of days
> to a week, once you are familiar with the code, the big features can
> take from a week to multiple months. It's quite hard to say, but if
> someone is interested, they can of course contact me, and I can give
> some pointers on how to go about implementing things.
>
> For me personally, integration, stability, performance, will likely
> take up most of the time for now.
How should we report build problems found? Here on the list?
If so, on a Gentoo 32-bit Linux system with GCC 4.4.5 I get:
[ 95%] Building CXX object
intern/cycles/util/CMakeFiles/cycles_util.dir/util_system.cpp.o
/home/melis/c/blender-cycles-svn/intern/cycles/util/util_system.cpp: In
function 'std::string ccl::system_cpu_brand_string()':
/home/melis/c/blender-cycles-svn/intern/cycles/util/util_system.cpp:63:
error: can't find a register in class 'BREG' while reloading 'asm'
/home/melis/c/blender-cycles-svn/intern/cycles/util/util_system.cpp:63:
error: can't find a register in class 'BREG' while reloading 'asm'
/home/melis/c/blender-cycles-svn/intern/cycles/util/util_system.cpp:63:
error: can't find a register in class 'BREG' while reloading 'asm'
/home/melis/c/blender-cycles-svn/intern/cycles/util/util_system.cpp:63:
error: can't find a register in class 'BREG' while reloading 'asm'
/home/melis/c/blender-cycles-svn/intern/cycles/util/util_system.cpp:63:
error: 'asm' operand has impossible constraints
/home/melis/c/blender-cycles-svn/intern/cycles/util/util_system.cpp:63:
error: 'asm' operand has impossible constraints
/home/melis/c/blender-cycles-svn/intern/cycles/util/util_system.cpp:63:
error: 'asm' operand has impossible constraints
/home/melis/c/blender-cycles-svn/intern/cycles/util/util_system.cpp:63:
error: 'asm' operand has impossible constraints
make[2]: ***
[intern/cycles/util/CMakeFiles/cycles_util.dir/util_system.cpp.o] Error 1
make[1]: *** [intern/cycles/util/CMakeFiles/cycles_util.dir/all] Error 2
make: *** [all] Error 2
Attached a patch (untested, but it compiles) based on the stuff in
http://newbiz.github.com/cpp/2010/12/20/Playing-with-cpuid.html.
Regards,
Paul
Index: intern/cycles/util/util_system.cpp
===================================================================
--- intern/cycles/util/util_system.cpp (revision 36380)
+++ intern/cycles/util/util_system.cpp (working copy)
@@ -45,7 +45,7 @@
#elif defined(__APPLE__)
size_t len = sizeof(count);
int mib[2] = { CTL_HW, HW_NCPU };
-
+
sysctl(mib, 2, &count, &len, NULL, 0);
#else
count = (uint)sysconf(_SC_NPROCESSORS_ONLN);
@@ -60,7 +60,24 @@
#ifndef _WIN32
static void __cpuid(int data[4], int selector)
{
- asm("cpuid" : "=a" (data[0]), "=b" (data[1]), "=c" (data[2]), "=d"
(data[3]) : "a"(selector));
+ uint32_t eax; // output: eax
+ uint32_t ebx; // output: ebx
+ uint32_t ecx; // output: ecx
+ uint32_t edx; // output: edx
+
+ asm(
+ "pushl %%ebx\n\t"
+ "cpuid \n\t"
+ "movl %%ebx, %1\n\t"
+ "popl %%ebx\n\t"
+ : "=a" (eax), "=r" (ebx), "=c" (ecx), "=d" (edx)
+ : "a"(selector)
+ : "cc");
+
+ data[0] = eax;
+ data[1] = ebx;
+ data[2] = ecx;
+ data[3] = edx;
}
#endif
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers