Commit Graph

40 Commits

Author SHA1 Message Date
Gregory Hainaut fc98fc9781 gsdx: only enable "please fix me" message on debug build 2016-01-02 18:53:15 +01:00
Gregory Hainaut 3784ea768f gsdx: check null pointer when doing a texture clear 2015-08-04 19:26:17 +02:00
Gregory Hainaut 831c24de51 gsdx-dx: only enable new code when CRC is below FULL level
Code is not ready. It allow to test the new code without a massive
regression
2015-07-01 09:36:54 +02:00
Gregory Hainaut 3b127f663b gsdx-tc: trace the texture format to detect texture shuffling
It fixes games that uses 16 bits RT (like snow engine games)
2015-07-01 09:36:53 +02:00
Gregory Hainaut 05c72980fc gsdx: avoid to detect PSMT8H as 16 bits 2015-07-01 09:30:20 +02:00
refractionpcsx2 955fc3aa35 GSdx-DX: Mirror round value change from OGL 2015-07-01 09:30:20 +02:00
refractionpcsx2 4bc8bfc23e GSdx-DX: Rough port of texture switching from OGL 2015-07-01 09:30:20 +02:00
Gregory Hainaut 35081f922a gsdx: GS kinds of support draw without framebuffer
Gow uses 24 bits buffer, so only color is updated but blending is configured as Cd
so it is a NOP

In this case, we don't lookup the target in the texture cache. It reduces the complexity
to handle depth which can be located at same address as RT

Note: please test DX renderer
2015-07-01 09:30:20 +02:00
Gregory Hainaut d870188d21 gsdx: sed/o/off/ 2015-05-15 20:40:09 +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
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
Gregory Hainaut 5269e54f02 gsdx: tune previous hack
Only disable bilinear on the sprite that were forced by the user.
If the PS2 requires a bilinear filtering, there is likely a big enough texture
2015-04-03 20:09:02 +02:00
Gregory Hainaut e1a5736583 gsdx: anti-upscale-glitch hack UserHacks_SkipDraw
2x upscaling is pixel perfects. Bigger upscaling is better but not yet perfect

Feedbacks are welcomes (note it doesn't solve all upscaling issue, only wrong texture sampling)

For the history:
If you have a texture of [0;16[ texels and draws a primitive [0;16[

The formulae to sample last pixels of texture is
0.5 + (16*s-1)/(16*s) * 16
Native (s==1): 15.5 (good)
2x     (s==2): 16 (bad, outside of the texture)
4x     (s==4): 16.25 (bad, really outside of the texure))
2015-04-03 18:33:05 +02:00
gabest11@gmail.com d27b606e5c GSdx:
- changed the KH2 fix in GetTextureMinMax to my taste, should give the same results, when the used texture rect is to the left/above the clamped area, it returns [min, min+1], and [max-1, max] for right/below
- m_mem.m_clut.Read32 was returned to its original place from GetAlphaMinMax
- UserHacks_WildHack was moved up to GSState, special UV handlers are only used when this setting is active
- updated xbyak to the latest available (avx2 seems incomplete, the 256-bit promoted old instructions are missing)
- changed vtune's include path to the 2013 edition

Some other not yet commited changes from a year ago:
- WriteImageX overflow crash-fix
- moved colclamp after dithering (sw mode), it makes more sense, no visible changes noticed
- Gif_Tag::analyzeTag(), there was a conditional I didn't like, split the loop into two parts

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5649 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-06 11:36:01 +00:00
ramapcsx2 94cad4a61a GSdx: New hack from KrossX lets users configure their own texture coordinate offset via hacks dialog. This can be used to fine tune correction of upscale glitches versus the problems that come with it. I guess this is able to correct nearly all ghosting and bad text issues games can have! Thanks for this nice patch, KrossX :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5556 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-12 10:57:48 +00:00
sudonim1@gmail.com b1536a755f GSDX: Nothing is fixed, the last two revisions did not happen.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5549 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-08 15:36:54 +00:00
sudonim1@gmail.com 23cd8fd641 GSDX: Committing pointless extra work for the record before reverting. Everything is terrible.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5548 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-08 15:35:28 +00:00
gregory.hainaut e06484adb8 gsdx: update the copyrigh address thank to sed
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5412 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-09-09 18:16:11 +00:00
sudonim1@gmail.com 5f28d08286 GSDX: New interpretation of destination alpha testing to improve effect rendering as an optional hack. Known to make shadows in the persona games (and thus probably shin megami tensei) better, not sure what else it accomplishes without destroying other effects.
Now, a note about the actual issue.  Destination alpha tests can be used on the GS as one of the workarounds for a lack of stencils.  If you use a destination alpha test and leave alpha writing on, the GS will only write each pixel until you write an alpha value which would fail the test.  This works to a point in gsdx without further hacking, but that point is when within a single batch of primitives the same pixels are written multiple times and the destination alpha test is expected to update.  I did experimentally make a tight loop updating the stencil with a draw then drawing for one primitive at a time, but it was prohibitively slow (over 80% fps loss, you really don't want to know).

Destination alpha testing cannot be directly implemented in D3D9 or D3D10, but (probably) can in D3D11 (with a speed hit for sure, but I doubt it'll be 80%).  I'll be getting a new graphics card and looking into that.

And before some idiot says it, the answer is no.  OpenGL does not help.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5346 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-24 02:20:07 +00:00
sudonim1@gmail.com 8a20e5af90 GSDX: Quick ugly fix (major work on this function might be done soon) for a bug with colclamp I noticed. Unknown impact, might make some effects work.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5344 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-23 20:24:09 +00:00
sudonim1@gmail.com 8a8d3c67d4 GSDX: Removed the collapsing of ge/g and le/l alpha tests in the shader code and the supporting code in the C++. This was presumably intended to reduce the number of shaders needed but a) this was never actually implemented, b) a single developer will generally not mix the functionally equivalent (with a different AREF) greater/less than with greater/less than or equal to in GS techniques, c) it really wouldn't make much of a difference to performance anyway and d) it would make an experimental change I'm working with more complicated and slower.
No change in functionality expected.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5343 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-23 16:39:56 +00:00
sudonim1@gmail.com 546adf52c9 GSDx: ATI strikes again. Workaround for ATI sampler bug, the same bug I found in palette sampling earlier.
This may make gsdx slightly slower for everyone (I don't know an easy way to restrict this to affected systems), especially if using 8-bit textures.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5341 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-19 20:40:42 +00:00
sudonim1@gmail.com 80ba8ff16a GSDX: Fix splinter cell double agent (and others) regression. Texture cache hits no longer depend on TEXA ever, GPU load however is increased. The last regression I think?
So, in the end I only properly understood the old code after finding all the problems with my version.  I'm not sure whether any changes I've made are improvements any more, I'll need to review it with what I've learned in mind.  This effort might've been a big waste of time.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5329 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-27 00:57:44 +00:00
sudonim1@gmail.com f5f5074172 GSDX: Put the sprite hack back in because apparently it wasn't fixed.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5312 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 01:12:01 +00:00
sudonim1@gmail.com 0d9eca8668 88GSDX: Removed the "sprite hack" as it should be obsolete, fixed the vertex shader selector key function (the pixel shader was broken in the same way but with the "sprite hack" removed it doesn't matter now).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5310 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 00:35:42 +00:00
sudonim1@gmail.com 6bb9339223 GSDX: (New bug?) If "8 bit textures" is disabled format conversion has already happened and we need PS_FMT=0 in the shader for indexed textures.
GSDX: (Old bug) When looking up a texture in the cache, the check didn't take into account CLUT formats, nor did it skip this check when "8 bit textures" is enabled.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5292 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 17:44:24 +00:00
sudonim1@gmail.com 0bf64fdffd GSDX: fixed an oversight in my shader change gregory caught which removed alpha expansion for the direct sampling case, should probably fix the remaining bugs. Also set the texture sampler to point sampling when the shader will be performing its own bilinear filtering (effect on games unknown but should be an improvement).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5291 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 15:36:10 +00:00
sudonim1@gmail.com e8257df98d GSDX: made the paletted texture handling in the cache a bit more sensible to my eyes and implemented interpolation of palette entries for pixels in paletted textures when using the 8 bit textures option. Regressions in some games I think, such as Virtual On (which is very broken anyway), need to investigate what made them work (to some degree) before. Seems to change some performance characteristics favourably to my surprise, but I might just be bad at remembering framerates.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5287 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 03:27:16 +00:00
ramapcsx2 1595136a9d GSdx:
Another refinement to the Wild Arms hack by KrossX.
The hack now only applies to one kind of geometry (sent using  the unpacked UV handler).
This works nicer in Wild Arms as it fixes "jumpy" characters.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5124 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-08 17:18:22 +00:00
ramapcsx2 b25aec19c1 GSdx:
Adding KrossX's Wild Arms text alignment hack to the new dialog box. This hack is actually very interesting for a number of games. It should work well in cases where game designers adjusted everything pixel perfect for the GS, that usually breaks with upscaling. 
It should be generalized and renamed later.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5120 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-06 21:36:59 +00:00
ramapcsx2 d2665e9bc4 GSdx: The "enable hacks" checkbox works to toggle all hacks.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5118 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-06 20:01:27 +00:00
ramapcsx2 7e435329ca GSdx:
Committing a hack KrossX prepared (thanks) ;)
It can be used to fix bad character sprites in Gust games.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5101 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-22 19:53:59 +00:00
gabest11 5de9f84fae GSdx: quick fix for unreal tournament (and others using DATE)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5075 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-19 10:24:07 +00:00
gabest11 9ec7f14fa8 GSdx: Simplified vertex formats and the related code, everything works with the basic GSVertex until it gets uploaded to the vertex buffer.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5074 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-19 04:53:36 +00:00
gabest11 9aabcc1701 GSdx: added a shortcut in GSState::Transfer for the most frequent vertex format I found (helps quite a lot), less thread-syncing for the sw renderer, and the bios boot logo was fixed (just had to clear the memory on reset).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5072 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-18 11:47:31 +00:00
gabest11 49f3aee099 GSdx: fixing the broken things...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5047 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-06 00:17:52 +00:00
gabest11 f68f007f00 GSdx: the promised index buffer update, needed a lot of changes, expect bugs in the next dozen revisions.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5045 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-05 02:40:24 +00:00
sudonim1 4457fe40fc Removed all trailing whitespace in *.c *.cpp *.h because it irritates me.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2897 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-25 00:31:27 +00:00
sudonim1 a05e9c62be Set svn:eol-style=native on all *.c *.cpp *.h
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2894 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-24 21:37:39 +00:00
gabest11 7bb9a3cc25 GSdx: changed a lot of things, expect new bugs :P
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1439 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-06-27 03:32:33 +00:00