Commit Graph

6410 Commits

Author SHA1 Message Date
Gregory Hainaut 0aac47ca59 gsdx-queue: add a new option "spin_thread" to select the queue behavior at runtime
If someone has a more elegant solution, feel free to share it

spin_thread = 0
spin_thread = 1 // the faster but GS thread will never stop, very bad for laptop
2015-04-17 19:03:21 +02:00
Gregory Hainaut 9682061472 gsdx-queue:add a new job dispatcher queue based on boost and C++11
It is faster on linux, it requires less code, and it is "portable"

It requires boost (only hpp files) + MSVC 2013 (for atomic) (seem doable by 2012 too)

Actually there are several queues that either use spinlock or full sleep
2015-04-17 19:03:21 +02:00
Gregory Hainaut a75d78bd7e gsdx: use standard lock_guard instead of GSAutoLock 2015-04-17 19:03:21 +02:00
Gregory Hainaut 9ad5933120 gsdx: Use composition insead of inheritance to support lock
To ease update to C++11
2015-04-17 19:03:21 +02:00
Gregory Hainaut 8deee6afbc gsdx: include some C++11 define for later 2015-04-17 19:03:21 +02:00
Gregory Hainaut 9ce7f515bc cdvdiso: add stdcall convention 2015-04-17 18:34:05 +02:00
Gregory Hainaut 1cb047687f common: use stdcall convention too
(Likely used by others null plugins)
2015-04-17 18:33:26 +02:00
Gregory Hainaut 5c8ea74cb9 null plugins: add stdcall convention 2015-04-17 18:33:10 +02:00
Gregory Hainaut 75a3abc225 lilypad: add stdcall convention 2015-04-17 18:32:39 +02:00
Gregory Hainaut 8e3dab7e11 zzogl: add stdcall convention 2015-04-17 18:32:10 +02:00
Gregory Hainaut e16cb9a00e onepad: add stdcall convention 2015-04-17 18:31:44 +02:00
Gregory Hainaut c456764342 spu2x: declare exported function as stdcall
* Fix a stack buffer overflow on address sanitizer
* Might explain an old clang crash
2015-04-17 18:24:23 +02:00
Gregory Hainaut 545c1d387c gsdx: add an include for MSVC 2015-04-16 22:28:09 +02:00
Gregory Hainaut aff999cf69 gsdx linux: refresh the gui
* Use tooltip for hack
* Update string of previous hack
* Remove unused hack

Note: hack_sprite_check requires 3 states (and potentially others hack too) but
I don't know how to do it. It likely requires a "scale button"
2015-04-16 19:28:55 +02:00
Gregory Hainaut 85cbe285f0 gsdx dialog: move hack info into a separate file
This way it can be reused on linux.
2015-04-16 19:26:33 +02:00
Gregory Hainaut 670bcc1818 gsdx hack: use a dumb implementation for UserHacks_round_sprite_offset = 2
It works as bad as a "clever" implementation.

It seems to be enough for games such as venus/taisho-monoke/FFX

Note: it might creates glitches. Code will never be nice, so it is just
a trade-off
2015-04-16 19:26:33 +02:00
Gregory Hainaut 41e5be0673 gsdx hack: limit range of UserHacks_align_sprite_X
Just an extra check to avoid an overlap (avoid white line in tekken)
2015-04-16 19:26:33 +02:00
Avi Halachmi (:avih) 2c3b3eafbe first time wizard "overwrite": obey default console sources
this is actually not a FTW issue but rather a console sources issue.

the console log sources are not c++ classes and therefore don't get initialized
other than when [attempting to] loading them from the ini file (where if the ini
doesn't exist then they get their default values). however, during first time
wizard, when choosing "overwrite", the console sources are saved without ever
getting loaded and so end up without the default values applied (so all sources
as disabled).

this patch makes sure that if we're saving the conlog sources before ever
attempting to load them, they'll get saved with the correct default values.
2015-04-16 13:19:03 +03:00
avih ce8626150e Merge pull request #505 from unknownbrackets/cso
Small optimization to CSO support, add notes
2015-04-15 22:26:17 +03:00
Unknown W. Brackets 7b1214849a Add disabled code to use a cache for cso reading.
It doesn't seem like the cache is worth it, unfortunately.
2015-04-15 10:27:59 -07:00
Unknown W. Brackets 427fa039ba Note why multiple blocks aren't optimized in CSO. 2015-04-15 09:47:20 -07:00
Unknown W. Brackets 49cfc3424b Keep around z_stream between decompression passes.
Slightly more efficient to avoid reallocating the state for each block.
2015-04-15 09:03:00 -07:00
avih 080459e7f4 Merge pull request #504 from unknownbrackets/cso
Add support for loading CSO-compressed ISOs
2015-04-15 18:44:00 +03:00
Unknown W. Brackets 17a58103e2 Move shared file access to compressed utils. 2015-04-15 08:30:19 -07:00
Unknown W. Brackets 8e89418f45 Prefix some defines in GzippedFileReader. 2015-04-15 08:25:32 -07:00
Gregory Hainaut e8698a9c0c gsdx hack: hole in vertex position also appears in !FST projection
Fix various black vertical line regression with UserHacks_align_sprite_X
2015-04-15 09:40:06 +02:00
Gregory Hainaut 65a84b9f64 gsdx hack: drop previous filtering hack
superseeded by UserHacks_round_sprite_offset
2015-04-15 09:26:01 +02:00
Unknown W. Brackets 5bfd4c7bf8 Refactor ISO creation to avoid duplicate code. 2015-04-14 19:24:22 -07:00
Unknown W. Brackets 334f648eaa Separate compressed file types into separate files.
Cleaner this way.
2015-04-14 19:24:21 -07:00
Unknown W. Brackets 4ffbd3765b Add a link to a description of the CSO format. 2015-04-14 17:46:44 -07:00
Unknown W. Brackets 8edffd32c8 Add support for loading CSO-compressed ISOs. 2015-04-14 10:14:06 -07:00
Gregory Hainaut 2da4a5e6bc gsdx hack: use a 0 offset instead of -1
-1 is annoying because minimum value is 0. Instead to add more logic,
let's try to use 0 which seems to be good enough (fix regressions on DQ8/AT)

Unfortunately it causes a mini regression on taisho-mononoke. Rotation of sprite is done with 2 triangles.
Potentially previous value wrongly recover this section.
2015-04-14 18:39:26 +02:00
Gregory Hainaut cde72300a5 gsdx hack: Correct formulae for reversed texture
It fixes issues on Ace Combat UI
2015-04-13 22:14:36 +02:00
Gregory Hainaut 418f2e69a8 gsdx-ogl: implement the wildhack on the GPU
Likely much faster for opengl and much easier to implement

Note: hopefully UserHacks_round_sprite_offset will replace it
2015-04-13 22:14:36 +02:00
Gregory Hainaut 50bac01d89 gsdx hack: disable upscaling hack at native resolution 2015-04-13 22:14:36 +02:00
Gregory Hainaut 815c99b6e4 gsdx-hack: remove an extra offset + duplicate linear computing
Initially code aligned texture on pixel boundary + 1/16th. It seems to work without it.
2015-04-13 22:14:36 +02:00
Gregory Hainaut 399ddbd74a gsdx hack: reduce complexity of alpha* function
It will help the compiler to make a couple of optimizations (and it will help
a futur porting to GSVector)
2015-04-13 22:14:36 +02:00
Gregory Hainaut 1d0deb5ffe gsdx hack: move round sprite offset into a separate function
Use a boolean template to separate the linear case. I'm afraid it will
cost extra computation but 90% of sprites use nearest.
2015-04-13 22:14:36 +02:00
avih 46aecb3748 Merge pull request #503 from karasuhebi/master
Added a comment to PCSX2_keys.ini.default about F11
2015-04-13 22:06:31 +03:00
Karasuhebi 5c263ff84c Removed comment symbol for Sys_FreezeGS = F11 2015-04-13 13:28:44 -04:00
Karasuhebi e397fe105e Added a comment to PCSX2_keys.ini.default about F11
Added a comment to PCSX2_keys.ini.default about FreezeGS being
deprecated as to avoid user confusion when pressing F11 and nothing
happens.
2015-04-13 13:17:27 -04:00
Gregory Hainaut 1aebca3740 gsdx hack: m_userhacks_round_sprite_offset take precedence over m_userhacks_stretch_sprite
m_userhacks_stretch_sprite is only kept for debugging. Let's avoid bad mixing by users
2015-04-12 11:05:23 +02:00
Gregory Hainaut c4fef0256e gsdx hack: Better rounding fix letter in ace combat and line in tekken
Tekken is broken with setting UserHacks_round_sprite_offset = 2 use 1 instead.
=> game use upscaling internaly so my rounding of coordinate break everything

Yakuza uses float coordinate but this hack only correct the integer coordinate
=> the solution will be to add a dedicated hack for this game.

Colin3 got a regression but I don't know when...
2015-04-12 10:31:04 +02:00
Gregory Hainaut 06ee41957e Merge pull request #478 from PCSX2/linux-mtvu-crash-after-shutdown
MTVU: fix linux crash after a shutdown
2015-04-11 13:15:34 +02:00
Gregory Hainaut 781c1df5d0 Merge pull request #486 from PCSX2/c++11-vssappendf
C++11 vssappendf
2015-04-11 13:15:25 +02:00
Gregory Hainaut 7e89247bf4 gsdx hack: don't add extra correct for zero length texture
Otherwise t1-t0 is 16 instead of 0
2015-04-11 10:54:30 +02:00
Gregory Hainaut d2156c86eb gsdx: improve previous hack for bilinear sprite
PS2 uses a -0.5 offset before sampling so texels must be rounded to half-pixel boundary

If fixes glitches on Venus and taisho-mononoke

Note: I didn't fixed yet texture render in reverse because I don't have any test for it.
2015-04-10 09:42:39 +02:00
Gregory Hainaut f5eeb2024e gsdx: anti-glitches v3: Tester wanted
UserHacks_round_sprite_offset = 1 <= enable correction of flat sprites
UserHacks_round_sprite_offset = 2 <= enable correction of all sprites (better on a couple of dump but not sure of the consequence)

I completely redo the algorithm. This time I do the projection and
interpolation of the 2 extrem vertex. This way I can compute the min/max
valid texture coordinate.

It gives stronger guarantee that texture sampling will be done inside the texture.

However it might have a performance impact, likely reasonable because it
is limited to sprite vertex.

A big thanks you to all people that provide me GS dump and test reports.
2015-04-09 19:51:50 +02:00
Gregory Hainaut 05eb1641f2 gsdx: add glsl debug capabilities
Useful to debug bad texture sampling
2015-04-08 10:15:25 +02:00
Gregory Hainaut 98d8ad7484 gsdx: new anti-glitches upscaling hack: UserHacks_round_sprite_offset
It is replacement of the previous hack (UserHacks_stretch_sprite). Don't enable both in the same time!

The idea of the hack is to move the sprite to the pixel boundary. It
avoids most of rounding issue. It also rescales verticaly the sprite (avoid horizontal line on ace combat).
I don't like this rescaling maybe we can limit it to only 1 pixels.

On my limited testcase, results are much better with any upscaling factor.

I still have a bad line in Kingdom heart. If you have issue with others
game please provide us a GS dump.
2015-04-07 19:18:24 +02:00