Commit Graph

2621 Commits

Author SHA1 Message Date
Jonathan Li cdeed349e3 gsdx: Replace platform-specific threads with std::thread
GSThread now doesn't seem to have a purpose, so it's been removed.
2016-12-08 00:36:32 +00:00
Gregory Hainaut 704776027b gsdx linux: update gui to add a HPO v2 checkbox
Sort std hack & upscaling hack
2016-11-29 17:22:02 +01:00
Gregory Hainaut a95adcb999 gsdx-ogl: correct texture coordinate by 0.5 when vertex position is -0.5
Avoid ghosting in Captain tsubasa
2016-11-29 17:22:02 +01:00
Gregory Hainaut 61a7c747e1 gsdx-ogl: alternate implementation of half pixel offset
The previous implementation of HPO adds an offset on vertex position. It
doesn't always work beside it moves the rendering window.

The new implementation will add a texture offset so that instead to sample
the middle of the GS texel, we will sample the middle of the real texture texel.

It must be manually enabled with
* UserHacks_HalfPixelOffset_New = 1 (keep a small offset as intended by GS effect)
* UserHacks_HalfPixelOffset_New = 2 (no offset)

v2: always apply a 0.5 offset in case of float coordinates (Tales of Abyss)
Might break other games but few of them uses float coordinates to read
back the target
2016-11-29 17:22:02 +01:00
Gregory Hainaut c2229e3c0b gsdx-ogl: add a texture offset uniform parameter to vertex shader
It would be used for a new implementation of the half pixel offset hack

Hopefully it doesn't badly impact the perf on low end iGPU
2016-11-29 17:22:02 +01:00
Gregory Hainaut f6cad2235b gsdx: defer GSScanlineConstantData init
Avoid AVX instruction in the middle

Issue #1677
2016-11-28 19:40:25 +01:00
Gregory Hainaut c9db1c6c4b vtune: plug PCSX2 core + add missing profiling (VU/VIF/TLB)
Doesn't fully work yet
* Unknown stack frame
* Outside any known module

Potential root cause:
* Nvidia driver
* VU code as ebp is required for emulation so likely no frame
2016-11-28 19:07:04 +01:00
Gregory Hainaut e4516ac9b8 cmake: add extra SSE4 and AVX2 build of GSdx when DISABLE_ADVANCE_SIMD is enabled
It will provide a speed boost on distribution that only enable SSE2
2016-11-25 16:35:40 +01:00
Gregory Hainaut 8431299b92 gsdx sw: port code to the new constant object 2016-11-24 23:03:26 +01:00
Gregory Hainaut 3b5bc9c38d gsdx sw: create a constant buffer
* Use POD type to avoid SSE/AVX compilation dependency
* global object to reduce cache miss
* dynamically object so give a chance to allocate below 2GB (allow x64
  optimization)
2016-11-24 23:03:26 +01:00
Gregory Hainaut 0f5529be18 gsdx sw: s/g_cpu/m_cpu/ 2016-11-24 23:03:25 +01:00
Gregory Hainaut c3e38e46c7 gsdx sw x64: disable mipmap support on AVX
Until it is implemented (might never happen)
2016-11-24 23:03:25 +01:00
Gregory Hainaut 608bb5ccb2 gsdx sw x64: add AVX2 implementation for VS
FS was copied from 32 bits (require massive update)
2016-11-24 23:03:25 +01:00
Gregory Hainaut 15220c386a gsdx sw x64: setup prim miss some optimizations 2016-11-24 23:03:25 +01:00
Gregory Hainaut e3bfa2be88 gsdx sw: factorize common draw scanline code
Ymm inherite from Xmm so it is useless to duplicate the code

Add a parameter to alltrue to test the good register
2016-11-24 23:03:25 +01:00
Gregory Hainaut 211c7745de gsdx: don't try to correct depth in primitive trace
Avoid to go above the maximum size allowed by the format

Issue #1674
2016-11-24 22:24:00 +01:00
FlatOutPS2 417d0a3606 GSdx Merge Circuit: Fix regressions
Fixes screen shaking in Tenchu: Wrath Of Heaven, and graphical issues in
NASCAR 09.
2016-11-23 22:14:44 +01:00
Gregory Hainaut 0d275868a5 gsdx x64: quick fix for windows
Until we got a full implementation
2016-11-21 18:18:09 +01:00
Gregory Hainaut 37379d5d1d gsdx sw x64: shuffle memory allocation
tex address is a3
vm address is a1

Could help to avoid REX prefix
Reduce prologue/epilogue register copy

Byte code size 41893 => 38912 (on my testcase)
2016-11-20 20:19:13 +01:00
Gregory Hainaut b76305a0d2 gsdx sw x64: keep the copy of top in the stack for dthe
An extra stack access by pixel won't impact perf (only 16 bits game with dithering)
Allow to save 2 registers (a1/a3)
2016-11-20 20:19:13 +01:00
Gregory Hainaut 994274623b gsdx sw x64: use rip addressing on draw scan line
byte code 41997 => 41893

However it will allow to save 2 registers as future optimization
2016-11-20 20:19:12 +01:00
Gregory Hainaut 7c06e87d59 gsdx sw x64: use rip addressing on setup prim
byte code: 9017 => 8736

Save a register
2016-11-20 20:19:12 +01:00
Gregory Hainaut 923c297dfc gsdx sw: vinsert128 opcode require an XMM register
Reported as an error on lastest Xbyak
2016-11-20 20:19:12 +01:00
Gregory Hainaut e674518c4e Update from xbyak 4.84 to 5.11
* bin2hex.h is removed
* vptest/vpblendvb YMM support integrated upsteam
* better support of rip for 64 bits
* AVX512 support (only miss the CPU now)

Local change: add BSD3 clause
2016-11-20 13:21:11 +01:00
Gregory Hainaut 681c09f25c gsdx sw: catch xbyak exception 2016-11-20 12:58:07 +01:00
Gregory Hainaut 0fd5346860 gsdx x64 linux: only mmap in lower 2GB code segment
Allow to use rip addressing
2016-11-20 10:38:15 +01:00
Gregory Hainaut 2252ba1bb7 gsdx: add the detected ISA on the name
As a SSE build could potentially uses AVX operations.
2016-11-20 10:38:15 +01:00
Jonathan Li ef25502491 gsdx build: don't exclude AVX files.
Thanks for the patch :)
2016-11-19 17:01:36 +01:00
Gregory Hainaut cc6d193e1d gsdx: Relax SSE/AVX constraint on 64 bits
The JIT will automatically select the best ISA (only AVX1 so far)
2016-11-19 17:01:29 +01:00
Gregory Hainaut 8fd46e96aa gsdx sw JIT: dynamically select ISA for SetupPrim 2016-11-19 17:00:33 +01:00
Gregory Hainaut 574a2c774e gsdx sw JIT: dynamically select between AVX1 and SSE code path (scanline) 2016-11-19 17:00:33 +01:00
Gregory Hainaut 6b78b8f9ce gsdx sw JIT: dynamically select SSE41 at runtime even on SSE2 build (scanline)
It won't give the full SSE41 speed boost but it is better than nothing
2016-11-19 17:00:33 +01:00
Gregory Hainaut 322473c295 gsdx sw: add a code example for gather instruction
It will requires a generic (register naming) linear interpolation to use it properly
Gather instruction requires an extra mask register therefore all registers name will be shuffled

Perf wise, initial haswell implementation seems to be microcode emulated.
2016-11-19 17:00:33 +01:00
Gregory Hainaut 2e20693583 gsdx sw x64: restore read texel optimization 2016-11-19 17:00:33 +01:00
Gregory Hainaut e728a14c19 gsdx sw: factorize color split in split16_2x8 2016-11-19 17:00:33 +01:00
Gregory Hainaut d58e43edbf gsdx linux: plug vtune as Windows 2016-11-19 17:00:32 +01:00
Gregory Hainaut 8abf242e2c gsdx: small x64 printf warning fixes 2016-11-19 17:00:32 +01:00
Gregory Hainaut 051c5c4bf7 gsdx sw x64: small stack optimization on linux
mov with the stack pointer require less bytecode
2016-11-19 17:00:32 +01:00
Gregory Hainaut 141c9e9c86 gsdx sw x64: prefer faster 32 bits operation when possible 2016-11-19 17:00:32 +01:00
Gregory Hainaut a281bda9a6 gsdx sw x64: port the scanline generator on AVX
Based on Gabest's work.

* Miss mipmap

Note: dithering info
It is a bit tricky as a2 on linux was rdx register which overlap with fzm (dh/dl)
It might require dedicated windows code
2016-11-19 17:00:32 +01:00
Gregory Hainaut 8e29e09943 gsdx sw x64: update setup prim generator x64 SSE&AVX 2016-11-19 17:00:32 +01:00
Gregory Hainaut 4a47224ac1 gsdx: define the linux x64 ABI 2016-11-19 17:00:32 +01:00
Gregory Hainaut e31ce87bb3 gsdx: SW JIT debug helper
Allow to compare 32/64 bits (and all ISAs too)
Allow to breakpoint (int3)
Print selector info
Print size of buffer and start (disabled by default)
2016-11-19 17:00:32 +01:00
Gregory Hainaut 633f7a1db9 xbyak: add int3 instruction
Very useful to stop the JIT
2016-11-19 17:00:32 +01:00
Gregory Hainaut 43b4cfc215 gsdx: separate dump directory for 32/64 bits 2016-11-19 17:00:32 +01:00
Gregory Hainaut 82d12691e1 gsdx: properly check SSE support
1/ Check all "levels"
2/ requires AVX for 64 bits
2016-11-19 17:00:32 +01:00
Gregory Hainaut 49d5c4260f gsdx state: post fix depth tracing
The main FindMinMax methods is perf critical so instead I created a separate function
to ensure the constness of the depth

Fix letter regression on Xenosaga3
2016-11-11 23:39:34 +01:00
Jonathan Li 1530effb29 gsdx: Catch bad_alloc exceptions 2016-11-09 22:41:02 +00:00
Jonathan Li ae6f26f3ef gsdx: Skip texture cache read if any dimension is 0
Fixes a crash at the PSX logo if either the DX9 or DX11 hardware
renderer is used.
2016-11-09 22:39:53 +00:00
Gregory Hainaut 31b32d3b11 gsdx linux: don't require to hit enter for Texture Offset text entry
close #1292
2016-11-08 20:28:42 +01:00
Gregory Hainaut ed3052dea5 gsdx: remove various assertion
Useless or wrong assertion
2016-11-08 18:58:10 +01:00
Gregory Hainaut 5ff9e94a2e gsdx linux: align mipmapping gui option on Windows 2016-11-06 16:39:40 +01:00
Gregory Hainaut 107251e099 gsdx: sort crc game list 2016-11-06 16:30:51 +01:00
Akash 1547dd4215 GSDX-UI: Add Mipmap combobox
Mipmapping is now supported on hardware renderers thanks to Gregory. Please report any observed hardware mipmapping issues on the forums (http://forums.pcsx2.net/Thread-New-feature-Needs-testing-GSdx-HW-mode-Experimental-mipmap-support) as potentially the HW mipmap code might still have some bugs.
2016-11-05 22:19:32 +05:30
Akash 58ed49f3c9 GSDX: Clean up warnings on MSVC
* Explicitly cast w_pages and h_pages into uint32.
* Prevent signed/unsigned comparison by converting lod into unsigned integer, honestly how coud a mipmapping level be negative?
2016-11-05 10:28:04 +01:00
Gregory Hainaut 758cf25888 gsdx: wrap bp for block ptr
Fix massive flickering of Beyond Good&Evil on SW renderer (HW happily overflow)
2016-11-04 23:03:12 +01:00
Gregory Hainaut 3d65312999 gsdx hw: remove old assert
Code is working fine with all formats
2016-11-04 23:02:49 +01:00
Akash 437afbbbf3 GSDX-PCRTC: Move Saturation hack to displayrect()
Fixes custom resolution scaling on Tribes aerial assault.
2016-11-01 17:54:46 +01:00
Akash b871c6b46f GSDX-TextureCache: Generalize scaling equation
Previously the dedicated custom resolution scaling equation was ignored for the second SetScale() call, generalizing the equations will also fix the DMC scaling issue on custom resolution. Also remove unnecessary checks for null on scale factors. The possibility for having a null scale factor value only exists on custom resolution and it will only happen on cases where the output circuit isn't ready yet. So the ideal way would be to handle all the required conditions of output circuit on "m_renderer->CanUpscale()" itself.
2016-11-01 17:54:46 +01:00
Akash 055f236aa5 GSVector: Add constructor to dispatch same values 2016-11-01 17:54:46 +01:00
Gregory Hainaut aa4b2d9f3a gsdx sw: wrap GS memory
Cost ought to remain small. Worst case is 2 extra "and" operation by group of pixels in scanline renderer

I think PixelAddressN functions are mostly call in the init.
2016-11-01 13:33:11 +01:00
Jonathan Li ba557e20a4 gsdx:recorder:unix: Fix thread leaking 2016-10-28 18:33:50 +01:00
Jonathan Li 7ab5cb20c8 gsdx: Don't close threads twice
CloseThread is called in the GSJobQueue destructor, so don't call it
again in the GSThread destructor.

Fixes #392, which was caused by a use after free.

Also prevents pthread_join() from being called twice for each thread
on non-Windows operating systems, which is undefined behaviour.
2016-10-28 18:33:35 +01:00
Gregory Hainaut 5dfb7d63dc gsdx: wrap gs page/block instead to skip them
Fix FMV of Thrillville when coupled with wrap_gs_mem = 1
2016-10-25 22:49:05 +02:00
Gregory Hainaut db4b4fb166 gsdx ogl: keep a separate log for sw 2016-10-25 22:00:41 +02:00
Gregory Hainaut cedc8aae44 gsdx: implement a shared memory to emulate the wrapping of the gs memory
Code can be enabled with "wrap_gs_mem = 1". Code only allow a single shared memory but
I don't think we need more anyway.

Linux only, Kernel panic expected with the HW renderer.

Fix FMV on Silent Hill 3 with the SW renderer
2016-10-25 20:29:38 +02:00
Gregory Hainaut 42b51611af gsdx: don't dump debug file if not requested 2016-10-25 17:10:57 +02:00
Gregory Hainaut e80ca0fa92 gsdx ogl: of course some driver don't work with GL_ARB_enhanced_layouts
Windows and (AMD or Intel)
2016-10-23 12:48:23 +02:00
Gregory Hainaut 885ef7a46f gsdx ogl: reduce complexity of driver detection 2016-10-23 12:43:50 +02:00
Gregory Hainaut 565cb70875 gsdx ogl: don't request arb_texture_barrier for the SW renderer
Allow[1] to use the mesa software emulated driver to test EGL.

[1] also need export MESA_EXTENSION_OVERRIDE="GL_ARB_buffer_storage"
2016-10-23 12:13:57 +02:00
Gregory Hainaut 01f0f436ac gsdx linux replayer: allow to repack gs dump
linux_replay = -N will save N first frames to a new gs dump

Save disk space & debug time
2016-10-22 13:22:28 +02:00
Gregory Hainaut 99c43881df gsdx egl: report an error if we fail to bind the openGL API
It seems Nvidia added openGL support in 355 (whereas I have 352 on debian).

I don't know the status on AMD.
2016-10-22 13:22:28 +02:00
Gregory Hainaut 8fdf973e66 gsdx glsl: add basic support of GL_ARB_enhanced_layouts (GL4.4)
Hardcode location of interface to the location 0. If I understand the
spec correctly (unlikely), variable in interface will get successive
location.

Goal is to reduce driver work. Instead to compute some location based on
name matching approach (and silly validation), the driver can now use
static allocation.

Tests on future Mesa 13 are welcome
2016-10-19 23:03:39 +02:00
Gregory Hainaut b1f2d27ddf gsdx: move Haunting Ground CRC to dx level 2016-10-19 21:10:44 +02:00
Gregory Hainaut 264b764d6e gsdx tc: improve haunting ground hack to remove the bloom effect
Just clear the buffer. The generic solution will be a copy from buffer A
to buffer B But it requires
1/ a big buffer A (otherwise it would overflow)
2/ a line width rescaling (+ the upscaling mess support)
2016-10-19 19:31:32 +02:00
Gregory Hainaut c2cf8e528c gsdx ogl: tekken5: only trigger channel effect shader when frame buffer is a single page
Fix missing model regression.
2016-10-17 19:34:55 +02:00
Akash 8945ace3f7 GSDX-UI: Remove Trilinear options at some cases
Currently the Trilinear option only works on OpenGL. Remove it from combobox when other renderers are used.
2016-10-16 17:36:30 +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
Gregory Hainaut cc4cc342c2 gsdx hw: add a special sub target invalidation for haunting ground
Fix a wrong blending/blooming

Based on CRC to reduce impact on others games (speed)
2016-10-16 17:32:57 +02:00
Gregory Hainaut 31248da3d1 gsdx sw: Fix 16 bits date test on SSE build
AVX Builds were fixed in this commit a1a842b07f
2016-10-16 16:48:23 +02:00
Gregory Hainaut defdd27987 gsdx: set m_nativeres to true in replayer
Otherwise you can't compare draw call between native and upscaled
2016-10-16 16:48:23 +02:00
Gregory Hainaut c284459382 gsdx tc: allow to search old depth/color in texture cache
But give higher priority to recent buffer.

Fix cut scene issue in Jak II (and potentially various game when EE/VU hacks are used)
2016-10-15 18:08:00 +02:00
Gregory Hainaut 7bb201a1d2 gsdx tc: move code to allow to lookup an older target if none was found
Next step is to enable it by uncommenting line 452
2016-10-14 22:03:29 +02:00
Gregory Hainaut 24684033ca gsdx: enable clut_load_before_draw option on Harley Davidson (CRC hack)
At least the game is good until we find how the HW really behave
2016-10-14 20:47:18 +02:00
Gregory Hainaut 2c0a4ac906 gsdx ogl: add an extra debug log level
Avoid too much log
2016-10-14 20:46:58 +02:00
Gregory Hainaut 3c30db965d gsdx gui: add a combo box on linux (below Interlace)
3 states are off/half/full. I'm too lazy to create a better combo box.

The hack option will be removed when Windows GUI is ready
2016-10-14 19:26:58 +02:00
Gregory Hainaut 37a1230c01 gsdx: reduce code duplication for key event 2016-10-14 19:26:58 +02:00
Gregory Hainaut a4658eac24 gsdx hw: allow overlapping of texture (alpha) and framebuffer (RGB)
Fix HUD on Berserk

v2: use fbmask instead of hacking the target format to 24 bits.
2016-10-14 19:26:27 +02:00
Gregory Hainaut 25e76d0564 gsdx ogl: use an invalid value for stencil state
Fix shadow in WWE Smackdown Vs Raw 2006
2016-10-14 19:01:18 +02:00
Gregory Hainaut 51c64fcbe6 gsdx sw: trick GetFeedbackOutput to handle basic merge loopback
It is enough for Xenosaga.
2016-10-14 18:13:20 +02:00
Gregory Hainaut deb2ed3d09 gsdx ogl: reimplement merge circuit to support feedback write 2016-10-14 18:13:20 +02:00
Gregory Hainaut 06055add5c gsdx merge: get a new buffer for the feedback write 2016-10-14 18:13:20 +02:00
Gregory Hainaut 317a464278 gsdx shader: RGB => YUV conversion
Required for write feedback emulation
2016-10-14 18:13:20 +02:00
Jason Brown 6ef5607d99 gsdx shader: add a shader to render text for OSD
Gregory: code extracted from the OSD PR to reduce conflict
2016-10-14 18:13:20 +02:00
Jason Brown d84d30fe87 gsdx: Add color component to OGL shaders 2016-10-14 18:13:20 +02:00
Gregory Hainaut 7ca9ca9465 gsdx: new parameter for merge virtual function
* Add full PMODE register to replace slbg/mmod
* Add full EXTBUF register (will allow to emulate write feedback)
* Add a third source (which will actually be the destination of the
  write feedback)
2016-10-14 18:13:20 +02: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 fbf7ccbdda gsdx: by default new will throw std::bad_alloc
So catch/use it and don't bother with GSDXErrorOOM
2016-10-13 20:44:59 +02:00
Gregory Hainaut c440c7c93a gsdx gui: update the filter combox box with new trilinear options
OpenGL only

v2: update setting tooltip based on turtleli feedback
2016-10-13 20:16:38 +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 c2777ff989 gsdx state: split IsMipmapActive in 2 pieces
This way we can test if a draw call requires a triliner filtering.
It will be used in next commit to implement automatic trilinear
2016-10-13 20:16:38 +02:00
Gregory Hainaut 1b9b47dd6a gsdx mipmap:ogl: add capabilities to automatically generate mipmap layer 2016-10-13 20:16:38 +02:00
Gregory Hainaut 510eccd471 gsdx mipmap: enable fully tri-linear filtering
(when mipmap > 1)
2016-10-13 20:16:38 +02:00
Gregory Hainaut a8a2db8eb1 gsdx mipmap:ogl: extend HW sampler with tri-linear filtering
v2:
* use nice enum
* use bilinear info when there is no mipmap (more accurate)
2016-10-13 20:16:38 +02:00
Gregory Hainaut 335d7f3ae5 gsdx: add a nice enum for min filter 2016-10-13 20:16:38 +02:00
Gregory Hainaut 7ea0e90678 gsdx mipmap:ogl: extend shader to support trilinear filtering 2016-10-13 20:16:38 +02:00
Gregory Hainaut d185a85a07 gsdx ogl: replace simple_sample variable by the opposite shader_emulated_sampler
It feels easier to read this way
2016-10-13 20:16:38 +02:00
Gregory Hainaut ae441e6a2c gsdx mipmap:HW: Update all valid texture layers 2016-10-13 20:16:38 +02:00
Gregory Hainaut 5d593dd948 gsdx mipmap:HW: save state of both min&max lod values 2016-10-13 20:16:38 +02:00
Gregory Hainaut 15b1d8d3f0 gsdx mipmap:tc: add code to update a single layer of a mipmap 2016-10-13 20:16:38 +02:00
Gregory Hainaut dbb4bdf59f gsdx mipmap:ogl: add GL_TEXTURE mipmap support
* Allocate more memory for extra layers
* Allow to upload data in any layers
2016-10-13 20:16:38 +02:00
Gregory Hainaut 76bd968c59 gsdx mipmap: extend texture/cache to support a layer parameter 2016-10-13 20:16:38 +02:00
Gregory Hainaut b695e0065a gsdx mipmap: use a 3 state option 2016-10-13 20:16:38 +02:00
Gregory Hainaut 9af34cc611 gsdx tc: miss a set scaling call
Likely impact issue #83/#694
2016-10-09 13:07:08 +02:00
Gregory Hainaut 3b733930fe gsdx: UserHacks_TextureInsideRt must be disabled by default
Likely a bad copy/past
2016-10-09 12:13:37 +02:00
Gregory Hainaut 344636d88e gsdx ogl: attach input texture before copy
Help to ensure with copy the good texture in debugger
2016-10-08 23:42:39 +02:00
Gregory Hainaut 22ebdcf1cf gsdx debug: create a nice dump function for kernel gs registers
Add missing register
2016-10-08 23:42:39 +02:00
Andreas ab228c8484 Added missing CRC for Grand Theft Auto San Andreas. 2016-10-08 18:38:50 +03:00
FlatOutPS2 db853b4462 GSdx: Add Jak 2 US CRC to GSCrc list.
Fixes issue: https://github.com/PCSX2/pcsx2/issues/1603
2016-10-07 13:14:15 +03:00
Gregory Hainaut 574a807678 gsdx tc: new hack to extract texture from rt
UserHacks_TextureInsideRt = 1 (don't look at Jak)
2016-10-07 01:43:04 +02:00
Gregory Hainaut 8873b27eb8 gsdx: let's keep the new clut option off
There are still issue with virtua fighter (albeit my dump is better...)
2016-10-06 22:05:03 +02:00
Gregory Hainaut 79666b26c0 gsdx sw: restore the const reference
It was removed for PSX hack which was removed a couple of commits ago
2016-10-06 20:02:22 +02:00
Gregory Hainaut c66004bbb2 gsdx: hidden option to better support dual context clut
Option is on by default. Just a safety net in case of regression

Fix clut issue on virtua fighter (SW) and harley davidson (SW/HW).
2016-10-06 19:08:21 +02:00
Gregory Hainaut 9cd4984f7c gsdx debug: more log 2016-10-06 18:56:31 +02:00
Gregory Hainaut d827497403 gsdx: let's handle illegal 4 bits format too
In doubt if some games use them.
2016-10-05 22:07:49 +02:00
Gregory Hainaut 9b93c07339 gsdx: Handle illegal 8 bits format. Found the most silly GS dev trick
Fix Berserk #1526 Well done guys but we're more clever than you ;)

So instead to mask the color channels as any guy that RTFM, they decided to use the illegal 8H frame format
2016-10-05 22:07:43 +02:00
Gregory Hainaut 6fd46eb36a gsdx: move the validation of the texture format before the draw call
Avoid false positive when game write dummy stuff
2016-10-05 22:07:23 +02:00
Pseudonym a0629587be gsdx memory: implement read texture of PS GPU24
convert the swizzled block as tightly packed 24 bits RGB

Then convert scanline to standard 32 bits RGBA

The HW renderer requires the preload data hack
2016-10-05 21:59:42 +02:00
Gregory Hainaut 1c900e780a gsdx memory: add a PS GPU 24 bits format
Same swizzle as 16 bits. But contains tightly packed RGB pixels.
2016-10-05 21:06: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 3653a7746a gsdx psxmode: small hack to "see" video until we found a better solution 2016-10-05 09:43:24 +02:00
Gregory Hainaut 677f890c5c gsdx debug: static GSState::s_n
This way you can access the current draw call anywhere. Very useful for debug.
2016-10-05 09:43:24 +02:00
Gregory Hainaut 61333ecb40 gsdx debug: trace register access
I didn't include high frequency register such as vertex stuff

main goal is to give the possibility to trace the texture/clut update
2016-10-05 09:43:24 +02:00
Gregory Hainaut 1b8d6a38e7 Merge pull request #1586 from PCSX2/gsdx-refresh-gui-options
Gsdx refresh gui options
2016-10-04 18:30:48 +02:00
Gregory Hainaut 354aa6831b gsdx ogl: brain hang in the middle of the line
Only impact if bilinear is forced
2016-10-03 18:52:02 +02:00
Gregory Hainaut 5b72fab2e4 gsdx ogl: depth regression from 866173a481
Only mask depth if the min value is too big

Issue #1602
2016-10-03 18:32:54 +02:00
Gregory Hainaut 3be055a366 gsdx hw: remove code to detect an effect
It was a tentative to emulate GTA radiosity but the new hack is more generic
2016-10-02 18:29:23 +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 7f4791fa85 gsdx hw: improve no_ds detection
Support ZTST_NEVER as no depth read => psx mode speed boost
Use zm/fm to reduce further depth lookup
2016-10-02 18:21:52 +02:00
Gregory Hainaut c3ac3ecbe7 gsdx hw: move try alpha test at the beginning
Will allow to use alpha test optimization to better optimize depth lookup

Require to do clut handling before
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 cf13cccb1e gsdx: avoid useless spamming of INVALID PSM in release build 2016-10-02 18:21:41 +02:00
Gregory Hainaut 955a69b16e gsdx ogl: fix GT4 regression (wrong texture on timing) 2016-10-02 12:16:48 +02:00
Gregory Hainaut c7c6566bca gsdx hw: of course the full Jak series will kill me 2016-10-02 11:57:09 +02:00
Gregory Hainaut b6638d4eec gsdx hw: forgot to comment an unused variable
Keep the code in case, we better solution is found to validate the depth/frame format
2016-10-02 10:18:15 +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 c5f086b385 gsdx ate: separate the code that depends on TEST.AFAIL
Easier to read and allow a switch optimization

Add a shortcut for the common ATST_ALWAYS case
2016-10-01 19:20:38 +02:00
Gregory Hainaut 4612b79575 gsdx: add a warning on vertex trace
Due to a division by 2, depth lsb bit is always 0

I'm not sure it is critical but let's keep a note for the future
2016-10-01 19:16:44 +02:00
Gregory Hainaut d1e07295e7 gsdx linux: add the missing gui option for unscale point/line primitive 2016-10-01 19:16:44 +02:00
Gregory Hainaut 5e1064da55 gsdx: remove the safe accurate blending hack
V2: Integrate Flatout patch to do the Window side
2016-10-01 19:15:52 +02:00