Commit Graph

57 Commits

Author SHA1 Message Date
Shawn Hoffman 76b4318b88 CPUDetect: improve win/arm64 support
read brand_string on macos/arm64
remove unused flags
report family/model info instead of vendor name
2022-07-25 21:21:11 -07:00
Pokechu22 46bcdc4372 Rename CP and XF normal component count enums and update their descriptions 2022-05-18 14:43:14 -07:00
Pokechu22 2a5c77f43f VideoCommon: Handle emboss texgen with only a single normal
Fixes a large number of effects in Rogue Squadron 2 and 3.
2022-04-22 16:54:38 -07:00
Pokechu22 39b2854b98 VertexLoader: Convert count register to remaining register
This more accurately represents what's going on, and also ends at 0 instead of 1, making some indexing operations easier.  This also changes it so that position_matrix_index_cache actually starts from index 0 instead of index 1.
2022-04-22 16:54:38 -07:00
Pokechu22 97d0ff58c8 Convert vertex loader position cache to std::array 2022-04-22 16:54:38 -07:00
Pokechu22 f722bdf7f1 VertexLoaderX64: Refactor so that zfreeze is only in one place
(Specifically, the copy for VertexLoaderManager::position_cache.  The position matrix index happens elsewhere, and the float path still has special logic to copy to scratch3.)
2022-04-22 16:54:38 -07:00
Merry be81fe86e1 JitRegister: Use fmt
Prefer fmt to printf-style formatting.
2022-02-16 20:09:38 +00:00
Pokechu22 27cb704466 Eliminate VarType for ComponentFormat 2021-12-18 15:21:48 -08:00
Pokechu22 1914087998 Create and use CPArray enum class 2021-12-18 12:51:56 -08:00
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
Pokechu22 0a906f553f Move vertex size and component calculation to VertexLoaderBase 2021-05-07 15:42:17 -07:00
Pokechu22 fa7077763f Remove VertexLoaderBase::IsInitialized
It is no longer relevant for the current set of loaders after 7030542546.  If it becomes relevant again, a static function named IsUsable or IsCompatibleWithCurrentMachine or something would be a better approach.
2021-05-07 15:42:17 -07:00
Pokechu22 cafffff75e Eliminate TVtxAttr 2021-05-07 15:42:17 -07:00
Pokechu22 b6149623aa Remove VertexLoader::ToString 2021-05-07 15:42:13 -07:00
Pokechu22 51de3d0fd1 Refactor CP array constants slightly 2021-03-26 17:27:21 -07:00
Pokechu22 f749fcfa9f Convert CPMemory to BitField and enum class
Additionally, VCacheEnhance has been added to UVAT_group1.  According to YAGCD, this field is always 1.

TVtxDesc also now has separate low and high fields whose hex values correspond with the proper registers, instead of having one 33-bit value.  This change was made in a way that should be backwards-compatible.
2021-03-06 19:27:08 -08:00
Techjar 3a3dc28d54 VertexLoaderX64: Don't use PDEP on AMD Zen 2020-01-26 22:12:00 -05:00
JosJuice 4b4cf509f8 Remove code for only allocating low memory
This is unnecessary when we have position-independent code.
2017-05-20 09:35:53 +02:00
Lioncash 9859533ab4 VertexLoaderBase: Return debug strings by value
An out parameter for this sort of thing is a C++03 hold-over. This also
renames AppendToString to ToString.
2017-03-26 23:49:59 -04:00
degasus 5082a664c8 VertexLoaderX64: Avoid unchecked pointer cast. 2016-12-04 13:09:16 +01:00
degasus 258f48572d VertexLoaderJit: Fix out-of-bounds access for zfreeze.
This fixes a GCC6.1 warning.
2016-09-17 16:47:12 +02:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Lioncash d9fec92628 VideoCommon: Header cleanup
Also remedies places where the video backends and core rely on things
being indirectly included.
2016-01-17 20:11:45 -05:00
Tillmann Karras b0d5b4483e VertexLoaderX64: optimize more color swizzles
Based on https://gist.github.com/rygorous/c5dba8c6c75bc83aa4ae, but with
a small tweak and a somewhat related change for the 565 case.
2015-10-25 14:51:07 +01:00
Tillmann Karras d80124ab59 VertexLoaderX64: optimize 4444 color conversion
https://gist.github.com/rygorous/75133a50c60f9243366e
2015-10-22 16:30:56 +02:00
Rohit Nirmal 3b75f45cf6 Fix building with PCH disabled. 2015-09-28 11:51:08 -05:00
Tillmann Karras 63c9fdd074 VertexLoaderX64: fix 2GB warnings
Unlike the CPU JIT, the vertex loader JIT already emits
position-independent code, so all we need to do is disable the warning.
2015-09-12 01:24:47 +02:00
Tillmann Karras ee4a12ffe2 Jit64: some byte-swapping changes 2015-08-26 05:41:18 +02:00
Tillmann Karras 5ddd2cef6c zfreeze: cache vertex positions
Suggested by degasus.
2015-06-07 12:13:00 +02:00
Tillmann Karras 9e2f4dd7da VertexLoaderX64: revert 9da86092ae
I can't reproduce that it's actually faster and it will definitely be
slower with position caching for zfreeze.
2015-06-07 12:13:00 +02:00
Tillmann Karras 7a6a5e2791 VertexLoaderX64: generate PIC
Address static memory relative to a base register, analog to what we're
doing with PPCSTATE in the CPU JIT. This allows executable memory for
the vertex loader JIT to be allocated anywhere, not just within 2 GiB of
static data.

Fixes issue 8180.
2015-06-03 02:27:37 +02:00
Scott Mansell f57517f1a0 Clean up cached_arraybases. Update VideoSW to new scheme.
Move ownership of cached_arraybases from CPMemory to VertexLoaderManager
to better match it usage.
2015-05-30 04:09:27 +12:00
Ryan Houdek 69963dc4b0 Merge pull request #2274 from degasus/disable_bbox
Disable bbox
2015-05-25 08:46:12 -04:00
Tillmann Karras 268f52e054 Add missing license headers 2015-05-25 13:11:47 +02:00
degasus 6b2a1e57e2 BBox: remove now unreachable SW bbox implementation 2015-05-25 09:33:34 +02:00
comex 74c30d1784 Fix code broken by merge 2015-04-23 02:07:45 -04:00
comex ad95454d04 Merge pull request #2223 from phire/imm
Cleanup OpArg, make immediates more explicit.
2015-04-23 01:53:18 -04:00
Tillmann Karras 9da86092ae VertexLoaderX64: use common code for FORMAT_FLOAT 2015-03-18 12:12:21 +01:00
Tillmann Karras 7030542546 VertexLoaderX64: support SSE2 as a fallback
With suggestions by Fiora and magumagu.
2015-03-18 12:12:21 +01:00
Tillmann Karras 8d90ecda7f VertexLoaders: make positions more compact 2015-03-18 12:09:06 +01:00
Scott Mansell 858ff69c01 Make OpArg.offset and operandReg private.
Also cleaned up WriteRest function.
2015-03-17 18:49:30 +13:00
Tillmann Karras 3987725217 VertexLoaderX64: fix harmless off-by-one error 2015-03-08 04:43:59 +01:00
Stevoisiak 93b16a4a2d Formatting/Whitespace Cleanup
Various fixes to formatting and whitespace
2015-02-25 10:48:21 -05:00
Tillmann Karras f298f00e1b Clean up the intrinsics #ifdef mess 2015-02-24 01:02:36 +01: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
Gabriel Corona a4adfe194a JitRegister: overload Register with a [start,end) variant 2015-01-28 09:50:19 +01:00
Tillmann Karras 3dbd6cd384 VertexLoaderX64: save XMM0 if the ABI requires it 2015-01-26 22:24:06 +01:00
Tillmann Karras 1dcf49237b VertexLoaderX64: support VAT.ByteDequant=0 2015-01-20 09:23:15 +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 d3f49097c5 VertexLoaderX64: register symbol for code page 2015-01-18 23:20:44 +01:00