Open velkyel opened 7 years ago
Hmm... I'm not sure, I don't have an OSX at hand at the moment. I guess specifying --std=c++11 will help. Try adding this:
configuration { "osx" }
buildoptions
{
"-std=c++11",
}
to scripts/cmft.lua
and see if it helps.
It helps when I put this build option in cmft.lua and cmft_cli.lua too. Thank you.
FYI: I have to use --useOpenCL false otherwise it crash.
hw info:
./cmft --printCLDevices
CMFT info: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz --clVendor Apple --deviceIndex 0 --deviceType cpu
CMFT info: HD Graphics 4000 --clVendor Apple --deviceIndex 1 --deviceType gpu
lldb session and backtrace on --useOpenCL true:
(lldb) target create "./cmft"
Current executable set to './cmft' (x86_64).
(lldb) settings set -- target.run-args "--useOpenCL" "true" "--input" "../../textures/garage_environment.png" "--filter" "radiance" "--srcFaceSize" "256" "--excludeBase" "true" "--mipCount" "7" "--glossScale" "10" "--glossBias" "2" "--dstFaceSize" "256" "--generateMipChain" "false" "--outputNum" "1" "--output0" "a" "--output0params" "dds,bgra8,cubemap"
(lldb) r
Process 8343 launched: './cmft' (x86_64)
CMFT info: Converting cube cross to cubemap.
CMFT info: Resizing source image from 1024x1024 to 256x256.
CMFT info: Running radiance filter for:
[srcFaceSize=256]
[lightingModel=phong]
[excludeBase=true]
[mipCount=7]
[glossScale=10]
[glossBias=2]
[dstFaceSize=256]
CMFT info: Radiance -> Excluding base image.
CMFT info: Radiance -> Starting filter...
CMFT info: Radiance -> Utilizing 64 CPU processing threads and HD Graphics 4000.
CMFT info: Radiance -> ------------------------------------
CMFT info: Radiance -> Device / Face / Time / Total
CMFT info: Radiance -> ------------------------------------
2017-11-09 17:41:17.435656+0100 cmft[8343:101328] [CL_INVALID_EVENT] : OpenCL Error : Failed to retrieve event information! Given event is invalid!
libc++abi.dylib: terminating
Process 8343 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00007fffc2ebdd42 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
-> 0x7fffc2ebdd42 <+10>: jae 0x7fffc2ebdd4c ; <+20>
0x7fffc2ebdd44 <+12>: movq %rax, %rdi
0x7fffc2ebdd47 <+15>: jmp 0x7fffc2eb6caf ; cerror_nocancel
0x7fffc2ebdd4c <+20>: retq
Target 0: (cmft) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
* frame #0: 0x00007fffc2ebdd42 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007fffc2fab457 libsystem_pthread.dylib`pthread_kill + 90
frame #2: 0x00007fffc2e23420 libsystem_c.dylib`abort + 129
frame #3: 0x00007fffc197b94a libc++abi.dylib`abort_message + 266
frame #4: 0x00007fffc19a0b52 libc++abi.dylib`default_terminate_handler() + 46
frame #5: 0x00007fffc199dd49 libc++abi.dylib`std::__terminate(void (*)()) + 8
frame #6: 0x00007fffc199ddd0 libc++abi.dylib`std::terminate() + 64
frame #7: 0x0000000100008aa7 cmft`cmft::imageRadianceFilter(cmft::Image&, unsigned int, cmft::LightingModel::Enum, bool, unsigned char, unsigned char, unsigned char, cmft::Image const&, cmft::EdgeFixup::Enum, unsigned char, cmft::ClContext*, cmft::AllocatorI*) [inlined] std::__1::thread::operator=(this=0x00007fff5fbe6d90, __t=0x00007fff5fbe4c20) at thread:413
frame #8: 0x0000000100008a91 cmft`cmft::imageRadianceFilter(_dst=0x00007fff5fbe6e10, _dstFaceSize=256, _lightingModel=Phong, _excludeBase=true, _mipCount='\a', _glossScale='\n', _glossBias='\x02', _src=0x00007fff5fbe7090, _edgeFixup=None, _numCpuProcessingThreads='?', _clContext=0x0000000100056e88, _allocator=0x000000010004b638) at cubemapfilter.cpp:2156
frame #9: 0x0000000100009ee8 cmft`cmft::imageRadianceFilter(_image=0x00007fff5fbe7090, _dstFaceSize=256, _lightingModel=Phong, _excludeBase=true, _mipCount='\a', _glossScale='\n', _glossBias='\x02', _edgeFixup=None, _numCpuProcessingThreads='?', _clContext=0x0000000100056e88, _allocator=0x000000010004b638) at cubemapfilter.cpp:2265
frame #10: 0x000000010003e402 cmft`cmftMain(_argc=27, _argv=0x00007fff5fbff988) at cmft_cli.h:1020
frame #11: 0x000000010003e9c2 cmft`main(_argc=27, _argv=0x00007fff5fbff988) at main.cpp:22
frame #12: 0x00007fffc2d8f235 libdyld.dylib`start + 1
frame #13: 0x00007fffc2d8f235 libdyld.dylib`start + 1
(lldb)
g++ --version
Do I need brew gnu g++?