Commit Graph

85 Commits

Author SHA1 Message Date
lightningterror ef3802b67a GSdx-d3d: Rename Blend Selector to better match opengl code.
Use member name.
om_bsel - > m_om_bsel
2018-11-13 01:56:11 +01:00
lightningterror 41459e6a2c GSdx-d3d: Rename Depth Stencil Selector to better match opengl code.
om_dssel - > m_om_dssel

Blend selector next.
2018-11-13 01:25:15 +01:00
lightningterror 48d90a988a GSdx-d3d: Remove not yet used rt parameter in channel shuffle function. 2018-11-11 23:59:11 +01:00
lightningterror 5ef53b4587 GSdx-d3d: Partial port of the ICO HLE workaround.
We can't do a full port because channel shuffle and depth sampling need
to be ported to d3d but at the very least we can do a partial port that
skips the bad draw calls.
This way we can remove all the remaining crc hacks for ICO in GSHwHacks.
2018-10-19 07:15:06 +02:00
lightningterror 411e434baf GSdx-d3d: Move around some functions in DrawPrims to better match ogl.
IsOpaque(), EmulateChannelShuffle, dfmt check for 24bit alpha channel.
2018-10-18 07:02:45 +02:00
lightningterror eac7527b93 GSdx-d3d: 24bit no alpha channel port from OpenGL.
Commit:

419dfe0544
2018-10-09 20:25:37 +02:00
lightningterror b1ca6ba528 GSdx-d3d: Use a pretty enum for ate_second_pass. 2018-10-08 23:58:15 +02:00
lightningterror 379d9e4b88 GSdx-d3d: optimize colclip 0 port from OpenGL.
Commits:
7979dec5b0
15b934eb2a
2018-10-05 08:40:01 +02:00
lightningterror 614209be2d GSdx-d3d: Change DATE variable to local. 2018-10-04 05:39:01 +02:00
lightningterror 694546e870 GSdx-d3d: Add colclip_wrap variable. 2018-10-03 05:50:54 +02:00
lightningterror 08a270a429 GSdx-d3d: Reformat GSRendererDX.cpp.
Let's keep the file clean and use 1 type of formatting and not a bunch.
It's easier to read this way and looks tidy.
Also correct some commented out code in Texture Sampler.
2018-10-02 02:16:38 +02:00
Jonathan Li 3fe9ff7ac8 gsdx: Split TC offset hack into X and Y components 2018-09-20 01:01:49 +01:00
Jonathan Li 2f5ba10e6b gsdx:hw: Move TC offset variables to GSRendererHW
Also rename them for consistency.
2018-09-20 01:01:49 +01:00
lightningterror 8acc319a4a GSdx-d3d: Mask alpha channel on 24bit format.
dfmt is not supported but we can use the variable to select the
frame buffer format and later disable writting to the alpha channel.

MGS3 sees an improvement, and possibly other games as well.
So far didn't spot any regressions.
2018-09-16 12:54:47 +02:00
lightningterror 577bfaa8cd GSdx-d3d: Move Selector reset states in to a separate function.
Also move vs_sel def in header file and rename it using the member name.

Code is easier to read/move/adjust similar to GL.
2018-09-15 05:49:18 +02:00
lightningterror d7cdbf6f27 Gsdx: Point Sampler changes.
Re add point sampler to OpenGL. Fixes graphical issues when
Allow 8-bit textures is enabled on AMD gpus.
Issue: https://forums.pcsx2.net/Thread-GSDX-Hardware-mode-Bug-Report-Allow-8-bit-Texture

Adjust the code to be easier to read, and execute the gl code only on amd - suggested by Gregory.

Remove useless ATI_SUCKS define in tfx shader.It wasn't used anywhere outside of the shader.
2018-08-22 20:12:53 +02:00
lightningterror 11bad7b07a GSdx-d3d: Reduce state change - port from GL.
Commit: 37f9bcf9cb

Don't dirty aref when a fog color is uploaded.
Only set clamp mode in clamp mode (region clamp is handled in shader).
2018-08-21 13:56:06 +02:00
lightningterror 9769f19ebe GSdx: Remove fbmask handle in GSRendererDX.
It's already handled in texture shuffle code.
2018-03-27 15:11:08 +02:00
lightningterror 0e83b89dbd GSdx-D3D: Texture and channel shuffle improvements.
Texture Shuffle changes:
Always Enable Texture shuffle on D3D10/11.
Previously Texture shuffle was enabled if CRC hack
level was below Full, this was kinda not good since
D3D also relies on CRC hacks on Full so you could either
stick with texture shuffle or crc hacks.

Texture shuffle is not supported on D3D9, however we can do a partial
port where instead of vertical lines with the effect we get the effect
on the entire screen. Better than nothing I suppose.

Ported some of the code from OpenGL to D3D
( just a copy - paste job :) ),
part of the code misses a dedicated shader but we can still
use it to fix various issues on many games.

List of affected games tested so far:
The Godfather, Final Fight Streetwise, The Suffering Ties that Bind,
Urban Chaos have their vertical lines issues fixed
(highly possible for other games as well), MGS and Stolen see an improvement
but they are still broken without crc hacks. Other games that suffered
similar issues are probably affected as well.

Channel Shuffle changes:
Update Channel Shuffle detection. A lot of games should see an improvement,
MGS, Urban Chaos, Stolen have their top left corner issues resolved.
Other games should be affected as well that use similar logic.
They still miss a shader so some effects are still broken/show glitches
but it's a nice improvement for D3D users.

Shared changes:
Texture Shuffle and Channel shuffle have been moved to their
own dedicated functions. Should make things a bit cleaner.

Move part of the code for Texture Shuffle to GSRendererHW to be shared
across all HW renderers, should aboid copy paste/duplicate code.
2018-03-23 13:38:34 +01:00
Jonathan Li f64488f818 gsdx:d3d: Fix fbmask conversion on texture shuffle
Port of 6580f4922f.
2018-02-06 00:03:25 +00:00
lightningterror 687c0b45e2 Gsdx: Tekken 5 Channel effect and CRC Hacks
Move CRC hack to Partial that fix the half screen
bottom issue since the effect is not rendered correctly.

Move CRC hack to Aggressive. These hacks are only
needed when running upscaled resolution. They skip the
blur effect which cause ghosting and some other screen issues.
Side effect is they also remove the channel effect on OpenGL
which is emulated correctly so let's put them on Aggressive.

Comment out a hack, it's unknown what the hack does atm.
If there are new issues then it will be added back.

Added comments what the hacks do.

Partial port for channel shuffle effect to Direct3D for Tekken5.
The effect is skipped and not rendered but now the top left
screen glitch has been resolved.
Note: At least Minimum CRC level is required for this to work.
2017-12-13 13:31:49 +01:00
FlatOutPS2 82405982f7 GSdx: Add merge sprite hack to GSdx hacks dialog
Adds merge sprite hack to GSDx hacks dialog

And ports merge sprite hack to Direct3D renderers.
Special thanks to my keyboards Ctrl, c and v buttons for all their hard
work in porting this hack.
2017-04-01 11:16:25 +02:00
FlatOutPS2 557b672232 GSdx: Unscale Point and Line Direct3D11 port
Ports the "Unscale Point and Line" hack to the Direct3D11 Hardware renderer.

And enables the "Unscale Point and Line" hack for Custom Resolutions with Direct3D11 and OpenGL.
2017-04-01 11:16:25 +02:00
FlatOutPS2 975441dfe9 GSdx: Direct3D port of HPO special/V2
Adds a port of the new Half-pixel Offset options for the Direct3D
Hardware renderers.
2017-04-01 11:16:25 +02:00
Akash f423cf73c4 GSdx: Fix Alpha test value initialization
Alpha test should only be disabled when writes to all of the alpha bits in the Framebuffer are masked. Fixes a regression in Dragon Ball Z: Budokai 3 scouter image rendering.
2017-03-11 17:40:28 +01:00
Gregory Hainaut b54a824abd gsdx: split texture filtering option
Bilinear applies to all renderer
* Common code done in GSVertexTrace
* Extend it with forced but sprite (trade-off between linear/upscale glitches)
* Linux GUI option was moved at the top with the renderer selection

Trilinear is moved to OGL hack

close #1837

Thanks to Flatout for the review and feedback.
It will take care to update the Window GUI :)
2017-03-10 18:05:34 +01:00
Akash ff89619b09 GSdx: Add an Enumeration for CRC Hack level 2017-02-21 10:54:03 +01:00
Gregory Hainaut 1e7fd83ac5 gsdx|spu2x: fix %d/%u in printf (cppcheck) 2017-01-22 21:10:40 +01:00
Akash 45be4626f6 GSDX: Add an enum for texture filtering
Also re-order the combobox to make it look consistent with the tooltip description.
2016-10-16 17:36:30 +01:00
FlatOutPS2 357dcdb55e GSdx: Move alpha stencil hack back to original location
Avoids skipping the alpha stencil hack.
2016-10-14 16:36:17 +02:00
Gregory Hainaut 5ced9c1f19 gsdx mipmap:ogl: plug trilinear/mipmap2 option
mipmap option 3. Actually maybe a separate tri-linear option will be better

m_mipmap == 2 => use manual PS2 trilinear/mipmap
Otherwise
m_filter == 3 => always use full automatic trilinear interpolation
m_filter == 4 => use automatic trilinear interpolation when PS2 uses mipmap
m_filter == 5 => like 4 but force bilinear interpolation inside layer
2016-10-13 20:16:38 +02:00
Gregory Hainaut 1cc696ab31 gsdx hw: update TEST.ATE field after ATE optimization
Otherwise DoFirstPass/DoSecondPass will give you result based on pre-ATE optimization

Close #1607
2016-10-05 09:43:24 +02:00
Gregory Hainaut 49c44db635 gsdx:dx: make filtering right
WMS/WMT 2 is the region clamping mode.

Hw unit can't emulate it right so it can give you bad filtering (Fix #1025)

Note: I only did the fix because I wanted to remove the TEXA hack. Otherwise
it is still recommended to use openGL
2016-10-02 18:21:52 +02:00
Gregory Hainaut dc365e066d gsdx tc: remove old plain TEXA hack
It must work fine without it now.

From the google code comments:

It would be nice to test those games
* Ar Tonelico 2 (line in sprite regression?)
* breath of fire dragon quarter (overlayed user interface in the game)

v2: update Dx code to use the good format
2016-10-02 18:21:52 +02:00
Gregory Hainaut 3996fbe365 gsdx hw: reduce conplexity around TryAlphaTest
* As sw renderer, don't bother to bypass it when it is ATST_ALWAYS
* Don't update the ATE register value
=> It is a really bad idea. Next draw call will be wrong if TEST register isn't written.
The TryAlphaTest context could have been updated
2016-10-01 19:20:49 +02:00
Gregory Hainaut b91bd3ea01 gsdx dx/gl: fix potential bug in alpha test handling
Depth test must remain disabled if write were masked.

Bug was detected on ICO (sea/sky) but the previous commit removes
the wrong ATE draw call.
2016-09-19 08:56:49 +02:00
Gregory Hainaut 6966e08306 gsdx: move alpha test optimization in base class
One code for all renderers :)
2016-09-19 08:48:32 +02:00
Gregory Hainaut 6558317a7e gsdx: s/m_eq.xzyf & 4/m_eq.z/
Much better this way
2016-09-18 18:50:15 +02:00
FlatOutPS2 e5c6b2e952 GSdx DX: extend ATE to better support additional corner case DX port
Port for Direct3D renderers of PR #1538.
2016-08-28 15:13:15 +02:00
Gregory Hainaut b6693c4345 gsdx dx/gl: fix depth optimization
4th bit is the fog value, not the depth
2016-08-27 13:57:39 +02:00
FlatOutPS2 87eed3965e GSDx GSRendererDX code improvement
Replace local copies context and env with m_ prefix originals.
2016-08-19 16:02:49 +02:00
FlatOutPS2 c5cd716c20 Gsdx alpha test improvement DX
Port for the DX renderers of the alpha test improvement for OGL created by gregory38.
2016-08-19 15:59:54 +02:00
Gregory Hainaut a9c18c57e4 gsdx option: use the new GetConfig* function
v2:
add PSX stuff
ssakash review
2016-05-28 10:07:27 +02:00
Gregory Hainaut 12b8704502 gsdx dx: disable channel shuffle 2016-04-30 14:52:43 +02:00
refractionpcsx2 dcb676765e GSdx: Clean up some warning under windows (#1289) 2016-04-14 11:00:58 +01:00
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