Commit Graph

86 Commits

Author SHA1 Message Date
Tillmann Karras 8d90ecda7f VertexLoaders: make positions more compact 2015-03-18 12:09:06 +01:00
Stevoisiak 93b16a4a2d Formatting/Whitespace Cleanup
Various fixes to formatting and whitespace
2015-02-25 10:48:21 -05:00
Ryan Houdek 15e41c67f8 Change RunVertices' function arguments.
This reduces some dumb state shuffling when calling the emitted vertex loaders.
2015-02-13 12:16:06 -06:00
Tillmann Karras 66f28707e7 VertexLoader: small clean up 2015-01-26 22:24:06 +01:00
Tillmann Karras 46ab5d63d6 VertexLoader: never reset alpha in 8888 colors
Fixes the opening menu of Xenoblade Chronicles.
2015-01-20 09:22:55 +01:00
Tillmann Karras 80617ec6bd VertexLoader: remove weird line 2015-01-20 01:53:52 +01:00
Tillmann Karras 873902b4a3 VertexLoader: remove non-JIT SSE code 2015-01-20 01:51:07 +01:00
Tillmann Karras 804341d4fe VertexLoader: fix position offset bug 2015-01-19 17:38:40 +01:00
Tillmann Karras e82e9f97f5 VertexLoader: add new JIT 2015-01-18 13:29:34 +01:00
Tillmann Karras 20ded4c1e5 VertexLoader: remove old JIT 2015-01-18 12:59:33 +01:00
Tillmann Karras 2cedc0034d DataReader: turn WritePointer into GetPointer 2015-01-18 12:59:33 +01:00
degasus 1efd00227d VertexLoader: Skip vertices with position index = -1 2014-12-21 14:29:44 +01:00
degasus 325e8e370e VertexLoader: Merge dummy functions 2014-12-21 14:13:04 +01:00
degasus 7c486a8c24 VertexLoader: Add a VertexLoader pointer to each function call 2014-12-21 14:13:04 +01:00
degasus 809117102e VideoCommon: split VertexLoaderBase from VertexLoader 2014-12-21 14:12:43 +01:00
degasus 6e3b2712d2 VideoCommon: Move NativeVertexFormat cache to VertexLoaderManager 2014-12-21 13:47:43 +01:00
degasus ec28a80e00 VideoLoader: remove VAT_*_FRACBITS
They are used to remove the flush amounts, but as we don't
flush anymore on vertex loader changes (only on native
vertex format right now), this optimization is now unneeded.

This will allow us to hard code the frac factors within the
vertex loaders.
2014-12-21 13:47:42 +01:00
degasus 3fc7e55cc4 VideoCommon: clean up VertexLoader 2014-12-09 18:56:27 +01:00
degasus 02cdb41d3d VideoCommon: Rename s_pCurBufferPointer 2014-12-09 18:56:27 +01:00
degasus 21970c4a2a VideoCommon: cleanup OpcodeDecoder 2014-12-09 18:56:27 +01:00
Fiora e3578683e3 Vertex loader: optimize texmtx_write_float4
Seems to be pretty high in the profile in some geometry-heavy games like The
Last Story, and the compiler-generated assembly is terrifyingly bad, so
SSE-ize it.
2014-12-03 11:17:05 -08:00
Fiora 7acd5eba17 Vertex loader: use ABI_CallFunction
Should result in faster/shorter code sequences on platforms where generated
code is close enough to the code segment (e.g. Windows).
2014-11-28 20:26:00 -08:00
Fiora 3ddf82a318 Vertex Loader: SSE implementations of more position/texcoord/normal formats
~35-45% faster NFS:HP2, possibly other vertex-bound games.
2014-11-20 02:13:19 -08:00
degasus c211450b99 OGL: implement bounding box support with ssbo
This implemention tries to be as accurate as the old SW implemention, but it will remove the dependcy of our vertexloader on videosw.
2014-11-17 21:20:32 +01:00
Lioncash 884ec2ed13 Host: Kill off Host_SysMessage
Equivalent facilities already exist.
2014-11-05 02:30:48 -05:00
comex eb7f4dac50 Convert registersInUse to BitSet. 2014-10-25 16:57:25 -04:00
crudelios d281b4d7e1 Remove setting to enable or disable Bounding Box calculation. 2014-10-15 19:02:54 +01:00
crudelios 176ea06e82 Get buildbot to compile. 2014-10-10 12:28:15 +01:00
crudelios 2d4b7e3f3f Reimplement Bounding Box calculation using the software renderer. 2014-10-10 12:27:06 +01:00
comex f0131c2e09 Mechanical changes to move most CP state to a struct rather than separate globals.
The next commit will add a separate copy of the struct and the ability
for LoadCPReg to work on it.
2014-09-28 21:23:29 -04:00
comex 90638c6806 Switch to an unordered_map as a micro-optimization. 2014-09-28 21:23:29 -04:00
comex f8452ff501 Fix threading issue with vertex loader JIT.
VertexLoader::VertexLoader was setting loop_counter, a *static*
variable, to 0.  This was nonsensical, but harmless until I started to
run it on a separate thread, where it had a chance of interfering with a
running vertex translator.

Switch to just using a register for the loop counter.
2014-09-28 21:23:28 -04:00
comex 63c62b277d Some changes to VertexLoaderManager:
- Lazily create the native vertex format (which involves GL calls) from
RunVertices rather than RefreshLoader itself, freeing the latter to be
run from the CPU thread (hopefully).

- In order to avoid useless allocations while doing so, store the native
format inside the VertexLoader rather than using a cache entry.

- Wrap the s_vertex_loader_map in a lock, for similar reasons.
2014-09-28 21:23:28 -04:00
Rohit Nirmal fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
comex c5c0b36046 Remove the inaccurately named ABI_PushAllCalleeSavedRegsAndAdjustStack (it didn't preserve FPRs!) and replace with ABI_PushRegistersAndAdjustStack.
To avoid FPRs being pushed unnecessarily, I checked the uses: DSPEmitter
doesn't use FPRs, and VertexLoader doesn't use anything but RAX, so I
specified the register list accordingly.  The regular JIT, however, does
use FPRs, and as far as I can tell, it was incorrect not to save them in
the outer routine.  Since the dispatcher loop is only exited when
pausing or stopping, this should have no noticeable performance impact.
2014-09-08 01:00:10 -04:00
comex 2dafbfb3ef Improve code and clarify parameters to ABI_Push/PopRegistersAndAdjustStack.
- Factor common work into a helper function.
- Replace confusingly named "noProlog" with "rsp_alignment".  Now that
x86 is not supported, we can just specify it explicitly as 8 for
clarity.
- Add the option to include more frame size, which I'll need later.
- Revert a change by magumagu in March which replaced MOVAPD with MOVUPD
on account of 32-bit Windows, since it's no longer supported.  True,
apparently recent processors don't execute the former any faster if the
pointer is, in fact, aligned, but there's no point using MOVUPD for
something that's guaranteed to be aligned...

(I discovered that GenFrsqrte and GenFres were incorrectly passing false
to noProlog - they were, in fact, functions without prologs, the
original meaning of the parameter - which caused the previous change to
break.  This is now fixed.)
2014-09-08 00:58:56 -04:00
Rohit Nirmal 629ceaf2b1 Split some parts of UpdateBoundingBox into multiple lines. Also,
fix issues causing failure on Lint.
2014-09-06 09:49:27 -05:00
Pierre Bourdon 494a60e41b VertexLoader: Change VtxDesc to use u64 instead of u32
This is required to make packing consistent between compilers: with u32, MSVC
would not allocate a bitfield that spans two u32s (it would leave a "hole").
2014-09-01 11:18:02 +02:00
Lioncash 4af8d9d248 VideoCommon: Clean up brace placements 2014-08-30 18:06:45 -04:00
Pierre Bourdon 16f180524c VertexLoader: do not prepare for vertices if we need to skip them 2014-08-04 20:47:02 -07:00
Pierre Bourdon 4c42b38de1 Merge pull request #428 from Sonicadvance1/x86_32-removal
Remove x86_32 support from Dolphin.
2014-08-03 21:17:28 -07:00
Ryan Houdek d9b5482840 Remove x86_32 from VertexLoader. 2014-08-03 13:44:37 -05:00
Pierre Bourdon 6f715a1fbe VertexLoader: Remove more global state dependencies (this time IndexGenerator and VertexManager) 2014-08-02 09:34:39 -07:00
Pierre Bourdon 73f9a22e2e VertexLoader: Remove global state dependency on g_nativeVertexFmt 2014-07-26 01:35:09 +02:00
Pierre Bourdon 78c3a22060 VertexLoader: take the VAT object directly for RunVertices 2014-07-24 01:51:37 +02:00
Pierre Bourdon 069801a7d1 VertexLoader: Simplify SetVAT 2014-07-24 01:25:23 +02:00
degasus 7e79806efc remove unused globals
Also change globals into statics which are only used in one file
2014-07-11 16:10:20 +02:00
degasus 22e1aa5bb4 mark all local functions as static 2014-07-11 16:07:23 +02:00
degasus bb2fc8ecbb VideoCommon: Cache native vertex formats
We are used to have a 1:1 mapping of GX vertex formats and the native (OGL + D3D) ones, but there are by far more GX ones.
This new cache maps them directly so that we don't flush on GX vertex format changes as long as the native one doesn't change.

The idea is stolen from galop1n.
2014-07-04 14:39:27 +02:00
Tillmann Karras f8280401f6 x64Emitter: J_CC: use 32 bit offset automatically 2014-06-03 23:08:58 +02:00