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

Expanded vec128 and VectorSub #574

Merged
merged 2 commits into from
Jun 5, 2016
Merged

Expanded vec128 and VectorSub #574

merged 2 commits into from
Jun 5, 2016

Conversation

HaydnTrigg
Copy link
Contributor

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

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
@Razzile
Copy link
Member

Razzile commented May 17, 2016

I reckon ben will ask you to run xb format to format the code.

@DrChat
Copy link
Member

DrChat commented May 19, 2016

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();
Copy link
Member

@DrChat DrChat May 19, 2016

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.

@ScorchEmber256
Copy link

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.

xenia spv_translator_f8d9472_may 27 2016 - legend of spyro 29_05_2016 10_49_48 am
xenia spv_translator_f8d9472_may 27 2016 - legend of spyro 29_05_2016 10_49_37 am

@DrChat
Copy link
Member

DrChat commented May 29, 2016

I've actually got some uncommitted code locally that implements just about everything that was unimplemented here.
Will get around to committing it when I'm wrapping up the Vulkan branch.

@ScorchEmber256
Copy link

*Insert flattery statement, because your amazing!

@HaydnTrigg
Copy link
Contributor Author

I've updated the code with Google formatting, for some reason xb format doesn't work for formatting any files it just throws up a fuss about a file either not being committed or once committed no changes (self defeating problem).

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. *
******************************************************************************
*/
Copy link
Member

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.

@DrChat
Copy link
Member

DrChat commented May 29, 2016

To be honest I'd recommend not writing any AVX/SSE/etc acceleration for this code - it already runs fast enough.
If you want to meddle with some x64 assembly, check out x64_backend.cc and take a stab at natively implementing any instructions that are being emulated with a function call back to C++. IIRC, there should still be a few left.

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];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format this too please

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link
Contributor Author

@HaydnTrigg HaydnTrigg May 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Also squashed.

Copy link
Contributor Author

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

@HaydnTrigg
Copy link
Contributor Author

@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
@DrChat
Copy link
Member

DrChat commented May 29, 2016

@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.
I understand your eagerness though - just keep looking for areas to improve! There's plenty of stuff that needs it.

@DrChat DrChat merged commit ff55297 into xenia-project:master Jun 5, 2016
@DrChat
Copy link
Member

DrChat commented Jun 5, 2016

Merged in 7fe4ffc.

@Margen67 Margen67 added the cpu label Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants