Navigation Menu

Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Can't run terravox on linux on AMD processor #2

Closed
noway opened this issue Feb 26, 2015 · 3 comments
Closed

Can't run terravox on linux on AMD processor #2

noway opened this issue Feb 26, 2015 · 3 comments

Comments

@noway
Copy link
Contributor

noway commented Feb 26, 2015

Didn't tested Intel processor, so can't say if this is general issue for linux or not.

On my processor, terravox gives following error:

[1] 18295 illegal hardware instruction (core dumped) ./Terravox

Here is cat /proc/cpuinfo

Also, if i'm trying to compile it with gcc, i'm getting following error:

g++ -c -pipe -msse4.1 -mssse3 -msse3 -msse2 -msse -Wno-missing-braces -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I/usr/lib/qt/mkspecs/linux-g++ -I. -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtConcurrent -isystem /usr/include/qt/QtCore -I. -I. -o terrainview_p.o terrainview_p.cpp
terrainview_p.cpp: In lambda function:
terrainview_p.cpp:485:23: error: cannot convert ‘__m128i {aka __vector(2) long long int}’ to ‘__vector(4) float’ in assignment
                 coeff = _mm_cvttps_epi32(coeff);                // i32 * 4
                       ^
terrainview_p.cpp:486:53: error: cannot convert ‘__vector(4) float’ to ‘__m128i {aka __vector(2) long long int}’ for argument ‘1’ to ‘__m128i _mm_packs_epi32(__m128i, __m128i)’
                 coeff = _mm_packs_epi32(coeff, coeff);          // i16 * 4 + pad
                                                     ^
terrainview_p.cpp:487:56: error: cannot convert ‘__vector(4) float’ to ‘__m128i {aka __vector(2) long long int}’ for argument ‘1’ to ‘__m128i _mm_unpacklo_epi16(__m128i, __m128i)’
                 coeff = _mm_unpacklo_epi16(coeff, coeff);       // i16 [c1, c1, c2, c2, c3, c3, c4, c4]
                                                        ^
terrainview_p.cpp:492:94: error: cannot convert ‘__vector(4) float’ to ‘__m128i {aka __vector(2) long long int}’ for argument ‘1’ to ‘__m128i _mm_unpacklo_epi16(__m128i, __m128i)’
                 colLo = _mm_srai_epi16(_mm_mullo_epi16(colLo, _mm_unpacklo_epi16(coeff, coeff)), 6);
                                                                                              ^
terrainview_p.cpp:494:94: error: cannot convert ‘__vector(4) float’ to ‘__m128i {aka __vector(2) long long int}’ for argument ‘1’ to ‘__m128i _mm_unpackhi_epi16(__m128i, __m128i)’
                 colHi = _mm_srai_epi16(_mm_mullo_epi16(colHi, _mm_unpackhi_epi16(coeff, coeff)), 6);
                                                                                              ^
terrainview_p.cpp: At global scope:
terrainview_p.cpp:601:49: warning: unused parameter ‘alt’ [-Wunused-parameter]
         renderLandform1([](quint32 color, float alt) { return color; });
                                                 ^
Makefile:824: recipe for target 'terrainview_p.o' failed
make: *** [terrainview_p.o] Error 1

Which is probably somehow related to that.

Is there any hope to get it working?

@yvt
Copy link
Owner

yvt commented Feb 26, 2015

Currently, Terravox requires SSE 4.1 because of _mm_floor_ps, _mm_round_ps, and _mm_extract_epi32.

@noway
Copy link
Contributor Author

noway commented Feb 27, 2015

Oups, wrong link to gist file with cpuinfo. Fixed it in post and also here it is.
Unfortunately there is only sse4a, and looks like it's not sufficient for SSE 4.1.

@noway
Copy link
Contributor Author

noway commented Mar 1, 2015

As workaround I found Intel SDE. This thing allow to emulate SSE instructions on processor without them.

Performance is not that good, but at least I was able to run it.
scrot

I just used following command:

path-to-kit/sde64 -- ./Terravox

Closing.

@noway noway closed this as completed Mar 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants