Commit Graph

2071 Commits

Author SHA1 Message Date
ramapcsx2.code 4015db8403 GSdx: Newest scanlines shader looks much nicer this way :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5814 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-13 18:23:53 +00:00
ramapcsx2.code bdf5e650a6 GSdx: Quick workaround for DX9 until the shader is adapted.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5813 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-13 17:48:43 +00:00
ramapcsx2.code 1155dd6e21 GSdx:
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
2014-01-12 19:47:49 +00:00
gregory.hainaut 23ae6f0641 the regular copy/past mistake
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5811 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-12 12:35:15 +00:00
gregory.hainaut 2238095a82 gsdx ogl: do the same as previous commit but for ogl ;)
* fix the missing auto interlace opt when cycling with hotkey on linux


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5810 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-12 11:38:50 +00:00
ramapcsx2.code 2ac3c47c42 GSdx:
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
2014-01-11 23:17:07 +00:00
gregory.hainaut f5257b2c3c gsdx ogl: don't rely on GL_ES builtin (3 differents implementations...). Hopefully fix Linux Intel GPU.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5808 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-11 15:01:13 +00:00
gregory.hainaut b5cad8bd6a gsdx ogl linux: use OGL renderer by default otherwise it fallback to unsupported GSDeviceNull which badly crash
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5807 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-10 21:04:04 +00:00
gregory.hainaut 5309dd0e59 zzogl: fix wrong type access
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
2014-01-10 20:25:03 +00:00
refraction cf8912eb2c Dev9ghzdrk: Take the first 3 bytes of the host MAC for the virtual one, should make it unique for people using xlink or multiple people playing the same game.
Hopefully this works anyway ;)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5805 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-09 22:39:23 +00:00
sudonim1@gmail.com 53c76b3780 GSDX: Nonsense workaround for VS2010 crash issue. We suspect that memory is getting corrupted but we've failed to find the code responsible. Many different changes result in code that doesn't crash for no obvious reason, this one at least looks vaguely like sane code though.
Reverted optimisation flag for VS2010 release target.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5804 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-09 21:51:42 +00:00
sudonim1@gmail.com a1f50d4306 GSDX: (FXAA) Treat shader model 4.1 as 4.0 and future shader models as 5 rather than failing to compile.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5803 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-09 18:32:26 +00:00
refraction 515e268bf5 GSDX: As the Optimization option in VS2010 causes GSDX to crash now, i've disabled it. Whole program optimization is still on and the release will use both (compiled with vs2013). So the SVN can like it or lump it ;p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5802 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-09 00:31:46 +00:00
refraction 5aa0a9a94d GSDX: Modified the FXAA shader loading so Page Up works again. Now loads the shader just in time.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5801 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-07 23:53:30 +00:00
refraction 5e22971db0 GSDX: New shader is quite slow to compile, so lets not compile it unless the user is using it :)
-switching between sw/hw modes, resuming emulation speed back to normal.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5799 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-06 22:51:45 +00:00
ramapcsx2.code a1e387e23e GSdx: Fix for the DX9 crashing issue, many thanks to Asmodean again! :)
(Also sets new defaults with only minor processing, mainly FXAA now)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5798 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-06 18:03:47 +00:00
refraction 76583f5fe5 GSDX: Fix/Hack for NVIDIA stretch issue on drivers > 320.18 with DirectX 11 when using a custom resolution. You can enable it in the HW Hacks section, let me know if there is a game it doesn't fix.
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
2014-01-05 23:31:26 +00:00
ramapcsx2.code 20ffe92ee8 GSdx:
- 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
2014-01-05 11:24:43 +00:00
gregory.hainaut 33832b4479 gsdx ogl: Intel driver keep the GL_ES macro undefined...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5785 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-30 14:48:26 +00:00
gregory.hainaut bdea4837c7 ... forget to refresh my patch ...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5784 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-30 10:15:01 +00:00
gregory.hainaut 4d3de6e911 gsdx linux:
* 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
2013-12-30 09:30:10 +00:00
ramapcsx2.code f4370077f0 GSdx:
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
2013-12-28 21:36:29 +00:00
ramapcsx2.code be185275c9 Minor additions.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5776 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-28 21:24:25 +00:00
gregory.hainaut 462c40cf4b fix zzogl-cg too
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5773 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-23 14:25:51 +00:00
gregory.hainaut ea804a309f zzogl: fix compilation issue with mesa10
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5772 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-23 13:35:48 +00:00
ramapcsx2.code 5a53b682f0 GSdx:
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
2013-12-22 15:36:47 +00:00
refraction@gmail.com efa12b4012 Region now know n for Crash Bandicoot CRC added in r5762
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5767 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-13 22:10:16 +00:00
gigaherz 4173080028 Because vs2012==vs11 and vs2013==vs12, which is extremely confusing, I renamed the project files to use the full year as the name.
Also fixed some project references to the right filenames.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5764 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-11-27 16:53:36 +00:00
gigaherz 74378ce378 Created vs2013 files based on the vs2012 code, and fixed a small incompatibility between vs2013 and pthreads.
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
2013-11-27 16:44:32 +00:00
refraction@gmail.com 64dd73e9a0 Added another version of Crash Bandicoot Wrath of Cortex to the CRC hack list. Not sure what region it is, possibly japan.
(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
2013-11-25 15:41:27 +00:00
gregory.hainaut 0a9e9f9834 cmake: fix sdl switch typo (close #1448)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5761 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-11-12 18:56:15 +00:00
gregory.hainaut 5df7af9bc5 cmake:
* 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
2013-11-01 21:05:59 +00:00
gregory.hainaut e80b002929 gsdx ogl: Flush various pending work
* 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
2013-10-24 20:54:27 +00:00
sudonim1@gmail.com 48f284a49e Compilation fix for SPU2-X non-release targets on VS2010.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5733 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-10-12 20:45:02 +00:00
gregory.hainaut 4934e43287 gsdx ogl: in case of EGL_BAD_MATCH try to create the context with different option (hope to fix intel mesa)
cmake: add sdl as a dependency requirement of spu2x


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5732 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-10-05 10:37:48 +00:00
gregory.hainaut 00ea70d4d1 spu2x (linux): allow to use sdl as audio backend instead of portaudio (recommended for pulseaudio user). Close i1413
Thanks to Matt Scheirer for his patch



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5731 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-09-14 15:23:35 +00:00
avihal@gmail.com 49d417b60e SPU2-X: Stretcher: Better behavior - can now maintain stable 1:1 with 30ms latency on my system if the game is light enough, and much better resilience to infinite underruns (e.g. when going from turbo to 60fps, or from turbo to 10fps, even with under 50ms latency): 1. Improved averaging on init (and after reset) 2. Added reset after few underruns. 3. automatically slightly increase target latency when pcsx2 runs slow. 4. un-staled dynamic tuning (still disabled by default, but now can be enabled and works reasonably well). 5. Lowered minimum latency from 50ms to 30ms.
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
2013-09-12 13:35:29 +00:00
gregory.hainaut c2acd80236 spu2x: correct the modulo parameter of the Timestretcher. Use a size of 128 so the compiler can optimize the code a bit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5728 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-09-11 20:56:48 +00:00
gregory.hainaut 44d8301bb2 spu2x: array out of bond (-1)
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
2013-09-10 11:41:11 +00:00
gregory.hainaut fb684df32b pcsx2: fix 4 arrays out of bond
Gsdx: fix a memcpy src/dst overlap + a clang compilation fix



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5726 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-09-05 20:01:47 +00:00
gregory.hainaut e01c6cd9ce gsdx ogl: the proof of concept commit
* 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
2013-08-28 08:44:16 +00:00
gregory.hainaut 452cf72ddf onepad: fix a bug to handle multiple button (fix #1271)
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
2013-08-25 12:11:32 +00:00
ramapcsx2.code 3aa0f374d4 Just fixing this oversight. Thanks, gb2985.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5723 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-21 10:10:45 +00:00
gregory.hainaut 690432de30 gsdx ogl:
* 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
2013-08-17 09:05:41 +00:00
gregory.hainaut 07605941ef gsdx ogl:
* 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
2013-08-17 08:57:52 +00:00
gregory.hainaut b4084047be gsdx ogl: Used a basic flat interpolation for color interpolation (line & tri primitives)
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
2013-08-14 10:18:38 +00:00
gregory.hainaut 0f603a98d5 gsdx ogl: Test the ARB_shader_subroutine GL4.0 extension
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
2013-08-10 19:43:59 +00:00
gregory.hainaut c9755361ec gsdx ogl: remove useless ps.rt
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
2013-08-06 06:48:44 +00:00
gregory.hainaut a46b489a24 gsdx ogl: various minor optimization.
* 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
2013-08-05 20:25:25 +00:00
gregory.hainaut 34045eb8f7 gsdx ogl: AMD users upgrade to 13.8 now ;)
* 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
2013-08-03 08:29:01 +00:00
gregory.hainaut 64f783410e gsdx ogl:
* 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
2013-08-02 16:38:12 +00:00
gregory.hainaut 2634ee851c miss another debug stuff
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5709 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-28 19:08:46 +00:00
gregory.hainaut a172da1f30 gsdx ogl: oups forget to disable stencil debug
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5708 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-28 17:12:23 +00:00
gregory.hainaut e394de86dc gsdx ogl:
* 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
2013-07-28 14:40:43 +00:00
ramapcsx2.code 1c9146b07e Working on my backlog: GSdx CRC patches.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5705 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-23 13:55:38 +00:00
gregory.hainaut d3e1e4da0d gsdx ogl:
* 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
2013-07-19 19:25:50 +00:00
gregory.hainaut b912778a3c gsdx: forget to regenerate shader in previous commit
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5702 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-13 16:31:19 +00:00
gregory.hainaut 916a091f8a gsdx ogl: GLes
* 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
2013-07-13 11:39:45 +00:00
gregory.hainaut bd5f379044 gsdx ogl:
* 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
2013-07-12 21:12:34 +00:00
gregory.hainaut a764950468 gsdx ogl:
* 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
2013-07-11 17:08:42 +00:00
gregory.hainaut f22b366cea gsdx:
* 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
2013-07-07 16:13:11 +00:00
gregory.hainaut dc036ff59d gsdx: split shader/program/pipeline object management into a separate class
* 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
2013-07-06 10:08:52 +00:00
gregory.hainaut 544c84a344 gsdx:
* 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
2013-07-06 09:42:46 +00:00
gregory.hainaut ba2ec6fe59 all: gcc warning clean round 4
* 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
2013-07-03 18:42:05 +00:00
gabest11 811a3d96cc Fix for the v110_xp toolset in vs2012. Removed winuser.h from afxresmw.h, nothing seems to be using it, but it breaks something in string.h. I did not change the projects to use v110_xp by default, to get an xp compatible binary, you have to call it from command line like this: msbuild pcsx2_suite_2012.sln /t:Build "/p:Configuration=Release AVX2" /p:PlatformToolset=v110_xp /m. Change Configuration=... as needed.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5694 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-02 16:01:06 +00:00
gabest11 ddaa892726 Removed ATL/MFC dependencies from every project, the free version of visual studio does not have those. It compiles with vs2012 express now, will fix others later, in case they are broken.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5692 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-01 21:28:58 +00:00
gregory.hainaut a4475a4595 spu2x:
* 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
2013-07-01 16:43:35 +00:00
gregory.hainaut 91d39de645 gsdx ogl: fix crash when pause/resume with EGL (opensource driver)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5690 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-30 15:27:50 +00:00
gregory.hainaut d81254469a gsdx ogl:
* 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
2013-06-30 11:18:46 +00:00
gregory.hainaut 58cacc3b1c gsdx: use size_t for loop index when it used countof macro
* fix override_GL_ARB_copy_image typo


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5687 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-29 12:02:03 +00:00
gregory.hainaut 40e26648c6 all: gcc warning clean (round 2)
* reorder static initialization list
* Add missing virtual desctrutor to virtual object
* int -> uint/u32/uint32 cast of for loop index
* add a missing return in pxTrySetFocus
* fix size parameter of memset m_clut
* disable missing-field-initializers warning
* disable unused-local-typedefs warning


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5685 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-28 17:32:37 +00:00
gregory.hainaut d9af23c946 plugin: restore sprintf_s on windows and hopefully fix vs201n compilation
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5684 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-28 17:11:16 +00:00
gregory.hainaut 3c7167be50 clean (some) gdb warning: round 1
* 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
2013-06-28 10:43:50 +00:00
gregory.hainaut ca1edbf2cb gsdx ogl:
* 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
2013-06-26 20:09:07 +00:00
gabest11@gmail.com 9cd463e4f8 GSdx: obligatory vs2010 compiler fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5681 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-24 06:29:08 +00:00
gabest11@gmail.com 4dd898c754 GSdx: Found some 16-bit integer overflow in GSState::VertexKick, some triangles could have been removed by the scissor test.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5680 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-24 01:11:00 +00:00
gabest11@gmail.com 37dd5f5bb5 GSdx: copy-paste mistake, thanks rama :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5679 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-23 12:13:40 +00:00
gabest11@gmail.com 20d99ae9fc GSdx: vs2010 fix and minor changes
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5678 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-23 10:46:24 +00:00
gabest11@gmail.com d20bd4f86a GSdx: The sw renderer now uses avx2, not much faster though, +10% maybe, if the game is not EE limited. I'm not sure if haswell has that much better sse execution (load/store units doubled for example), or the avx2 code is not fully optimized yet.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5677 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-20 05:07:52 +00:00
gabest11@gmail.com 3b753bec42 GSdx: sse2/ssse3 missing graphics fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5676 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-18 00:25:46 +00:00
gabest11@gmail.com 8b9f5b5bc2 GSdx: More avx2 code to read/write different block formats, the GSBenchmark function shows nice improvements, but no games run faster. I just upload the changes before messing with the drawing part.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5675 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-17 04:11:10 +00:00
gregory.hainaut f4ce6d6fce gsdx:
* 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
2013-06-16 16:33:08 +00:00
gregory.hainaut b7a6dd93b3 i18n: refresh string translation
GSdx: nothing to see :p


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5673 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 09:55:37 +00:00
gregory.hainaut f4b173bbd1 gsdx: miss a part of the previous patch...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5672 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 09:43:34 +00:00
gregory.hainaut 09571dac0b gsdx:
* 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
2013-06-16 09:40:38 +00:00
gregory.hainaut 9b037a3813 pcsx2: increase a bit the minimum size of the plugin dialogs (GSdx name is too long)
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
2013-06-16 08:43:50 +00:00
gregory.hainaut b10d554764 gsdx (ogl):
* fix memory leak of m_wnd
* don't escape % in the shader string
* Fix shadeboost StretchRect parameter

debian: compress package with xz


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5669 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 07:05:57 +00:00
gabest11@gmail.com 1da166a1af GSdx: minor fixes to previous commit, rundll32 window not showing and a compiler warning
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5668 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 02:48:16 +00:00
gregory.hainaut 91e74637d5 gsdx-ogl-wnd:
* 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
2013-06-15 15:03:44 +00:00
gregory.hainaut 4c37d25134 gsdx-ogl-wnd: fix ifdef mess on fxaa (both dx and ogl)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5665 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 10:35:10 +00:00
gregory.hainaut adc232cb95 gsdx-ogl-wnd: VS2010 doesn't support string bigger than 64k bytes. So remove PS3&360 shader from fxaa
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5664 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 10:06:47 +00:00
gregory.hainaut 19961175c9 gsdx-ogl-wnd: port (minor) renderer update of r5649 to opengl
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
2013-06-15 09:24:13 +00:00
gregory.hainaut f8242bd458 gsdx-ogl_wnd: Merging r5633 through r5661
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5662 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 09:05:02 +00:00
gregory.hainaut 93d2cd6f7e gsdx-ogl-wnd: ... forget to add the file...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5661 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 07:22:11 +00:00
gregory.hainaut 8ec0275a96 onepad: Don't try to acquire the lock when it wasn't initialized. Avoid
the freezing of the window when a plugin failed to open.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5660 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 07:20:02 +00:00
gregory.hainaut 59501227b3 gsdx-ogl-wnd: implement fxaa. I directly reuse the .fx file with minor update
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5659 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-14 21:22:44 +00:00
gregory.hainaut 92a3549e9c gsdx-ogl-wnd:
* Patch from miseru to fix VS2010
* Quick fix for 8-bits textures


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5658 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-14 16:22:22 +00:00
gregory.hainaut e021630bb9 gsdx-ogl-wnd:
* 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
2013-06-14 11:34:44 +00:00
gregory.hainaut 382258ec03 gsdx-ogl-wnd:
* properly set the stencil write mask
* Multiply Y coodinates by -1. Let's hope it fixes shadows gliches.


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5656 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-12 20:57:16 +00:00
gregory.hainaut 041bf4cee6 gsdx-ogl-wnd:
* 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
2013-06-11 11:14:26 +00:00