15ms latency is too little most of the time, but if the stars align (light game,
fast system, the correct audio output module - portaudio comes to mind), it
might work well/reasonably, so allow it.
Watch the console for stretcher related messages. If you hear bad audio (clicks
etc) or notice reset/underruns messages, it means the latency is too low. The
optimal behavior (stretching is locked to 1:1) is when a message "stretch: None (1:1)"
shows at the console, which isn't followed by a message "stretch: Dynamic" or
resets or spu2 underruns.
I'm pretty sure such low latency with good performance (mostly locked to 1:1)
was not possible in the past, but it seems possible (sometimes) now. Maybe the
previous "black magic" commit helps
The default is still 100ms which is still fine for most cases.
This commit affects Windows. Linux still has a different minimum, probably
mostly due to UI/constants. Maybe someone should test and change that too.
I don't have a fully scientific explanation here, but it seems that with big
buffers (~200ms and up), the stretcher adjustment can overshoot the target
equilibrium back and forth, in effect never stabilizing.
This commit makes it change slightly slower which somehow seems to improve its
behavior. Sorry for not having a better explanation, as at this stage tuning the
stretcher has become somewhat of a black magic.
But hey, if it works...
Tested with buffers from 30ms to 1000ms, and with playback speed and speed
changes between 30% and 500%, and as far as I can tell it only makes it better.
Fingers crossed.
Both the Linux and Windows config dialogs now have a TV Shaders combobox,
so the F7 toggle can be made temporary. This makes the hotkey behaviour
consistent with all the other hotkeys.
Fixes the PadNull crash when any window event occurs due to mixing and
matching Unicode and MBCS window handles. Thanks to Volkanite for
figuring out why it was broken.
There's already a SysMessage definition, so a second one is unnecessary.
Cleanup some headers as well. I wanted to remove the about box as well,
but that can wait.
By doing more copy/pasting.
The directory creation code was removed - it doesn't create any
necessary parent directories so it's not all that useful.
It would be great if all plugins shared config code, but it's probably
to have all the plugins use Unicode on Windows first.
I don't understand the magic but sometimes pad buttons are detected as buttons
sometimes as axis. Create an option so people can test both and hopefully find a working solution
Note: you need to restart the plugin to take the option into account
Note2: fix dual pad init too
Related issue #938 and #414
Previously the sound touch configure caption box will still have the outdated value of the sliders when using the restore defaults function, update the caption text also during restore defaults. ( use the first slider value for caption since that lies closer to the restore default box )
The old one isn't working. I don't think there's a URL that redirects to
whatever language the user is using (unless my browser settings are
wrong), so I've just used the English US URL.
1. Add GS_Renderer Enum
Replace all instances of int/uint32 renderer identifier by a strongly
typed enum and appropriate casts.
Only instances in GS[*].cpp/h classes were touched. GPU[*].cpp/h classes
do not to follow the same convention.
2. Add default renderer according to OS
The default renderer is OS dependent (Win -> Dx9HW, others -> OGLHW).
Consequently one should always check againt the appropriate default
value on config load.
The old behaviour was only - if a at all - problematic if the respective
element in the gsdx.ini was missing and probably even then didn't create
issues. The current implementation is still more stable and does not
depend on the implementation of GS.cpp -> GetConfig()
The following patch adds Mipmap option (software mode exclusive) and Preload Data Frame (Hardware mode exclusive) to the GSDX plugin settings for debug purposes.
When X autorepeat is enabled, it will generate down/up, down/up, ... sequences
So it was decided to disable it. Unfortunately the configuration is for
the full system which is very annoying (state isn't restored after an
ASSERT or EXCEPTION)
Initially the plugin handles the event from the X loop. However since
the GSopen2 switch events are already intercepted by the WX core GUI.
The core will route them back to the input plugin.
Wx filters automatically generated event so initial sequence is now
down, down, down/up. No more autorepeat issue, so no need to screw up
the system.
Close#945
Note: SDL_Init is mandatory oterwise SDL_OpenAudio will redo the init.
So the only sane way is to initialize pulseaudio, close everything, and finally
init the requested driver.
V2:
* ifdef SDL2 code
V3:
* use std::string for m_api (avoid issue issue with wx2.8)
* call the good function to properly close subsystem avoid crashes
The purpose is to workaround bug with default API
Code is not ideal because SDL/gui are mixed. But it would be enough
for future release.
V2: ifdef SDL2 code
Add images for the new GUI
Onepad : wxWidget GUI
Replace headers by png files.
OnePad: wxWidget HUI (Images)
Fix l2.png file (white background instead to a transparent one).
The goal is to check the impact on game that have wrong RT content.
It helps a bit Smash Court Tennis Pro Tournament 2 but the game suffers
another texture cache bug. (RT BW is 10 whereas texture BW is 8)
Note: Armored Core: Last Raven must be tested (only game so far
that rely on the option and I didn't want to add a new one).
CID 147033 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)16. uninit_member: Non-static class member ActualPaCallback is not initialized in this constructor nor in any functions that it calls.
Typical wrong draw:
1/ draw in 32 bits
2/ draw in 24 bits
3/ Use alpha as a texure. (Must reuse the GPU data)
4/ Write alpha from EE
5/ Use alpha as a texure. (Must upload new data)
This commit fixes the step 5.
Fix#917 (Conflict - Desert Storm)
* the break doesn't get used since HANDLE_CHECK consists of a break on the function itself.
* removed an outdated comment since realtime update of configure has been done.
previously the soundtouch configure box required a total exit of the dialog to get the configure box value updated , now it's made to be done in an instant.
CID 146973 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member overflow is not initialized in this constructor nor in any functions that it calls.
2999}
runion/rempty/rinter requires x < z and y < w
Help issue #762 (accurate blending issue)
If you want to shine, please put better GSVector code (AVX512 is 2 instruction :p)
In the DATE42 algo, first pass must find the primitive that write the
bad alpha value. If depth test is fail, alpha value won't be written therefore
you mustn't keep the primitive id.
In theory to ensure 100% correctness, depth would need to be fully executed
(currently depth write is disabled). However it requires to copy the depth buffer.
It is likely bad for the perf.
Issue reported on DBZInfWorld
Function pointer was mangled to avoid any collision. Nowadays all symbols
are hidden so no risk of collision.
Syntax is nicer beside it would allow to put back GLES3.2. I think it
supports most of the used extension.
glActiveTexture & glBlendColor are provided without symbol query.
CID 146834 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)9. divide_by_zero: In expression tpf * 10000ULL / ttpf, division by expression ttpf which may be zero has undefined behavior.
CID 146839 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)11. var_deref_model: Passing null pointer fb_pages to UsePages, which dereferences it.
CID 146840 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)11. var_deref_model: Passing null pointer zb_pages to UsePages, which dereferences it.
* Prevent a potential null pointer deference in ```void GSRendererSW::UsePages()```
+ Isolate every SDL code paths and replace any call to them by call to a generic class "GamePad" of which JoystickInfo is now a child.
+ Now backends can be added by inheriting GamePad generic class.
+ There is just one function change which is redundant with next commits but otherwise commit will not compile(which is more evil).
+ Objectify conf class.
+ Make some members private as they need to have their range checked before being set
+ Change "options" variables into an union contraining bitfield representation of it. Allows to make code more expressive/readable.
CID 147046 (#1 of 1): Useless call (USELESS_CALL)
side_effect_free: Calling ApplyVolume(Ext, Cores[1].ExtVol) is only useful for its return value, which is ignored.
Disable and overrides the following hacks at the config and dialog:
- Disable screensaver
- Safe fullscreen exit on escape
- save state in title
All of those are hacks which PCSX2 doesn't need anymore and therefore are just
confusing if enabled.
Note that we assume PCSX2 is synonym for PS2 mode in LilyPad, and while AFAIK it
is the case now, it might need a more fine grained override system.
All combobox text can now be seen in full without having to click on the
combobox.
The internal and custom resolution stuff has been moved into the Hardware
Mode Settings groupbox since it doesn't affect software mode.
The dialog has also been rearranged a bit.
shaders/GSdx.fx is now the default location and is no longer hardcoded.
The external shader and external shader config can now be selected. (The
OpenGL renderer already has this feature.)
Note: It is still possible to not use a config file, just use an invalid
value for shaderfx_conf.
Don't use D3DX compile from file and compile from resource functions -
use the compile from memory function instead. It does the same thing,
except you have to set things up yourself.
Benefits:
Allows external shaders to be split into a config file and a shader file
without hardcoding the config file name.
Less code.
Yes, I more or less used the same message as the dx11 one.
Don't use D3DX compile from file and compile from resource functions -
use the compile from memory function instead. It does the same thing,
except you have to set things up yourself.
Benefits:
Easier move to D3DCompile when it becomes necessary.
Allows external shaders to be split into a config file and a shader
file without hardcoding the config file name.
Less code.
OpenGL does not use the cdecl calling convention (which is the default
calling convention for GSdx on Windows). Since DebugOutputToFile is used
by OpenGL, it needs to use the same calling convention that OpenGL uses.
This fixes a debug build crash when the OpenGL renderers are used and
debug_opengl is nonzero in the ini.
A couple of useless members were removed too.
Also fix wnd initialization
Coverity:
CID 146955 (#1 of 1): Uninitialized pointer read (UNINIT)
18. uninit_use: Using uninitialized value wnd[i].
Coverity:
CID 146816 (#1 of 1): Calling risky function (DC.STREAM_BUFFER)
dont_call: fscanf(FILE *, char const *, ...) assumes an arbitrarily large string, so callers must use correct precision specifiers or never use fscanf(FILE *, char const *, ...)
Without this patch, if a user initiates a recording and then cancels at the GSdx
dialog, the audio was recording anyway, which is probably highly unexpected.
However, while probably highly unexpected, it could still be useful to record
only audio, but with this patch it's now impossible.
We can reconsider if it turns out that people are actually using this "feature",
though one might as well set the video setting to be very unobtrusive (very low
resolution/bitrate) such that it uses very little CPU.
This is the internal resolution which GSdx uses and recording at this resolution
is optimal, i.e. without any dumb scaling, with all relevant pixels and without
redundant pixels.
The resulting clip still doesn't have the correct aspect ratio set, but that's
just a property which can be set to the clip afterwards, which is where the DAR
becomes useful. Since it's usually anamorphic, when muxing later with the audio
use the DAR to set the playback aspect ratio.
gsdx changes:
Remove native resolution checkbox from GUI and rework associated code
Small changes to Windows and Linux GUI
Support 8x native resolution
Fix custom resolution width less than native width use case
Previously it was saving the display name to the config but trying to restore
according to the friendly name.
Now store and restore according to the "displayName" which is more unique than
"friendlyName" since it includes GUID[s], and handle it consistently as _bstr_t.
This fixes the following issues when custom resolution is selected.
- When the width is smaller than the native resolution width, the
texture cache targets are removed on every Vsync signal, causing a
black screen issue.
- The texture cache code needs a 1 returned for the custom resolution
upscale multiplier or there'll be some really funny graphical issues.
It also removes unnecessary GetConfig (which I think unconditionally
does a a file read on Windows) calls if the width was increased - the
upscale multiplier is already stored, and the custom resolution width
and height calls are now unnecessary.
Also fix some whitespace issues.
Before this patch, when recording Progressive (frame) mode, it recorded all
the frames correctly but set the clip's fps property to 25/29.97, so when
played back it played at half the speed (but was fine when played at double speed).
This patch does not affect the number of frames recorded per second, but rather
only sets the resulting clip fps property to the correct one (double than before).
Also fixes a bug that in a non-managed window in progressive mode, the title
displayed "200%" speed when it should have displayed 100% speed.
Fixes#832
upscale_multiplier function values have been changed to allocate native resolution and also move custom resolution to 9.
Remove the old native checkbox value and include Native in the combo box.
Internal GSDX functions have also been updated with this new update to the upscale_multiplier variable.
* Greatly reduce the number of clut read (factor 10x)
* Avoid to get wrong TEXA texture in the cache.
* Fix "jump depends on uninitialized variable" Valgrind warning.
Fix#748
I try my best to avoid any breakage of DX but please test it too.
* add lengthly comment to explain the format
* Likely reduce the number of shader permutation
* Avoid slow AEM (on GPU)
Expect regressions because TC needs some fixes
v2: fix palette mode
CID 146833 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)
divide_by_zero: In expression this->m_width / this->m_upscale_multiplier, division by expression this->m_upscale_multiplier which may be zero has undefined behavior.
CID 146835 (#1 of 1): Division or modulo by float zero (DIVIDE_BY_ZERO)
50. divide_by_zero: In expression (float)(end - start) / (float)frame_number, division by expression frame_number which may be zero has undefined behavior
Add 2 new shaders:
* ps_main12: cast a 16 bit depth to a RGB5A1 color
* ps_main16: cast a a RGB5A1 color to a 16 bit depth
Shader might be used in future commit as it seems Silent Hill uses this
kind of format.
Fix tab/indentation too
Add tooltips to Windows GUI. Fixes#578.
Rearrange Window GSdx GUI a bit.
Reformat tooltip descriptions to be both Linux and Windows (un)friendly.
Add new tooltip descriptions.
Fix Windows Lilypad local volume control GUI checkbox.
Make MicroVU E-bit delay slot warning a Dev warning.
Don't minimise GS Window if main window is minimised.
For Linux and Windows, add tooltip descriptions for AF, AA1, extra
rendering threads, Enable Shade Boost, FX Shader/External Shader, FXAA.
For Windows, also add Alpha Correction and Logarithmic Z tooltips.
For Linux, add software mipmap tooltip.
Thanks to tsunami2311, ssakash, gregory38 and whoever did the wiki for
helping with descriptions.
The hack description box messages were replaced by tooltips on Windows,
so there is no need for the first line in the description to refer to
the hack anymore.
3-state checkboxes were also converted to comboboxes, so remove any
references to checkbox states.
Reformat the descriptions so it looks okay on both Windows and Linux.
Could be better, but I'm out of ideas.
Also fix a few typos and missing punctuation.
Changes the three-state checkboxes to comboboxes.
Removes the hack description box.
Hides Alpha and Alpha Stencil when OpenGL is selected.
Rearranges the hacks dialog.
This moves the hardware, non-renderer dependent options to the top and
makes the renderer options visible only when it affects the current
renderer.
The texture filtering checkbox has been changed to a combobox and now
uses the same description as Linux does.
Also changes the Title to GSdx Settings.
The purpose is to avoid issue on MS-Intel driver without
a dedicated hack in the compilation.
Code doesn't use it so I suspect others implement to discard the
statement.
The CRC hack option is always used regardless of whether the HW Hack
checkbox is ticked. Move it to the main gsdx dialog and make it use the
same descriptions that are used in Linux.
And fix the accurate_blend_unit whitespace formatting.
It claimed to be 1.7.1 but it had a mixture from various
versions. It was hard to update as everything in the top directory
so I used upstream's way to organize files. I renamed include to
soundtouch since I did not want to #ifdef that for windows.
.
Wavfile.h is a private header so I used the private path instead of
moving the file over. This changed 3 files in the plugin folder.
according to some of the internal functions in GSDevice files, Anisotropic Filtering is only done when paltex is disabled. do the same on the GUI for user awareness.
Removes the checkbox of Anisotropic filtering from the GSDX plugin settings, the checkbox was usually used to enable & disable the AF which is not necessary since there is an option in the drop down list for disabling AF.
the internal function value of "AnisotropicFiltering" has been replaced with "MaxAnisotropy" for detection.
the detection uses the function getconfig("MaxAnisotropy", value) where value 0 means disabled and value is the default value when no value is set in the INI file.
I went a bit of trigger happy since compiling so much is not fun. Changes:
Solution
- Remove all SSE2/SSSE3/SSSE4/AVX/AVX2 configurations. Not used.
- Remove wxAdv3.0 and x86emitter. Compiled but not used.
- Make sure Release compiles Release.
- Make sure Debug compiles Debug.
- Make sure Devel compiles Release or Devel.
- Make sure nothing get skipped.
- Do the last 4 for the x64 build.
.
CDVDolio
- Remove SSE2/SSSE3/SSSE4/AVX/AVX2 configurations. Not used.
- Remove props. Cruft.
- Remove _M_SSE from stdafx.h. Pointless and only reference to it.
xpad
- Remove SSE2/SSSE3/SSSE4/AVX/AVX2 configurations. Not used.
- Remove props. Cruft.
- No reference to _M_SSE.
.
Only GSdx uses _M_SSE.
- Remove *.mo. Not needed.
- Add *.aps and delete USBqemu.aps.
- Don't ignore asm files.
- Ignore the cmake obj-i586-linux-gnu build folder in Linux.
- Fix the regex pattern for /bin/pcsx2*
- Don't ignore the changelog of libjpeg.
- portaudio line not needed and ignored vcxproj/props/etc.
- update to the new rcdefs.h location
- Don't ignore pcsx2/gui/Resources/EmbeddedImage.h
- Remove autogenerated file plugins/dev9ghzdrk/Win32/postBuild.cmd
- Simplify lines using '**' or '*.exe'.
Remaining issues:
$ git status --ignored
Ignored files:
plugins/CDVDiso/src/mkiso/mkiso.dsp
plugins/CDVDiso/src/mkiso/mkiso.dsw
.
These can be deleted.
It could not find dxguid.lib since it was only available for Release.
.
This should go on a prop but that is a different PR.
.
I also fixed it for x64 while I'm at it.
- zerospu2: include stdint.h in Windows. (VC2012+)
- CDVDolio: Remove hash_map (not used, VC2015+)
- zerogs: Fix extern and link to utilities. (VC2012+)
- zzogl: Port windows part to wx30. (VC2012+)
I: pcsx2: spelling-error-in-binary usr/lib/i386-linux-gnu/pcsx2/libGSdx-1.0.0.so allows to allows one to
I: pcsx2: spelling-error-in-binary usr/lib/i386-linux-gnu/pcsx2/libGSdx-1.0.0.so Allow to Allow one to
.
Apparently lintian checks grammar too (most common ones).
The Wild Arms Offset hack can only be on or off. There is no third
state. Convert the three-state checkbox into a two-state checkbox, fix
the description and remove a leftover.
Intially GSBlendStateOGL was an alias of the m_blendMapD3D9 array
The object was replaced by an index in the array. Save 2k of memory duplication.
And too much useless code.
v2: push/pop blending state in DATE stuff
v3: remove m_state which is useless now
I used to disable the RT but it doesn't work well with 50cents. It seems
texture writes weren't propagated correctly to the depth buffer. Besides
the game write an alpha value whereas depth is 24 bits only...
Commit message edited by Gregory.
Comment below from Jonathan Li
On my system, /dev/input/event13 (evdev interface) and /dev/input/js0 (joystick interface) correspond to the DS3 on my system. User/group ownership are both root.
With /dev/input/event13 at 0640 and /dev/input/js0 at 0644 - SDL2 detects no pad, SDL1 detects a 19 button, 27 axis pad
With /dev/input/event13 at 0666 and /dev/input/js0 at 0644 - Both SDL1 and SDL2 report a 19 button, 4 axis pad.
SDL2 only uses the evdev interface, SDL1 uses the evdev interface but if that fails, it uses the joystick interface.
The purpose is to emulate correctly destination alpha factor
An alpha channel of 128 is 1.0 in the GS but only ~0.5 in the GPU
I think few draw call use destination alpha so impact on perf must remains small.
Actually it can partially be done with GL_ARB_shader_image_load_store
extension. However all drivers that support shader_image have
texture barrier too.
The idea is to use a floating texture to accumulate the data and
then do a final postprocessing pass to apply the modulo
v2:
* use bounding box to
* fix vertex corruption issue
* use negative number in shader which allow to use half float (+12
fps@4x)
Previous CopyRect function does a memcopy without conversion.
This function will allow to use different format for input/output. Just a
possibility for the future
Basically the code does the alpha multiplication in the shader therefore
the blend unit only does a pure addition. This way the multiplication is
accurate and accurate_blending doesn't requires a costly barrier.
This code also avoid variable duplication to make the code more separated.
Hopefully blending can be done in a separated function
It is preliminary work to support fast color clipping with HDR
v2: fix assertion compilation failure
v3: fix regression in not accurate mode
v3: Cs * As/Af is not an accumulation
Those cases don't need the Cd addition and were already optimized anyway
Fix a regression on GoW2
Do DATE algo selection before blending. This way we can detect bad
interaction.
Regroup all blending/colclip in a single block. Avoid to check abe &&
rt multiple times.
v2: only enable sw blending when abe is true
The updated medium level will run for all sprites. It helps sotc blooming effect and it remains
fast enough to be enabled by default (at least on 3D games)
The new high level will run for all sprites + color clipping
The idea is that sprites are often use for post-processing effect (ofc except 2D games)
Most of the time post-processing supports SW blending with a small speed penality. SW
blending is more accurate so it is better to use it.
Sourceforge was dead for more than a week therefore add the license
information. I could not find the original TGM source (dead link) so I'm not
even sure if this still applies or if the glsl was totally rewritten. None
of the glsl files have a copyright header so it's hard to tell.
Gain: 1% at 4x on SotC (it partially compensates recent additions)
When the color is constant and equal to 128, the MODULATE mode is
equivalent to the DECAL mode. It saves 5 instructions on the FS.
Accurate options do a better jobs. Technically it can still
be useful for old gpu/driver that doesn't support the GL4.5 extension.
On Windows, you can still rely on Dx
On linux, free driver support it (except Intel)
It fixes the bad light on Silent Hill with the SW renderer.
Full story
if Q is NaN, m_vt.m_eq.q becomes wrongly true
/Q will wrongly be optimized in the "Vertex Shader" of the SW
Note: Add an assert for the STQ handler
Code path is quite hot so no need to add extra check for nothing
GS uses integer value and does integer operation too.
This commit trunc the sampled texture, the interpoled fragment color
and the product of the 2.
It impacts negatively the perf of about 3/4% (GPU) but it fixes rendering on
suikoden and potentially some others games too.
Code was completey bitrotten
Code was a partial test (and yet 500 lines already)
Shader is more and more complex and multithreading support greatly
reduce the cost of shader switch
Nvidia allows to get the ASM of the shader of the compiled shader. It is useful
to check the performance.
It also allow me to compile most of shader code path for QA
Dump is enabled in linux replayer + debug_glsl_shader = 2
Code is not yet enabled because it requires extensive test
The idea is to replace point by a 1 pixels sprite with the help of
a geometry shader. In 4x, point will be replaced by a 4x4 sprite.
Partially invalidate RT when there is a write in the middle of it (actually 2 pages below)
Code is not yet enabled because
1/ I want to stabilize latest update
2/ not sure of the impact of the code
3/ maybe it need a more generic version
Frame is always 32 bits but game can reuse it later as a 16 bits RT.
Fix half screen issue with Ricky Ponting Cricket
Unfortunately it triggers texture shuffle wrongly. I hope there is no
regression.
Fix depth issue.
First issue: RT and Depth are located at the same address.
=> solution, just lookup the depth (done for any games)
Second issue: Instead to draw a X,Y rectangle, they draw a 32 pix, 4096 pix
rectangle with a FBW of 1.
=> solution, don't bother just write the depth directly
Please someone add some CRC to enable the code
// GL42 interact very badly with sw blending. GL42 uses the primitiveID to find the primitive
// that write the bad alpha value. Sw blending will force the draw to run primitive by primitive
// (therefore primitiveID will be constant to 1)
It is mostly the texture shuffle effect which is now emulated correctly on openGL
They remain in the Dx level as speedhack in particular for
* Castlevania;
* GodOfWar;
* StarOcean3;
* ValkyrieProfile2;
* RadiataStories;
Remove old commented hack: Drakengard2, ArctheLad, ReZ
Separate hacks that are only enabled in aggressive mode
It might save a couple of fps
Add a define to test the perf if we keep only the blue channel. It brokes
the code in Prince Of Persia that use the Red/Green channel... Maybe the
speed hack :( Or find a way to replace all if with a lookup table
Note: it is only supported on OpenGL currently
Code unscale the texture to ease the conversion. Quality is awful (same as before)
but I'm not sure we can support an upscaled texture
Maybe the quality loss is due to the reduction without mipmap
Maybe the best solution will be to add an hack to extract the blue channel
(with texture swizzle), and uses a "full page/screen" spirte instead.
(it would be faster too)
Note: won't be compatible with MSAA (but gl doesn't support it anyway)
// In theory new textures contain invalidated data. Still in theory a new target
// must contains the content of the GS memory.
// In practice, TC will wrongly invalidate some RT. For example due to write on the alpha
// channel but colors is still valid. Unfortunately TC doesn't support the upload of data
// in target.
//
// Cleaning the code here will likely break several games. However it might reduce
// the noise in draw call debugging. It is the main reason to enable it on debug build.
//
// From a performance point of view, it might cost a little on big upscaling
// but normally few RT are miss so it must remain reasonable.
Game can directly uploads a background or the full image in
"CTRC" buffer. Previous code was a full black screen.
It will also avoid various black screen issue in gs dump.
hidden option: preload_frame_with_gs_data
Note: impact on upscaling was not tested and it's likely broken
Improve the rendering in MGS3 (even if the game is still broken
due to others TC issues)
// Typical bug (MGS3 blue cloud):
// 1/ RT used as 32 bits => alpha channel written
// 2/ RT used as 24 bits => no update of alpha channel
// 3/ Lookup of texture that used alpha channel as index, HasSharedBits will return false
// because of the previous draw call format
//
// Solution: consider the RT as 32 bits if the alpha was used in the past
"Regression" introduced in 8 bits RT support
The case appears when
1/ address of RT is the same as input texture
2/ input format is 8 bits
3/ previous lookup of RT was miss
It avoid various upscaling glitches on GS post-processing effect
// 1/ Palette is used to interpret the alpha channel of the RT as an index.
// Star Ocean 3 uses it to emulate a stencil buffer.
// 2/ Z formats are a bad idea to interpolate (discontinuties).
// 3/ 16 bits buffer is used to move data from a channel to another.
//
// I keep linear filtering for standard color even if I'm not sure that it is
// working correctly.
// Indeed, texture is reduced so you need to read all covered pixels (9 in 3x)
// to correctly interpolate the value. Linear interpolation is likely acceptable
// only in 2x scaling
//
// Src texture will still be bilinear interpolated so I'm really not sure
// that we need to do it here too.
//
// Future note: instead to do
// RT 2048x2048 -> T 1024x1024 -> RT 2048x2048
// We can maybe sample directly a bigger texture
// RT 2048x2048 -> T 2048x2048 -> RT 2048x2048
// Pro: better quality. Copy instead of StretchRect (must be faster)
// Cons: consume more memory
//
// In distant future: investigate to reuse the RT directly without any
// copy. Likely a speed boost and memory usage reduction.
It might help to fix a bit the color on a couple of games
accurate_fbmask = 1
Code uses GL4.5 extensions. So far it seems the effect is ony used a couple
of time and often in non-overlapping primitive. Speed impact will likely remain small
It seems to impacts lots of games that still have issue (VP2, MTG3, PoP)
The PSMT32 format is read a PSMT8. I think we need to convert it as PSMT8H (i.e.
unpack it to have only an alpha channel)
To clear a (W, H) RT/Depth, GS can only send a (W , H/2) primitive with
a Z (or RT) pointer in the middle of the buffer
Top-half will be cleared by the color (or the depth).
Bottom-half will be cleared by the depth (or the color).
Code isn't enabled yet but it was tested with success on GoW2.
GS doesn't supports texture shuffle/swizzle so it is emulated in a
complex way.
The idea is to read/write the 32 bits color format as a 16 bit format.
This way, RG (16 lsb bits) or BA (16 msb bits) can be read or written with
square texture that targets pixels 1-8 or pixels 8-16.
However shuffle is limited. For example you can copy the green channel
to either the alpha channel or another green channel.
Note: Partial masking of channel is not yet implemented
V2: improve logging
V3: better support of green channel in shader
V4: improve detection of destination (issue due to rounding)
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
Rework the renderer selection logic to reload the saved renderer after
it's been changed in the config panel and to properly detect whether a
renderer toggle has been requested.
If settings found in the registry, create ini, fill with settings and
then delete the settings stored in the registry.
If no settings found in registry, load from ini.
Changed the name of the Direct3D renderers so they would match the way
they are named in GSdx's Plugin Settings window. Also changed a printf
to say OpenCL instead of opencl.
Just use 1 in skip draw if you want to use it
openGL code will soon be fixed to support depth correctly (and I hope dx in the future)
Conflicts:
plugins/GSdx/GSState.cpp
plugins/GSdx/GSState.h
Old way various check boxes to configure the plugin
New way an unified drop down list
* Level 0 (dev only) => disable (mostly) all hacks and auto skip depth.
* Level 1 (dev only ) => enable oi/oo/cu hacks, others remains disabled
* Level 2 (GL) => enable most hacks except a couple of one that were fixed on openGL (speed impact)
* Level 3 (DX) => enable all hacks
* Level 4 => enable also aggresive CRC
Note: windows gui must be updated, and it will be nice to create a global tooltip
Gregory: Get all changes but keep C11 code path which will be the future
(if someone can find info on Visual Studio support)
* Keep the old posix api to use address sanitizer on gcc 4.9
Conflicts:
common/build/Utilities/utilities.vcxproj.filters
common/build/Utilities/utilities_vs2012.vcxproj.filters
common/build/Utilities/utilities_vs2013.vcxproj.filters
common/include/Utilities/MemcpyFast.h
common/include/Utilities/StringHelpers.h
common/src/Utilities/AlignedMalloc.cpp
common/src/Utilities/vssprintf.cpp
plugins/GSdx/stdafx.cpp
-Last commit broke Snowblind games again
-Width now based on output circuit
-Try to use the smallest possible while being at least the size of the screen
The idea is to easily extract bad frame from gs dump and to compare them
with the sw renderer.
Here the summary of the options:
savet => dump all input textures
save => dump the render target
savez => dump the depth buffer
savef => dump the frame
The idea will be to replace StretchRect for standard case with a framebuffer
blit. Potentially it toggles less gl state.
Worth a test on Star Ocean 3 that uses a lots this function for stencil emulation
A user on http://obsrv.org had an issue with freezing, unfreezing than
dying on other players screen, but can continue playing anyway. This
comment didn't end up fixing the issue of becoming a ghost, but he
didn't freeze.
Please test it!
GS supports 3 formats for the output:
32 bits: normal case
=> no change
24 bits: like 32 bits but without alpha channel
=> mask alpha channel (ie don't write it anymore)
=> Always uses 1.0f as blending coefficient
16 bits: RGB5A1, emulated by a 32 bits openGL texture. I think it will be more correct to use
a real 16 bits GL texture. Unfortunately it would cost several (slow) target conversions.
Anyway as a current solution
=> apply a mask of 0xF8 on color when SW blending is used (improve Castlevania shadow)
unfortunately normal blending mode still uses the full range of colors!
This commit also corrects a couple of blending factor. 128/255 is equivalent to 1.0f in PS2, whereas GPU uses 1.0f. So the blending factor must be 255/128 instead of 2
Note: disable CRC hack and enable accurate_colclip to see Castlevania shadow ^^
(issue #380).
Note2: SW renderer is darker on Castlevania. I don't know why maybe linked to the 16 bits format poorly emulated
When the RT is used as an input texture, we need to rescale it.
Previous behavior was to always uses a linear filtering (more smooth).
Unfortunately it broke some games that expected an exact value like Star Ocean 3
This commit will disable the linear filtering in normal filtering mode (filter = 0
or filter = 2)
This way, shadow of Star Ocean 3 will appear correctly in upscaling (not
100% perfect but can't do better)
Note: SO3 only requires a nearest sampling of the alpha channel but
I don't know the behavior for others games.
The purpose of the code is to support alpha channel
of RT uses as an index for a palette texure.
I'm afraid that code will likely break pure palette texture. Only used
if paltex is enabled
It fixes missing shadow in Star Ocean 3 (issue #374) in Native resolution
with filter = 0 (no filtering) or = 2 (normal fitering)
Rendering explanation:
The game emulates a stencil buffer with the alpha channel
The alpha channel of the RT can contains a palette texture index (format 4HH)
The idea is to have a gradient of value in the palette (16/32/48/...).
This way you can implement a +16/-16 and even wrap the alpha value every time
you hit the pixel.
Bilinear filtering breaks the rendering because it interpolates between counts
so you doesn't have the exact count
Upscaling breaks the rendering because the RT is reused as an input texture. It means
that we need to scale it down which again create some interpolations.
Still not yet enabled by default
Potentially it can be optimized with the dot product but special care
need to be taken to ensure float accuracy.
Bonus: it could work on old GPU (aka DX9)
* Dump context before the increase of s_n
=> aligned with the global call number
* Don't print colclip not supported when it is optimized away
* dettach the input texture when it is useless
=> avoid to show a wrong texture in the debugger
This way it will allow to implement all blendings operartion in FS.
Of course it will be slow, but it would be nice for debug and quickly check
game error rendering.
Currently we're trying to infer the conversion shader based on the output format
It only works if the input data is RGBA8. It might not be true in the future
The idea was to merge them later with ffmpeg or other external tool
It kinds of work but current fps is around 2 !!! So not really usable
The speed issue is related to PNG.
So either the code to store pixels data must be optimized. Or maybe it misses some MT loves :)
Currently colclip uses 2 passes to wrap the output of blending unit
However some blending mode are only a plain copy (of 0 or Cs or Cd).
So no overflow of [0:255], no need to wrap it
Note: I saw those cases in GoW.
Persistent is slower (at least on my gs dump) because data is put
in host instead of the video memory
I don't understand why upload the data directly to the video memory
is faster
Initially we copy pitch by line in the PBO and tell the dma to only
use the first valid byte.
Now, we only copy useful data to the PBO. It reduce the copy and PBO memory requirement.
It seems a bit faster on native resolution
Initially I was afraid of the size increase but it can be
higly compressed.
Sometimes image was computed inside a RT but never outputed to
the screen which remains black. It is annoying to see the glitches
Much faster for small batch that write the alpha value. Code can
be enabled with accurate_date option.
Here a summary of all DATE possibilities:
1/ no overlap of primitive
=> texture barrier (pro no setup of stencil and single draw)
2/ alpha written
=> small batch => texture barrier (primitive by primitive). Done in N-primitive draw calls.
(based on GL_ARB_texture_barrier)
=> bigger batch => compute the first good primitive, slow but only 2 draw calls.
(based on GL_ARB_shader_image_load_store)
=> Otherwise there is the UserHacks_AlphaStencil but it is a hack!
3/ alpha written
=> full setup of stencil ( 2 draw calls)
No barrier => draw all primitives
Barrier but without overlap => draw all primitives
Barrier with overlap => draw primitive by primitve
It will ease the implementation of accurate blending and why not date too
Group opengl calls into a nice name.
Apitrace shows them in a tree format that support folding. Previously it
was a long flat list (10K-40K of lines by frame)
I align the call number with the internal s_n variable. This way it is
easy to map GSdx dump output with the GL debugger :)
initialization of IDC_ROUND_SPRITE
set&get config for round offset.
three state checkbox for the hack.
define IDC for round offset.
Linux (GUI) refresh.
typo
0: don't dump input texture
1: dump input texture
Now, you can do a first pass with only RT. When you find the wrong call, you can redump the input texture of the bad draw.
Initial code use a PBO to do asynchronous transfer. It is silly because
GSdx doesn't use this free time. So let's use a sync read. Same speed but
no PBO to manage.
-- slower (but that a debug feature)
++ smaller (40x-50x)
++ native support of alpha
Require libpng++ and the define ENABLE_OGL_PNG
Note: depth is not supported yet.
This way ogl_vertex_storage must be safer to activate
And it brings a nice performance boost (game with lots of primitives and
reasonable upscaling)
SotC testcase 4x: 61fps => 78fps
If there is no overlap, it is allowed to directly read from the render target.
On SotC testcase with 6x scaling: 30fps -> 40fps
Note: it requires GL_ARB_texture_barrier extension so be sure to have a recent driver
Note2: it requires a lots of testing too
Open question: in case of complex date (written alpha)
Will it be faster to split the draw call into multiple call with no
primitive overlap
ogl_texture_storage 1 creates texture corruption.
Advance date is too slow, code need to be updated (properly) to uses 2 passes only not 3
Maybe one could be enough (sometimes)
DATE is implemented in 2 ways.
1/ with stencil
2/ purely in FS (sw)
I kept method 1 to reduce the work on method 2. It sucks for performance.
So it would be either 1 or 2.
Note: DATE has a big impact on higher upscaling
Note2: you can disable the 2nd method with this configuration parameter
override_GL_ARB_shader_image_load_store = 0
Note yet enabled because I'm afraid of data corruption but feel free to test it
The option:
ogl_vertex_storage = 1
Performance note (warm cache+gs replay on colin3)
60 fps -> 76 fps
UserHacks_UnscaleSprite = 1 will unscale flat sprites
UserHacks_UnscaleSprite = 2 will unscale all sprites (don't work well so far)
The idea of the hack is to redo the interpolation of texture coordinate
based on the non-upscaled pixel position.
It avoids various glitches but sprites aren't upscaled anymore (so no
more anti-aliasing, potentially a coefficient can be added).
* separate VS/GS and FS
* separate subroutine part of the FS
It already complex enough without subroutine stuff. Besides I'm not sure
we will keep subroutine on the future.
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
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
* 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"
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
-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.
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...
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.
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.
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.
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))
+ This is not yet perfect. Really, this standard seems like a load of crap to me in fact...
At least it works now. Should test again when gcc 5 & new c++ libs gets out.. Until then, it will do.
On Linux, CPUs with AVX2 instruction sets that have TSX disabled (by
microcode update or otherwise) fail to build GSdx. The __RTM__ macro is
undefined, with leads to the TSX RTM instruction set (_xbegin, _xend,
_xabort, etc.) being unavailable.
Modify the preprocessor check so that the RTM instructions are only used
if available.
I wanted to play with linux interface :)
It is far from perfect but joysticks are detected. The biggest issue is the correct generation of the config file!
It conflicts with the global definition
I don't remember why this option was set on GSdx. Potentially it could be dropped (or fixed correctly)
Anyway, it will help to enable Address Sanitizer on Linux Build
Tell the user to use CMAKE_TOOLCHAIN_FILE upon failure.
.
Cleanup detectOperatingSystem. Should be the same but adding
GNU and kFreeBSD from Debian and filtering out pre OS X Apple.
.
libaio is linux only. Also check for the correct header since
aio.h is the POSIX one. Both are in /usr/include/ anyway.
Only build core if (Linux AND NOT AIO_FOUND) == false.
.
Use Unix for GTK and X11. Macs has gtk-quartzs and xquartz or native X11.
*BSD, linux, etc should have both.
builds an Utilies_NO_TLS.a archive of the common Utilities code. It replaces native TLS by a slower reimplementation
Rational: number of TLS slot is very limited by the GLIBc on linux. I hope it doesn't impact performance.
* Zzogl don't requires TLS AFAIK
* spu2x will likely use it for assertions only.
TLS exhaustion creates issue to dlopen plugins
issue #384 : https://github.com/PCSX2/pcsx2/issues/384
But also for profiled build (-fprofile-generate)
http://forums.pcsx2.net/Thread-WORKAROUND-build-with-fprofile-generate
If someone have a better idea, please raise your hand!
Description: Building with SDL2_API=TRUE is incomplete
SDL_FOUND does not imply SDL2_FOUND
Use check_libs for detection
Only include ${SDL_INCLUDE_DIR} when needed
Use SDL2_LIBRARIES
Author: Miguel A. Colón Vélez
Gregory: add back SDL_BUILDING_LIBRARY
+ Implement threads/mutex using std::thread/std::mutex/std::condition_variable
+ Old implementation can be used by commenting out the "define _STD_THREAD_ in GSThread.h
+ Commit should be much cleaner than previous one.
Note: of course it requires a glsl shader ;)
On windows, you can set the path on the ini file. Here an example with linux path:
shaderfx_conf = /home/gregory/playstation/emulateur/pcsx2_merge/bin/GSdx_FX_Settings.ini
shaderfx_glsl = /home/gregory/playstation/emulateur/pcsx2_merge/bin/shader.fx
I need to check carefully the consequence of ABI change. So far wx is very unhappy!
Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6),
and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1006,wx containers,compatible with 2.6).
Copy the full line into the pbo. Dma will only take GL_UNPACK_ROW_LENGTH
- increase memcpy size by 2 in the pbo
+ single memcpy will be faster and can use sse
Enable buffer_storage extension:
* GL_CLIENT_STORAGE_BIT was required (it is the duty of TexSubImage to copy data into the GPU mem)
* Enable the extension by default
Null is equivalent to a clear to 0.
Note: Code is not yet used because both stencil and depth are cleared.
Future note: stencil can potentially be replaced by load_store_image
* Don't use the stack
* Don't compare MinMax parameter (depends of others)
* Don't store not-compared parameter in the cache (HalfTexel/MinMax)
+0.3fps/46fps (well better than nothing)
* Only a single VAO
=> Format is set once
=> Only a single bind at startup
=> GSVertexBufferStateOGL is nearly useless
=> barely faster but better than nothing :)
A couple of fallbacks were introduced for the Mesa driver that only support 3.0
DSA will require a recent Mesa which already support GL3.3
Require at least SandyBridge for Intel GPU
* use DebugOutputToFile as a callback of gl error. Add a breakpoint to
find the culprit GL call
* use string instead of char[n]
Note: CheckDebugLog is potentially useless now
* GL_ARB_clip_control: reduce z fighting
* GL_ARB_clear_texture: no real speed gain (but improve code quality)
* GL_ARB_bindless_texture: +1fps (if you're CPU limited)
* link common with c lib (required for gold linker)
* fix the macro to properly set the library variable
=> use the variable instead to hardcoded value
* require a 3.1 context
* unattach texture of the fbo when they're not used
(avoid to have a texture and depth_stencil with different size)
Note: except minor shader bug it works on Nvidia 340.23.01
Fixes RPMLINT warning:
pcsx2.i586: W: file-contains-date-and-time /usr/bin/pcsx2
Your file uses __DATE and __TIME__ this causes the package to rebuild when not needed
The non-stdint fallback was not even working which shows that it was never used. No supported platform would not have stdint anyway.
Remove unused code and do not restrict types to Linux and MSVC. Was there a reason for this?
* Manually cast WxGetTranslation
* Accept string as format parameter of pxWindowTextWriter
* Manually convert wxString to wide string
Note: Wx setup.h is not the same between Debian and Arch. Unfortunately it
generated various compilations errors on wx code.
Close issue #172
This doesn't update the file to the latest version from mingw32 since this is already a custom header stripped from mingw32.
This also fixes the functions for x86_64(verified that it still works for both architectures) and also updates the version inside of GSdx.
Also removes a comment in the GSdx header saying that these functions are broken since they no longer are.
deassert gsopen_done before delete the gs object. Compiler and CPU will
reordonate the store (or not because it is a global variable). Probably not
perfect but better.
Got a crash on GSKeyEvent which I guess wasn't thread safe. So let's ensure
gs is open.
There is no such thing as MGS3 Substance only Subsistence. Substance is MGS2 :P
Also this new CRC is US Disc 2 of Subsistence. The blue stripes should be fixed now I guess.
1/ initReadFifo will be first called on the GS thread
(openGL can only be done on the GS thread)
2/ readFifo will be called on the EE thread. It is not safe too access eeMem from GS
because of memory is virtual
Fix "recent" regression (crash) on Kingdom heart and others game too.
v2: add a len check on GSState::InitReadFIFO
1. After ALT-Tab to another window and back, now it accepts PCSX2
shortcuts properly (e.g. Esc or F6 etc) - focus changes were not
always recognized before.
2. If Lilypad is set to capture mouse, now it releases it on Escape. This
part is a small hack because the code looks as if it should handle it,
but in practice doesn't. This adds explicit uncapture on Escape.
* Fix to create a 3.0 GLES context
* set a default precision to fix most of shader compilation issue
* Crash later because of GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
=> need to test opensource driver
Remains 3 files that I don't know the source
pcsx2/windows/DwmSetup.cpp: *No copyright* UNKNOWN
pcsx2/windows/SamplProf.cpp: *No copyright* UNKNOWN
pcsx2/windows/VCprojects/IopSif.cpp: *No copyright* UNKNOWN
Remains 1 files in common that I don't know the source
common/include/comptr.h: *No copyright* UNKNOWN
Remains too much files in plugins that I don't know the source :(
Other instances of "svn" in filenames and such remain, but they are not high priority and I didn't want to mess with updating all the project systems.
Closes#19.
Add the --gles build option to the linux main script
Ifdef all gl code not supported on gles3 (note some will be reenabled for gles3.1)
Note: it probably doesn't run anymore. My Nvidia driver doesn't support
yet egl/gles so I can't test it. Feel free to contribute.
A bit slower. Maybe because SubData does the copy in the driver thread. My memcpy is done on
the main thread. I'm not sure it would worth an extra thread to copy vertex data to the GPU
Note: testers are welcome. You need to edit the ini file.
"ogl_vertex_storage=1" <= enable the extension
"ogl_vertex_storage=0" <= disable the extension
Again you need the support of GL_arb_buffer_storage (i.e. not catalyst)
Improve arb_buffer_storage implementation
Try harder to align the texture buffer
Strangely arb_buffer_storage is 3 times slower on my PC (nvidia)
Tester are welcome! Open the ini file
"ogl_texture_storage = 1" <= enable the extension
"ogl_texture_storage = 0" <= disable the extension
Note: you need an opengl 4.4 driver or one that support arb_buffer_storage (i.e. not catalyst)
This hack was used because GSReadFifo was called from the EE thread.
Previous commit move the call to the GSThread.
Hopefully avoid flushing the full GPU contex would improve openGL
performance (at least avoid some hiccups ;) )
Note: newer GSdx ogl won't be compatible with older PCSX2
Crashfix for a weird GIF_FLG_IMAGE2 situation in Wallace and Gromit Project Zoo. Needs further investigation.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5912 96395faa-99c1-11dd-bbfe-3dabce05a288
reduce_gl_requirement_for_free_driver => set it to 1 to only required a 3.0 context (you still required the good extensions)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5910 96395faa-99c1-11dd-bbfe-3dabce05a288
Reformatted fx files that were causing issues on certain text editors. They should now display correctly in those editors.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5897 96395faa-99c1-11dd-bbfe-3dabce05a288
Also removed the fallback recovery ps, and replaced the compile fail catch to a simple console print. Which I think is safer, and faster.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5894 96395faa-99c1-11dd-bbfe-3dabce05a288
UserHacks_AlphaStencil will take precedence on override_GL_ARB_shader_image_load_store
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5891 96395faa-99c1-11dd-bbfe-3dabce05a288
Note: DATE is used for shadows (persona 3) and others effect
You can disable it when you disable gl image extension (override_GL_ARB_shader_image_load_store = 0)
You can also enable it on AMD too (set it to 1 this time) but no guarantee.
If you feel the extension is too slow, you can try disable some gl barrier (aka "damn the torpedo full steam ahead!").
It can be done with the option UserHacks_DateGL4 = 1. Otherwise just disable the extension.
Note: don't enable UserHacks_AlphaStencil in the same time. GL_ARB_shader_image_load_store is an alternative implementation.
Enabling both in the same time will lead to undefined (well surely wrong) behavior.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5890 96395faa-99c1-11dd-bbfe-3dabce05a288
* properly detect gl nv depth extension
* Always show the hack on the gui. Add a new hack option for DATE (gl4.2) only
* Save the scan mode on linux too (f7)
* hopefully fix some crash on some drivers... (ensure aligment 256 bits alignment, and if not use std memcpy)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5888 96395faa-99c1-11dd-bbfe-3dabce05a288
Also disabled the gsdx AF options for the OGL renderer (because it's not implemented for that yet).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5881 96395faa-99c1-11dd-bbfe-3dabce05a288
Fixes a small oversight on my part. Which was setting the maximum anisotropy to (0,1,2,3,4) respectively, instead of (1,2,4,8,16). So when you selected x16 for example, you were actually only getting x4 >.>
Corrected now, and you will be getting the full x16 when selected :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5879 96395faa-99c1-11dd-bbfe-3dabce05a288
Adds anisotropic texture filtering (1x-16x) to the hardware settings. Enhances the visual quality of textures that are at oblique viewing angles.
Anisotropic filtering is automatically disabled if: 8-bit textures are enabled.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5878 96395faa-99c1-11dd-bbfe-3dabce05a288
As before: use the hotkey(f7) to switch between them. It will now save the chosen scanline effect, instead of always defaulting to disabled, on load.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5874 96395faa-99c1-11dd-bbfe-3dabce05a288
* gui refresh
+ Use some tab to reduce heigth for small screen
+ Add logz option
+ remove broken/experimental keyword. GSdx ogl is not too bad ;)
* autodetect GL_NV_depth_buffer_float
Linux tester you are welcome!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5862 96395faa-99c1-11dd-bbfe-3dabce05a288
Best setting if you driver support GL_NV_depth_buffer_float => GL_NV_Depth = 1 & logz = 0
Otherwise => GL_NV_Depth = 0 & logz = 1
Explanation of the bug:
Dx z position ranges from 0.0f to 1.0f (FS ranges 0.0f to 1.0f)
GL z Position ranges from -1.0f to 1.0f (FS ranges 0.0f to 1.0f)
Why it sucks:
GS small depth value will be "mapped" to -1.0f. In others all small values will be 1.0f! Terrible lost
of accuraccy.
The GL_NV_depth_buffer_float extension allow to set the near plane as -1.0f.
So
"GL z Position ranges from -1.0f to 1.0f (FS ranges 0.0f to 1.0f)"
will become
"GL z Position ranges from -1.0f to 1.0f (FS ranges -1.0f to 1.0f)"
and therefore
"z posision [0.0f;1.0f] will map to FS [0.0f;1.0f]" as DX
Yes we just get back all precision lost previously :)
However you need hardware (intel?) and driver support (free driver?/gles?) :(
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5860 96395faa-99c1-11dd-bbfe-3dabce05a288
* use same path as game index db for cheats and cheats_ws
* install the new cheat zip file on cmake and debian installer
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5850 96395faa-99c1-11dd-bbfe-3dabce05a288
This fixes the crashes on F9 for me. We don't want to call GSgetTitleInfo2() when GSOpen() isn't finished yet.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5834 96395faa-99c1-11dd-bbfe-3dabce05a288
WinXP should be exempted from Portaudio as the default for now.
It has a large latency with DirectSound compared to direct use and XA2 isn't available at all.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5823 96395faa-99c1-11dd-bbfe-3dabce05a288
The preferred audio output module is PortAudio, so making it the default under Windows now (it is already on Linux).
It will use wasapi mode with the default sound device by default, both are configurable though.
This setup gives us better latency and a higher time stretch polling frequency, resulting in better quality overall.
With this we can also lower the main latency default from 150ms to now 100ms.
There is no error checking for the wasapi mode selection yet, as I don't know how this should be done.
Help would be appreciated (gigaherz!) :p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5821 96395faa-99c1-11dd-bbfe-3dabce05a288
HTB123 on our forums came up with a hack that removes the broken main character shadow in hardware rendering
in SMT Nocturne.
This should work for all GSdx recognized versions / regions of the game (tested EU and NTSC-U).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5819 96395faa-99c1-11dd-bbfe-3dabce05a288
* restore the old fxaa (Asmodeam will be integrated when I got time)
* port the recently added new scanline algo
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5818 96395faa-99c1-11dd-bbfe-3dabce05a288
Add another scanline algorithm, made by pseudonym. This one is pretty fancy, using a cosinus function for generating the dark lines.
It only works on unscaled output, so use software rendering or native resolution for hardware.
It's an effect that works best on 240p converted games (like the SNES titles in Mega Man Collection).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5812 96395faa-99c1-11dd-bbfe-3dabce05a288
Finish up my scanlines attempt. Now the 2 old shaders are back in and all 3 cycle on F7.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5809 96395faa-99c1-11dd-bbfe-3dabce05a288
cmake: don't strip by default the binary in release mode
gsdx: disable the regeneration of ogl shader
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5806 96395faa-99c1-11dd-bbfe-3dabce05a288
Slight adjustments to positions in the GUI also (OCD'd the spacing a little :P)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5796 96395faa-99c1-11dd-bbfe-3dabce05a288
- FXAA shader replaced by Asmodeans shader suite 'PCSX2 Fx 2.00 Revised'.
This is an entire enhancement suite with many configurable options like FXAA, texture sharpening
or lighting tweaks. Some of the effects are pretty advanced so kudos to him allowing it to be integrated with GSdx! :)
Note that there's no interface for the tweaks yet. Until those are done, the defaults will be used.
Release thread here: http://forums.pcsx2.net/Thread-Custom-Shaders-for-GSdx?pid=334766#pid334766
- Disabled an option from the widescreen patches for SH:Shattered Memories.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5793 96395faa-99c1-11dd-bbfe-3dabce05a288
* allow to control the gl dectection from the gui (+1 for the user-friendliness ;) )
* disable geometry shader by default on Intel driver
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5783 96395faa-99c1-11dd-bbfe-3dabce05a288
Added a check box and config code for the fxaa shader.
It's not currently hooked up since the shader setup might get replaced in a day or two.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5777 96395faa-99c1-11dd-bbfe-3dabce05a288
Added a simple scanlines filter (2nd one activated by F7). No tweaking done yet.
It shows how to get scanlines that aren't affected by input resolution or scaling.
A good next step would be determining the exact number of dark lines to show :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5770 96395faa-99c1-11dd-bbfe-3dabce05a288
Removed some missing headers from the vs2010 and vs2012 project files that were causing vs to always claim the projects were out of date.
Also removed some other entries for c/cpp files that were disabled but also missing (I did not search exhaustively).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5763 96395faa-99c1-11dd-bbfe-3dabce05a288
(Did this through the google code file editing so if it's broken i apologise :P )
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5762 96395faa-99c1-11dd-bbfe-3dabce05a288
* new option SDL2_API
* drop GLSL_SHADER_DIR. Useless, shaders are embedded in .h file
* use some hardening flags (for the moment only basic one)
onepad:
* port the code to SDL2 (Note only SDL1 is supported for the moment)
* improve detection of button vs axis (long-standing issue)
* avoid potential overflow on mouse mouvement detection
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5756 96395faa-99c1-11dd-bbfe-3dabce05a288
* try to use more subroutine on VS&PS, unfortunately hit a driver crash!
* Call Attach/DetachContext through GSDevice so I can unmap currently mapped buffer
* Implement glsl part of GL_ARB_bindless texture, again hit another driver crash!
* various fix of GL_ARB_buffer_storage. Basic benchmark show only improvement on 'cold' case, I guess it will improve smoothness
* try to fix GL_clear_texture, no success so far. It seem the extension is limited to basic texture (aka no depth/stencil)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5752 96395faa-99c1-11dd-bbfe-3dabce05a288
Next commit will include some cleanups, and I'll probably also remove the dynamic-tunning and related support code (not a lot of code though, but.. it's currently unused). I'm also considering completely removing the old stretcher from the code, such that both dynamic-tunning and the old stretcher will only live in SVN history.
Meanwhile, you can test this patch and report back here if you notice a difference. BTW, on my system I use the portaudio output since IIRC it offers the lowest latency.
As before, to display stretcher messages at the console, enable underrun/overrun messages at the SPU2X debug UI (which is also available on normal builds).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5729 96395faa-99c1-11dd-bbfe-3dabce05a288
Performance note, it might be faster to replace the MODULO with an AND. Not sure on the impact
for the new time stretcher algo.
GSdx: fixed use-after-free (linux)
PCSX2:
* add a define to support address sanitizer (both rely on 0x20000000-0x3fffffff memory ranges..)
* sio_buffer out of bond (-1). Maybe we can move the flush in the 2 if previous branch. It would
avoid the extra test.
* wxGetEnv (linux) generates double free (maybe not thread safe). Cache the result so it doesn't crash
anymore when switching renderer
Comment/Review/Improvement are welcome :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5727 96395faa-99c1-11dd-bbfe-3dabce05a288
* GL_ARB_shader_subroutine for perf
fix for nvidia => add missing shader declaration. Nvidia got +4fps on colin3 :)
For the moment only 2 PS parameters are supported. Code need to be extended to support others games that often
switch shader program (like xenosaga).
require GL4 class hardware and the option override_GL_ARB_shader_subroutine = 1
Note: strangely on AMD linux it is slower!
* GL_ARB_shader_image_load_store for accuraccy (Date)
Use a signed integer texture and reenable color buffer writing
Current status: Amagami_transparency.gs & P3_battle_shadows.gs are now working on Nvidia with a small perf impact.
Current implementation detail:
1/ setup the standard stencil as before
2/ on remaining pixel, draw once to compute first primitive that will write a fail alpha value.
3/ final draw based on primitive id of step 2
Note: I think we would get a bad behavior if depth test&mask are enabled on step 2/3
Note2: on my limited testcase the perf impact was on CPU. It would be possible to merge step1&2 to nullifying it (could
even be faster actually), however it would require more GPU power.
Again require GL4 class hardware. And the option UserHacks_DateGL4 = 1
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5725 96395faa-99c1-11dd-bbfe-3dabce05a288
zzogl: fix memory leak (fix#1431, #1432)
GSdx ogl: disable geometry shader on Nvidia/Windows (I will wait a 3rd implementation to find which one is correct)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5724 96395faa-99c1-11dd-bbfe-3dabce05a288
* redo most of the texture upload (PBO): colin3 benchmark: 32 fps now (vs 26 fps 2 weeks ago)
* use the cross vendor vsync extension on linux (previous wasn't supported by nvidia)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5721 96395faa-99c1-11dd-bbfe-3dabce05a288
* some preliminary work to test/benchmark bindless texture in the future (glsl was not yet updated)
Bindless texture allow to get a GPU texture pointer and then set it directly
to the shader as a basic uniform.
=> no more texture unit selection/validation
=> no more texture validation neither texture hash lookup
3rdparty: update gl header to the latest gl4.4
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5720 96395faa-99c1-11dd-bbfe-3dabce05a288
Card that support gs:
remain only a gs to generate sprite from a line. Even dummy gs are costly for the GPU.
Card that don't support gs:
remove useless copy of color for line and triangle primitives
Note for dx: opengl 3.2 (maybe not gles) supports both flat interpolation
convention (GL_FIRST_VERTEX_CONVENTION or GL_LAST_VERTEX_CONVENTION). It might
be possible to shuffle vertex index to put the last vertex in first position.
- buff[0] = head + 0;
- buff[1] = head + 1;
- buff[2] = head + 2;
+ buff[0] = head + 2;
+ buff[1] = head + 1;
+ buff[2] = head + 0;
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5718 96395faa-99c1-11dd-bbfe-3dabce05a288
The idea was to replace shader program swith by pointer function calls inside
shaders. At least parameters that are often changed between draw call. So far
I only ported atst and colclip. Unfortunately code is "slower" (on GSdx standalone).
For the moment keep the code but disabled.
If I understand well the validation of program is done in the "driver thread"
but the additional call are done in the overloaded MTGS thread. Apitrace
profiling shows faster GPU draw calls. Another possibility is that the driver still
need to validate the draw call because of others state change.
Here some stats on colin3 (90 frames):
without subroutine: UseProgram 125246
with subroutine: UseProgram 2906, subroutine 125945 => 3605 extra calls overhead (not
all parameters are ported to subroutine)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5715 96395faa-99c1-11dd-bbfe-3dabce05a288
Note: I think we can do the same on DX11
Perf wise: on colin mcrae 3 it reduces shader prog setup from 3005 to 2086 each frames. It saves 2 ms of CPU processing (27->29fps)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5714 96395faa-99c1-11dd-bbfe-3dabce05a288
* move most of gl states into a separate namespace. Extend it to depth/stencil/blend micro state
=> save 10,000 opengl call by frame for colin mcrae 3
* Only setup blend state of first drawbuffer
* Don't request anymore a debug context on dev/release build
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5713 96395faa-99c1-11dd-bbfe-3dabce05a288
* clean extension management and fix compilation of previous gl44 code.
* Use pixel buffer object to upload texture data.
=> avoid crash on AMD driver
=> a bit faster and probably got some margins for the future
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5712 96395faa-99c1-11dd-bbfe-3dabce05a288
* preliminary work for GL4.4 extensions (ARB_clear_texture & ARB_multi_bind). Disabled until I got a 4.4 driver
Note: I plan also to use ARB_buffer_storage
* compute texture gl option in the constructor (avoid a couple of swith case)
* redo texture unit management. Unit 0-2 for shaders, Unit 3 for texture operations. MultiBind will allow to bind
shader input without disturbing texture binding points.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5711 96395faa-99c1-11dd-bbfe-3dabce05a288
* add a non-working hack: UserHacks_DateGL4, goal was to replace UserHacks_AlphaStencil
+ Detection of good/bad samples is based on primitive ID variable. However I'm not sure
the behavior is always the same between draw call...Anyway let's keep a copy of the current
work
* Dump integer texture into text csv
* add gl4.2 ARB_shader_image_load_store extension (needed by UserHacks_DateGL4)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5707 96395faa-99c1-11dd-bbfe-3dabce05a288
* allow to switch renderer with F9
* skip first frame in stat of the replayer
* drop msaa. Fxaa and internal resolution will do the job
* move texture attachment from texture object into device object (allow to keep sanely the state)
* split the write buffer and attachment setup
* completely split sampler and texture input setup
* redo GSDeviceOGL::CopyOffscreen to avoid an extra copy.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5704 96395faa-99c1-11dd-bbfe-3dabce05a288
* use gles header file, disable opengl code (mainly GLX, ARB_sso, geometry shader)
* Define properly the function pointer, GLES use basic linking whereas GL must get the symbol dynamically
* cmake: properly search and set libglesv2.so
* don't use dual source blending => HW renderer work (only miss unimportant FBA)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5701 96395faa-99c1-11dd-bbfe-3dabce05a288
* uniform was wrongly set before the activation of the program (free driver only)
* Always use only 1 drawbuffer. Easier besides previous setup was wrong for convert:ps_main1
GLES trial (v3):
* add the cmake option GLES_API. Note library (libgles) are hardcoded for the moment
* Disable opengl check
* Disable gl_GetDebugMessageLogARB not supported!
* Emulate gl_DrawElementsBaseVertex, add manually the index offset (surely slow but work)
* Fix hundred of shader error (no implicit cast of integer to float...)
Unfortunately GLES doesn't support dual blending so no blend in hardware renderer. Otherwise it is fine
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5700 96395faa-99c1-11dd-bbfe-3dabce05a288
* replace vertex interface with block interface. It avoid to depends on the ARB_sso extension.
* disable geometry shader on Nvidia & Linux. Slower but better than a black screen !
* default logz to 1, avoid some glitches.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5699 96395faa-99c1-11dd-bbfe-3dabce05a288
* redo glsl2h.pl script to generate only one big glsl headers.
* fix gcc warning in GSVector.h
* fix memory leak of GSDeviceOGL.m_shader
* clean shader compilation function => split generation header & drop malloc stuff
cmake:
* only rebuild shader when asked by the use. Avoid perl dependency to build pcsx2
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5698 96395faa-99c1-11dd-bbfe-3dabce05a288
* remove the possibility to compile shader from file. Some people loads older shaders...
The feature might be readded later
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5697 96395faa-99c1-11dd-bbfe-3dabce05a288
* try to setup advance gl context attribute. If driver doesn't support it fallback to the default.
zzogl:
* use glsl2h to generate an header shader as GSdx. Much easier to install
* Get GSUniformBufferOGL & GSVertexArrayOGL speed improvement from GSdx
cmake:
* detect current gcc version. Yield a warning if < 4.7 or an error if < 4.5
glsl2h:
* support zzogl too
* compute md5sum to avoid useless relink
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5696 96395faa-99c1-11dd-bbfe-3dabce05a288
* remove unused variable
* move static function from h into cpp
* Initialized hw_by_page to 0xFFFFFFFF instead of -1 (number must be a positive integer)
* Use a s32 fore m_current_lsn instead of u32 (use -1 as error code)
Bonus: a couple of fix for clang compiler (doesn't mean that it fully compile with clang)
* remove useless __debugbreak on linux
* use short for 16bits atomic function
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5695 96395faa-99c1-11dd-bbfe-3dabce05a288
* remove iconvert.cpp not used anymore
* change copyrigh header from GPL to LGPL. Those 2 files are only basic .h. 1 licence by plugin is enough ;)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5691 96395faa-99c1-11dd-bbfe-3dabce05a288
* fix shader compilation on Nvidia (broken on r5682)
* fix various memory leak thanks to Valgrind
Cmake: fix a minor typo
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5688 96395faa-99c1-11dd-bbfe-3dabce05a288
* use svnrev.h on linux too
* replace sprintf_s with snprintf (hope it still compile on Windows)
* init integer with 0 instead of NULL
* various int -> u32/uint32/uint on for loop index
* remove a couple of unused variable
* init few variable
* disable unused warning results
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5683 96395faa-99c1-11dd-bbfe-3dabce05a288
* Separate state and shader compilation into separate function
* replace various hash_map by basic array
* Compact VertexScale and offset into a single vec4
* add the new option "ogl_vertex_subdata": subdata is faster on FGLRX, test are welcome on Nvidia drivers
0 => use map/unmap
1 => use subdata
replay: add "linux_replay" option and compute some nice stat (mean, standard deviation)
cmake: recreate shader header at build time
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5682 96395faa-99c1-11dd-bbfe-3dabce05a288
* don't delete the wnd in GSclose. It can still be used later
* Properly detect the GL_ARB_gpu_shader5 extension for Fxaa
* A couple of fix in Create (GSopen1) of GSWndEGL/GSWndOGL
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5674 96395faa-99c1-11dd-bbfe-3dabce05a288
* add exception in GSWndEGL and GSWndOGL
* Try to use EGL when GLX failed => you don't need any flags for the opensource driver ;)
cmake: don't install anymore the glsl shader
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5671 96395faa-99c1-11dd-bbfe-3dabce05a288
gsdx:
* move gl function loading into GSwnd. Clean the header and avoid to rely on macro.
* Always require libegl for GSdx. You still need to select the API at compilation.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5670 96395faa-99c1-11dd-bbfe-3dabce05a288
* update linux dialog: create a custom shader box and put it Shade boost and Fxaa
* force the reloading of the inifile after any configuration update.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5666 96395faa-99c1-11dd-bbfe-3dabce05a288
Now the brach is ready to be merged :)
Dears Window users. If you can test that:
1/ still compile
2/ still running on DX
3/ can run with opengl
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5663 96395faa-99c1-11dd-bbfe-3dabce05a288
* Don't write color during stencil. Keep the old method to ease debug
* Realign date shader on DX
* keep stencil ref to 1. Reduce stencil management burder
* Fix texture pitch (was in pixels but need bytes). Fix Bleach Blade Battlers 2. Thanks Miseru for your trace
Remember note:
fxaa -> not yet implemented
msaa -> not implemented (I might drop it actually)
8 bit texture -> not yet implemented
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5657 96395faa-99c1-11dd-bbfe-3dabce05a288
* detect Advanced Micro Devices for newer AMD Card...
* Mess with coordinate for StretchRect. Upscaling seem to work now. Surely the biggest diff between ogl and dx...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5655 96395faa-99c1-11dd-bbfe-3dabce05a288
* factorize sample object creation
* remember frame buffer attachment state
* Use a basic context on EGL. Allow to use Mesa 9.1 on AMD GPU.
* precompile vertex and geometry shader to avoid benchmark polution on replay
* Try harder to detect FGLRX driver on window
* various clean
Remain to fix the coordinate system for upscaling
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5651 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fix shader alpha issue. Hoppefully fix lots of glitches.
* Use glBufferSubData to upload data into the constant buffer instead of map/unmap. More fps :)
* Fix wrong api setup on EGL
* Be more portable on glsl2h
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5650 96395faa-99c1-11dd-bbfe-3dabce05a288
- 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
* clean texture management & use different texture unit for various texture operation
* separate sampler and texture setup
* Always disable GL_SCISSOR_TEST before any cleaning to be sure the all pixels are reset
* properly set upscale_multiplier in the linux gui (was mixed with msaa). Unfortunately it is still broken...
* Fix EGL with GSopen1
* Use stdcall for function definition in the replay (avoid segmentation fault)
* Directly use gl_Position in shader instead of an extra user defined variable
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5648 96395faa-99c1-11dd-bbfe-3dabce05a288
* replace most OGL_FREE_DRIVER with a dynamic detection. Remains the context creation. Closed drivers need 3.3
* Add the CopySubImage fallback
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5647 96395faa-99c1-11dd-bbfe-3dabce05a288
* Emulate Geometry Shader from the CPU.
* add some option to override opengl extension detection
* redo shader interface (again) to compile on the free driver
SW renderer is now working on the free driver.
To test it on your linux box use this cmake option -DEGL_API=TRUE
Note: (need opengl 3.0) I test mesa 9.2 git
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5646 96395faa-99c1-11dd-bbfe-3dabce05a288
* fix a bad interaction when GL_ARB_SSO is supported without GL_ARB_shading_language_420pack
* try to replace struct with flat parameter in glsl interface
=> with some hacks of the free driver, I was able to compile SW renderer shader. Unfortunately
the rendering is broken. Maybe my hack :p
* remove EGL context check (wasn't working as expected)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5644 96395faa-99c1-11dd-bbfe-3dabce05a288
* fix wrong interaction when both GL41 or GL42 aren't supported
* Add a new define to downgrade opengl requirement to test the free driver and EGL
=> As far as I can tell, they only miss geometry shader& GLSL150 (got GLSL140)
* Found a way to avoid crash in AMD driver. Skip the upload of small texture but rendering is wrong now...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5643 96395faa-99c1-11dd-bbfe-3dabce05a288
* remove an old&useles dummy geometry shader (was used to workaround amd bug)
* use a basic X11 window for GSopen1
* redo the replayer: it is now based on dlopen rather than standard static/dynamic library. AMD driver doesn't play nicely with the later...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5639 96395faa-99c1-11dd-bbfe-3dabce05a288
* replace both DISABLE_GL41_SSO and DISABLE_GL42 macro with a dynamic check based on the extension support
* glsl2h: use static instead of extern
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5636 96395faa-99c1-11dd-bbfe-3dabce05a288
* add a perl script to convert shader to char*
* By default use *.glsl file (handy to do some trials).
Only drawback, glsl2h need to be manually called at the moment
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5632 96395faa-99c1-11dd-bbfe-3dabce05a288
* workaround AMD driver bleding issue (got at least a nice rendering in GoW)
* would run on the opensource driver when they support geometry shader
Stil got some crash on the driver. Arg!!!
FGLRX user if you want to do some trials
uncomment #define DISABLE_GL41_SSO in GSdx/config.h
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5630 96395faa-99c1-11dd-bbfe-3dabce05a288
* Use bigger index for Uniform buffer to avoid any collision with sampler.
* add a new config to disable openGL 4.2 requirement. Would be done at runtime later.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5620 96395faa-99c1-11dd-bbfe-3dabce05a288
It wasn't the suspicious code, that actually seems to be correct. The rempty() case should now be unnecessary except in case of bad register settings, but that's outside of our control so it needs to stay until code's added for that case. A console warning would be appropriate.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5612 96395faa-99c1-11dd-bbfe-3dabce05a288
* bump minimal requirement to opengl 2! Basically any Dx9 class hardware. On intel you will need a gen4+ GPU.
* remove the bad quality integer texture to use only texture float. Again need an gen4+ Intel GPU. Opensource users: Mesa must be built with support of texture float (stupid patents)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5603 96395faa-99c1-11dd-bbfe-3dabce05a288
VS2008 is harder to do as there is no automatic downgrader tools for the solution files, sorry.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5602 96395faa-99c1-11dd-bbfe-3dabce05a288
Changed the stack init hack so it is consistent on plugin resets and removed a part of it that broke OPL.
Hopefully this works for all use cases, but we should fix the initial problem anyway.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5601 96395faa-99c1-11dd-bbfe-3dabce05a288
WinPcap version is 4.1.2 and only the /include and /lib folders of their developer pack are included.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5599 96395faa-99c1-11dd-bbfe-3dabce05a288
Most of the work done by Rama, I just integrated the vcxproj.
Only done for vs2010, vs2008 or vs2012 will have to wait.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5595 96395faa-99c1-11dd-bbfe-3dabce05a288
* port KrossX patch from r5556 to openGL
* add a basic gui entry, would love an additional description
* also add the pointsampler hack but don't activate it yet
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5570 96395faa-99c1-11dd-bbfe-3dabce05a288
Should fix the VS2012 project files for when only VS2012 (and not VS2010) is installed.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5557 96395faa-99c1-11dd-bbfe-3dabce05a288
* Don't try to allocate a "null" array when shader log is empty
* glsl: hopefully implicit cast error on Nvidia driver
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5542 96395faa-99c1-11dd-bbfe-3dabce05a288
* initialize the context status variable that take care of some startup hang
* cmake: don't link and compile EGL when it isn't requested
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5528 96395faa-99c1-11dd-bbfe-3dabce05a288
* implement GSWndEGL copy/pasted from zzogl.
* remove linux debugging shader that failed to compile on window
* add additional debug message during context creation
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5520 96395faa-99c1-11dd-bbfe-3dabce05a288
* Remove bad redefinition of glActiveTexture and glBlendColor pointer
* Remove glew dependency on linux
* s/OGL_DEBUG/ENABLE_OGL_DEBUG/ and enable it on debug
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5512 96395faa-99c1-11dd-bbfe-3dabce05a288
* move GL loading function into its own namespace
* Use manual GL loading on linux too and mostly drop glew dependency. (Not 100% clean we are still depends on some glew define, it will be fixed later)
Note: shaders still need to be copied manually from GSdx/res to bin/plugins
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5510 96395faa-99c1-11dd-bbfe-3dabce05a288
* Update project files
* basic compilation fix: include stdafx, s/uint/uint32/
* add selection of the opengl renderer/device in gsopen
Remain to fix opengl function declaration/initialization
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5505 96395faa-99c1-11dd-bbfe-3dabce05a288
* fix C compilation issue
Remain 2 issues with VCS:
1/ need to add 3rdparty dir as include dir (zzogl seem to import common\vsprops\3rdpartyDeps.props)
2/ need to add opengl32.lib as additional lib
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5503 96395faa-99c1-11dd-bbfe-3dabce05a288
Just adding a log to devel builds. This is a curious case we want to be notified about.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5478 96395faa-99c1-11dd-bbfe-3dabce05a288
We need to figure out what real hardware does with it but for now let's disable the effect engine in that case.
Affected games: Summer Beach Volleyball and 18 Wheeler.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5445 96395faa-99c1-11dd-bbfe-3dabce05a288
* move all remaining glx into the dedicated GLwin object
* rework a bit WGL to separate opengl context and window creation (like linux actually)
gsdx: Allow to control vsync. Not sure I used the good extension.
cmake:
* check that EGL opengl context creation
* Shut up gcc warning when force inline might not work...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5437 96395faa-99c1-11dd-bbfe-3dabce05a288
Also, check both cores rather than the current core, that was a mistake.
Speed-- again.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5425 96395faa-99c1-11dd-bbfe-3dabce05a288
* EGL is the interface between the window and opengl. The purpose is to replace GLX/WGL in a crossplatform way.
Unfortunately so far only opensource driver use it (need not yet released mesa 9.0)
* clean most of the legacy GSopen1 window management. Only keep a basic window for debug with replayer.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5422 96395faa-99c1-11dd-bbfe-3dabce05a288
Added loading of external shaders, coded by KrossX (thanks again :p ).
Right now it looks for a file called "shader.fx" in PCSX2's main directory.
If it finds one, the PageUp key activates the external shader (instead of the built-in FXAA).
We have a forum thread for some nice shaders to try out here:
http://forums.pcsx2.net/Thread-Custom-Shaders-for-GSdx
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5390 96395faa-99c1-11dd-bbfe-3dabce05a288
NOTE: The 'glew' project does NOT build yet, but it will have to be decided how to approach the problem (String literal too long in glew.rc)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5382 96395faa-99c1-11dd-bbfe-3dabce05a288
cmake: take the opportunity to drop the support of 3rdparty compilation. Distributions have got a more recent version of zlib/soundtouch anyway.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5376 96395faa-99c1-11dd-bbfe-3dabce05a288
* add some dummy shader. Can be modify inside the debugger apitrace
* glclear* commands` seem to depend on scissor test and depth mask. Allow full write for the depth buffer
* texture debug, try to output some nice colors for the depth buffers
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5365 96395faa-99c1-11dd-bbfe-3dabce05a288
* properry separate both GLSL implementation
* glsl4: Use a define for logz instead of extra math computation. Much more easier to understand
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5364 96395faa-99c1-11dd-bbfe-3dabce05a288
Probably only of interest to testers (and me). Absolutely do NOT select the reference device even out of extreme morbid curiosity. It's not even very good at being a reference despite being slower than you can probably believe.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5358 96395faa-99c1-11dd-bbfe-3dabce05a288
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
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
Thanks for reporting.
(Also replaced broken Chinese characters in comments.)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5330 96395faa-99c1-11dd-bbfe-3dabce05a288
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
GSdx Hackfixes: Lego Batman changed to aggressive list, doesn't really fix ingame and breaks the title screens.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5328 96395faa-99c1-11dd-bbfe-3dabce05a288
- Removed the #define DISABLE_CRC_HACKS (since it's at the GUI now).
- reverted r5315 and r5319 (which prevented gs dumps to have a correct CRC).
- Restored the functionality of these revisions via simple skip of the other hack calls.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5320 96395faa-99c1-11dd-bbfe-3dabce05a288
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
gsdx:
* add some parenthesis to shup up very verbose gcc warning
* adapt ogl to latest sudonim change
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5290 96395faa-99c1-11dd-bbfe-3dabce05a288
* properly delete program and vertex array. Avoid a crash on plugin reload
* reset shader state. Avoid to reuse invalid data on plugin reload
gsdx:
* add an hack to unattach/attach the gl context from different thread. Help to solve some crashes. The best will be to move gpu operation out of gsreadfifo but it would need more works
* implement logz for test purpose (don't seem to help)
gsdx replay:
* use default xdg location
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5289 96395faa-99c1-11dd-bbfe-3dabce05a288
Explanation, because this gives me a headache and this might save someone else one (or I might be wrong and they might see why): in D3D10, 0.0 points to the centre of the leftmost texel and 1.0 points one texel to the right of the rightmost texel, so to map a UNORM uniformly across a texel we need to multiply the input by (w-1)/w. In D3D9 0.0 points to the left edge of the leftmost texel and 1.0 to the right edge of the rightmost texel so after the multiplication we add 1/2w.
Actual texture sampling is probably not right for at least one of D3D9 and D3D10, but this headache is killing me.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5279 96395faa-99c1-11dd-bbfe-3dabce05a288
* add a script to run cg compiler on glsl file:
+ handy to check the syntax
+ output the asm of the shader
- unfortunately don't support latest glsl construct but better than nothing
* really delete resources before context destruction
* wanted to play with opengl3 timer for profiling but not conclusive, just keeping code around for future use
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5278 96395faa-99c1-11dd-bbfe-3dabce05a288
Also set the auto deinterlace mode in GSdx when the .ini isn't present (instead of "none").
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5270 96395faa-99c1-11dd-bbfe-3dabce05a288
* I miss some ending bit.
* Use a full int for GSvsync
* fix a small memory link
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5269 96395faa-99c1-11dd-bbfe-3dabce05a288
The following dup CRCs of were removed (leaving one):
0x7D4EA48F - Haunting Ground EU (now only Genji).
0x1A85E924 - DMC3 CH (now only GOW1)
0x7ACF7E03 - Spyro New beginning (now only ICO)
The following CRCs were removed without any negative effect:
0x2F123FD8 - GOW2 RU (same as US).
0x23A97857 - Star Ocean 3 JPUNDUB (same as US).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5255 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fix context code for the common shader and set the indices for the uniform... (will fix most of GLSL-related black screen issue)
* some memory improvements were not merged from zzogl-dev branch
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5252 96395faa-99c1-11dd-bbfe-3dabce05a288
glsl4: Replace some define with function (ogl4 support function pointer). Explain how depth is computed in vertex shader
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5233 96395faa-99c1-11dd-bbfe-3dabce05a288
- Added "Aggressive-CRC" checkbox at the HW hacks section of the config dialog.
- The following hacks are now activated only in aggressive mode:
- God of War 2: disable water effect/lines, disable global haze.
- FFX, FFX2, SSX3 (the full crc hack from r5214).
- Shadow of the Colossus: disable (over)bloom.
- Reverted the Valkyrie Profile 2 hack to pre- r5214.
- Some CRC fixes by comments on r5214.
- Regression fix of dynamic crc hack (INITIAL_MODE = 0 didn't compile)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5221 96395faa-99c1-11dd-bbfe-3dabce05a288
* properly release shader in release mode
* set stream format every time an array buffer is bound
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5219 96395faa-99c1-11dd-bbfe-3dabce05a288
.
Allows to have a single dynaCRC DLL for several games, differentiated by their CRCs by using the new utility IsCRC(0x12345678, 0x87654321, ...).
Note: With old GSdx (and updated new DynaCrcHack.c), IsCRC always returns false.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5215 96395faa-99c1-11dd-bbfe-3dabce05a288
- 14 Updated hacks, 41 new hacks (See full list at the first comment).
- New crc-hacks might have patial crc lists, so it's possible that some copies won't get the benefit (yet).
- Non crc-hacks code was NOT imported from Cutie, so some crc hacks might not be as effective as within Cutie itself.
- New region: CH, few more CRCs.
Note:
Due to the very big list of affected games, I couldn't test the vast majority of them, and so your help would be appreciated in testing. Please report (even if someone else already reported with the same result as yours) with the following format:
<game name> - <better/worse/same> (reason) - tested <little/medium/much>
e.g.:
Tomb Raider Legend - Better (removes garbage graphics) - tested a little.
GTA San Andreas - Better (removes ghosts) - tested a little.
And of course, big thank you goes to the author of Cutie, for the time put into improving PCSX2, and for respecting the GPL license and releasing the code.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5214 96395faa-99c1-11dd-bbfe-3dabce05a288
* some parameters was set after the shader setup. Extend the API to do the shader setup before the draw
* remove the useless shader compatibility bits
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5212 96395faa-99c1-11dd-bbfe-3dabce05a288
* fix properly context, directly save the state in the shader
* replace the last deprecated variable in the shader. Remain the issue that host enable 1 output and the shader write 2 outputs
* It seems that VBO does't depends on the VAO but vertex format depends on both VBO/VAO so I set the format multiple time. Not sure the behavior is fully correct
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5211 96395faa-99c1-11dd-bbfe-3dabce05a288
zzogl: rework the shader interface to use struct like CG. Shader are still broken because some variables (gl_color & gl_secondary_color) are not supported in vertex shader...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5209 96395faa-99c1-11dd-bbfe-3dabce05a288
* use 128 vertex buffer instead of 512 that will avoid to fill the GPU vram
* Use separate shader infrastructure for GLSL 4 as Nvidia cg. Beside code is much easier to understand
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5208 96395faa-99c1-11dd-bbfe-3dabce05a288
various: apply some patch of Micove to disable debug logging in GSdx release mode
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5206 96395faa-99c1-11dd-bbfe-3dabce05a288
* Clean the zzsetparameter API to always use the program for uniform that depends on the program. Future goal is to use a nice OO interface
* Use uniform buffer. Would allow future optimization and remove most initialization stuff. Don't support yet the 2 zzogl contexts.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5201 96395faa-99c1-11dd-bbfe-3dabce05a288
* drop hack for of Natty and use the std FindGtk2 module, time to upgrade to Precise.
* Bump cmake requirement to 2.8.5 to avoid multiarch issue
* Create new cmake variable GLSL_SHADER_DIR for glsl file. Default value /usr/share/games/pcsx2
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5200 96395faa-99c1-11dd-bbfe-3dabce05a288
pcsx2: don't print window title in fullscreen because it create a white frame flickering. Seem like a wx regression
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5199 96395faa-99c1-11dd-bbfe-3dabce05a288
* Add 2 new dev options: REBUILD_SHADER (nvidia cg) & BUILD_REPLAY_LOADERS
* zzogl-pg-cg will use the shader of zzogl-pg.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5190 96395faa-99c1-11dd-bbfe-3dabce05a288
* add some code to support OGL4 debugging. Not enable on CmakeList.txt by default
* LOAD_PS/LOAD_VS were using a "std" argument instead of a reference.
* reuse the opengl context creation developed for GSdx. For the moment only enable OGL2
* Add some documentation for the zzShader API
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5188 96395faa-99c1-11dd-bbfe-3dabce05a288
* for the moment only the SW render is supported, hopefully HW will come some day. And linux only for the moment.
* Require an OpenGL3 GPU (==Dx10) ie Nvidia >= 8800, AMD >= HD2000)
* Require an OpenGL4.2 compatible drivers => no opensource driver supported neither Intel driver.
* Build by default without SDL support which will dropped later. You need to add this define "ENABLE_SDL_DEV" on Win.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5186 96395faa-99c1-11dd-bbfe-3dabce05a288
* put shade boost in HW setting (not sure it is HW only)
* Remove logz, useless since openGL support 32bits Z buffer
* Update hack section with a table. Note don't put MSAA (not yet implemented) to have a nice square
Note: user hack is enabled with "UserHacks" instead of "allowHacks"
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5184 96395faa-99c1-11dd-bbfe-3dabce05a288
The detection is based on a quickly reversed smode1 flag and needs to be done properly.
The timing itself also needs reversing and has only been tested on the VP2 intro video.
(That video now runs without audio / video desync when progressive scan is enabled :) )
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5179 96395faa-99c1-11dd-bbfe-3dabce05a288
various:
* rename the man page as requested by arch users.
* Delete pcsx2/* symlink. Was only useful for autotool removed few years ago.
* commit the top metadata of my previous branch merge.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5172 96395faa-99c1-11dd-bbfe-3dabce05a288
* new memory management
* asm was replaced by intrinsic
* new GLSL backend (AMD only) Cmake is probably broken anyway with the 2 plugins...
* and lots of others stuff that I forgot about it ;)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5166 96395faa-99c1-11dd-bbfe-3dabce05a288
Then it would be easier to separate CG/GLSL for copyright issue. CG is not compatible with the GPL...
Old version will be zzogl-pg-cg
Future version will be zzogl-pg
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5165 96395faa-99c1-11dd-bbfe-3dabce05a288
Previously: GSdx was switching between the configured renderer and the best SW renderer (best = DX11 if supported).
Now: If using DX: Switch SW/HW renderer and use the same DX version. If using SDL: same as before.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5164 96395faa-99c1-11dd-bbfe-3dabce05a288
* build the utility to prebuilt cg shader (zzogl-shader)
* build the shader (ps2hw_cmake.dat) that would avoid copyright issue for debian/ubuntu
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5159 96395faa-99c1-11dd-bbfe-3dabce05a288
cmake: keep all library for the linking of plugins
hex2h.pl: add svn:executable
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5157 96395faa-99c1-11dd-bbfe-3dabce05a288
* change the man page to gpl3
* add missing copyrigh for zerogsshader
* re write bin2cpp tool (in perl) to avoid any copyright issue => hex2h.pl
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5155 96395faa-99c1-11dd-bbfe-3dabce05a288
* update missing copyright on
+ plugins/GSdx/config.h
+ pcsx2/MTVU.h
+ plugins/zzogl-pg/opengl/ZZHacks.h
+ plugins/spu2-x/src/DplIIdecoder.cpp
* put a copyright for trivial script file
+ pcsx2/gui/Resources/rebuild.sh
+ tools/bin2app.sh
+ plugins/zzogl-pg/opengl/shaders.sh
* remove autotool from zzogl
* apply the patch for issue 1257. Thanks very much Micove for the hard work.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5154 96395faa-99c1-11dd-bbfe-3dabce05a288
* Only available on debug build
* ctrl F9 -> dump a couple of frames
* ctrl shift F9 -> start/stop a stream of frames.
* Build a replayer too, called pcsx2_ZZReplayLoader
Note: dump are saved in /tmp.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5152 96395faa-99c1-11dd-bbfe-3dabce05a288
Some games use volume slides combined with reversed phase.
Gigaherz tweaked the code to handle this nicer (fixes Mashed Drive to Survive noises).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5139 96395faa-99c1-11dd-bbfe-3dabce05a288
* Keep the state of the draw buffer (save few opengl call)
* AMD fix the shader unloading (12.2 and above). So disable the workaround
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5137 96395faa-99c1-11dd-bbfe-3dabce05a288
Change a texture cache hack to fix half the flickering FMV games.
It could have issues though, or randomly fix other stuff. Please test :p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5130 96395faa-99c1-11dd-bbfe-3dabce05a288
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
Mouse over descriptions for the hacks. Thanks to KrossX again, these are great :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5123 96395faa-99c1-11dd-bbfe-3dabce05a288
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
Team effort of KrossX and myself:
Finally adding that special game fixes / hack dialog I talked about for a while.
Committing this in several steps to clean up any issues easier.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5116 96395faa-99c1-11dd-bbfe-3dabce05a288
* request a minimum of 1 for texture dimension
* Use offscreen texture likes DX11.
* add more bits for extra texture format
* do operation on texture unit 0 to avoid ping-pong between unit 0/2
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5114 96395faa-99c1-11dd-bbfe-3dabce05a288
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