-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Expanded vec128 and VectorSub #574
Conversation
Added double precision (f64) values to the vec128 structure Added cases for all formats of data for vector subtraction in the Value::VectorSub function NOTE: Unsure what the saturate function is for however maintained original functionality
I reckon ben will ask you to run |
Neat - this is cool. Like @Razzile said, just format your code according to this guide and we'll pull it! |
assert_true(this->type == VEC128_TYPE && other->type == VEC128_TYPE); | ||
switch (type) { | ||
case FLOAT32_TYPE: | ||
if (saturate) assert_always(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surround if statements in curly brackets please. Ditto for everything below.
This only fixes the wonky physics in sonic games, however the death issues and inverted model glitches are still apparent. Likely caused by #514. I think that commit was responsible for invisible level in sonic unleashed demo, and model depth issues in TLoS:DotD and various other games. |
I've actually got some uncommitted code locally that implements just about everything that was unimplemented here. |
*Insert flattery statement, because your amazing! |
I've updated the code with Google formatting, for some reason PS. I'm going to write all of the SSE and AVX acceleration for this shortly, @DrChat should I wait until you've put up your latest file? |
* Copyright 2013 Ben Vanik. All rights reserved. * | ||
* Released under the BSD license - see LICENSE in the root for more details. * | ||
****************************************************************************** | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The space needs to come back - just undo this change.
To be honest I'd recommend not writing any AVX/SSE/etc acceleration for this code - it already runs fast enough. Also - If you already know how, could you squash the 2 formatting commits back to one? |
@@ -90,7 +90,8 @@ typedef struct alignas(16) vec128_s { | |||
uint32_t uz; | |||
uint32_t uw; | |||
}; | |||
float f32[4]; | |||
float f32[4]; | |||
double f64[2]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format this too please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the formatting for this file was okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be spaces instead of tabs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Also squashed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the SSE and AVX stuff. I noticed Halo Reach and Halo 3 use this code a lot and when I debugged it appeared to be positional co-ordinates, thats why I was eager to smash out some faster code for it
@ScorchEmber256 The code was originally written against missing Halo 3 and Halo Reach functionality with the processing of entity positions, I can only assume by the code that I have written that I've just added missing functionality I'm not entirely sure how it would affect other games. |
Added formatting to code
@HaydnTrigg This code's part of the recompiler - this is ran once during compilation to propagate constants through the generated code. The speed on this code has no bearing on the speed of the generated code. |
Merged in 7fe4ffc. |
Added double precision (f64) values to the vec128 structure
Added cases for all formats of data for vector subtraction in the
Value::VectorSub function
NOTE: Unsure what the saturate function is for however maintained
original functionality