Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add USE_CPU_INTRINSICS build option? #3001

Open
illwieckz opened this issue May 15, 2024 · 1 comment
Open

Add USE_CPU_INTRINSICS build option? #3001

illwieckz opened this issue May 15, 2024 · 1 comment
Labels
A-Build When the code doesn't compile, or worse, compiles wrong T-Question for questions on how things works on on how to proceed on an issue

Comments

@illwieckz
Copy link
Member

illwieckz commented May 15, 2024

When merging the SSE code from #1142:

I found myself in the need to test both code, but for that I had to modify the code to change the ifdef.

Using system-dependant ifdefs means we usually don't test the non-intrinsics code.

Even our CI has no configuration to compile the non-intrinsics code, assuming it always run on amd64.

So I suggest a USE_CPU_INTRINSICS CMake option that would enable related definitions, that would be used like in code to disable code specific to some CPU or CPU extension.

The purpose of this option would not be to disable all intrinsics code, for example its purpose would not be to disable intrinsics code in GLM, something we can assume is well tested by others, it would be for the purpose of testing our own code.

In fact all the non-SSE code shared with the sgame/cgame is actually tested when building and running NaCl games, but only in that condition.

I think it is good to have an explicit option to explicitely build and run the generic code.

@illwieckz illwieckz added A-Build When the code doesn't compile, or worse, compiles wrong T-Question for questions on how things works on on how to proceed on an issue labels May 15, 2024
@illwieckz
Copy link
Member Author

Also, the option would not be to disable automatically enabled compiler optimizations, and would not disable the default compiler flags (we already have USE_CPU_RECOMMENDED_FEATURES=NO for the later).

@illwieckz illwieckz changed the title Add USE_INTRINSICS build option? Add USE_CPU_INTRINSICS build option? May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build When the code doesn't compile, or worse, compiles wrong T-Question for questions on how things works on on how to proceed on an issue
Projects
None yet
Development

No branches or pull requests

1 participant