Commit Graph

73 Commits

Author SHA1 Message Date
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
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 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 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 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 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 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 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 58699923e0 gsdx-ogl-wnd:
* 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
2013-06-09 16:41:58 +00:00
gregory.hainaut efcb015361 gsdx-ogl-wnd:
* 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
2013-06-01 09:29:57 +00:00
gregory.hainaut 49cd9fd97d gsdx-ogl-wnd:
* 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
2013-05-23 17:03:18 +00:00
gregory.hainaut 6779edfe28 gsdx-ogl-wnd:
* 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
2013-05-19 12:42:55 +00:00
gregory.hainaut 9376b26537 gsdx-ogl-wnd:
* load extension as gl_Function instead of glFunction


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5635 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-19 09:19:20 +00:00
gregory.hainaut b8e36b44af gsdx-ogl-wnd: sync from trunk (r5550 to r5632)
Note: Code need to be fixed with latest GSdx ogl additions


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5633 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-18 16:09:09 +00:00
gregory.hainaut e3d658b501 gsdx ogl: load shader from C code instead of an external file
* 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
2013-05-18 09:17:30 +00:00
gregory.hainaut 6760ed552b gsdx ogl: fix previous commit
* clean shader properly
* use a 64 bits map to contain shader pointer


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5631 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-17 20:14:10 +00:00
gregory.hainaut a163677cec gsdx ogl: New config option to disable separate shader program. Not enabled by default
* 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
2013-05-17 18:28:51 +00:00
gregory.hainaut 320d3a572e gsdx ogl: AMD fix some bugs in their driver ! (catalyst 13.4 branch). Let's remove some buggy workaround now.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5627 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-08 15:51:42 +00:00
gregory.hainaut 08329122aa gsdx (ogl):
* 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
2013-04-19 19:16:26 +00:00
gregory.hainaut d3d9b520f0 gsdx ogl:
* 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
2013-02-23 15:35:56 +00:00
gregory.hainaut f9ddd639b8 gsdx-ogl-wnd: Try to compile OGL backend on VS
* 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
2013-01-10 13:13:59 +00:00
gregory.hainaut c4af005f0b gsdx ogl:
* retry compilation when driver failed to compile with a static 'index' constraint. Replace previous AMD hack.
* clean context default attribute value
zzogl 4: clean context default attribute value too.
zzogl 3: backport texture size fix


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5442 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-10-29 21:35:47 +00:00
gregory.hainaut a9020c6065 GSdx: only enable AMD hack for AMD GPU. Remove the older geometry shader hack fixed since 6 monthes
ZZogl: support xdg for the replayer


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5441 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-10-28 10:14:42 +00:00
gregory.hainaut d5b318b990 zzogl:
* 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
2012-10-21 18:10:13 +00:00
gregory.hainaut e06484adb8 gsdx: update the copyrigh address thank to sed
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5412 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-09-09 18:16:11 +00:00
gregory.hainaut b70c5eb8b7 gsdx ogl: incorporate DX sudonim's changes on ogl
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5375 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-15 10:14:13 +00:00
gregory.hainaut 636c16f2df gsdx ogl:
* 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
2012-08-08 17:49:23 +00:00
gregory.hainaut c6d8af0c7f gsdx-ogl: only enable AMD hack when linking ps2 related shader. Otherwise SV_Target1 in convert is wrongly remapped
zzogl: check harder that the previous primitive exist.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5232 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-26 09:58:37 +00:00
gregory.hainaut b665499a6b gsdx ogl:
* split GSDeviceOGl header. Will allow easy sharing with zzogl.
* fix some gcc warning
zzogl:
* import Uniform buffer and Vertex array from GSdx



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5207 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-13 17:09:18 +00:00
gregory.hainaut a7dbaed3b1 gsdx ogl: find a way to workaround the buggy amd driver to support dual blending
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5203 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-11 19:39:32 +00:00
gregory.hainaut 6fd47b2907 gsdx-ogl: * implement shadeboost (only test the compilation)
Note: gui must be updated with new user hack


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5181 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-26 21:42:16 +00:00
gregory.hainaut bda3cbe86f gsdx-ogl: fix build failure due to a leftover of a patch conflict
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5140 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-02 16:46:54 +00:00
gregory.hainaut 16a1fded96 gsdx-ogl: LINUX ONLY
* 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
2012-03-30 19:02:37 +00:00
gregory.hainaut 92f2ab38ae GSdx-ogl: LINUX only
* Use the new map interface/separate texture coordinate inside shader
* support new format on texture

Note: it is quite instable with various crashes and GL error but at least it compiles now :p 


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5094 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-11 10:22:02 +00:00
gregory.hainaut 6680d285ea gsdx-ogl: linux only
* implement some missing shader for DATE, invert coordinate like strech rectangle
* Use glCopyImageSubDataNV nvidia extension to copy image (you need latest AMD drivers)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5086 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-31 17:08:05 +00:00
gregory.hainaut e0004b5027 gsdx-ogl: linux only
* Was easy, I forgot to set the type of the buffer.
* align shader change too


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5071 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-15 18:11:48 +00:00
gregory.hainaut 86a9910027 gsdx-ogl: linux only
compilation fix, add bits for the index buffer.
current status is blackscreen :p


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5070 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-15 17:25:49 +00:00
gregory.hainaut 14b0572b61 gsdx-ogl:
* fix bad setup issue for constant blend factor
* Use a read framebuffer to read back the texture (less disruptive)
* cmake separate the loader to the main plugins


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5064 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-08 21:59:42 +00:00
gregory.hainaut 0e80e0adca gsdx-ogl:
* add some define to enable/disable SDL so we could build gsdx without SDL
* debug: dump data based on frame count rather from draw count


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5044 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-04 23:19:17 +00:00
arcum42 0116402620 gsdx-ogl: Fix a few glsl errors. Comment out line 218 of GSDevice.cpp. Mess with the fifo hack a bit.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5042 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-04 10:42:53 +00:00
gregory.hainaut cc6e486742 gsdx-ogl:
* add a new define (DISABLE_DUAL_BLEND) to easily test blend mode


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5040 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-03 16:12:34 +00:00
gregory.hainaut 90c52c27f6 gsdx-ogl:
* replace hexa debug value with nice string for standard human
* move things around


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5039 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-03 13:11:40 +00:00
gregory.hainaut c1d7b81a55 gsdx-ogl:
* Use a geometry shader pass-through to replace previous AMD workaround
* various cosmetic change


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5038 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-02 20:08:11 +00:00
gregory.hainaut 2f4e2d8b6b GSdx-ogl: happy new years commit :)
* move all vertex buffer stuff into the class
* Bypass FIFO2 because of multithread issue with OGL(temporary workaround until we found a nicer solutions)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5035 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-31 14:38:58 +00:00
gregory.hainaut 9ca65c9cc6 gsdx-ogl: LINUX-ONLY
* invert the index of fragment output. Seem to work better on Nvidia (strangely no impact for AMD)
* opengl support pitch too, so remove useless copy to an fbo


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5034 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-30 22:25:17 +00:00
gregory.hainaut ea33beb360 gsdx-ogl: LINUX-ONLY
* Fix the Geomtry shader to output 2 triangles for quad primitive (ie 2R rendering)
- There is an AMD  driver bug on geomtry shader input interface (well could be the spec too). Tell me if it still working on nvidia
* Add a workaroung to a previous AMD bug. It is impossible to unattach a shader so destroy the full shader pipeline...
* Be more strict on FBO management. Would optimize it later
* use a texture insted of a render buffer for depth-stencil management.
* add more dumping capabilities (in particular depth buffer)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5033 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-30 13:55:33 +00:00
gregory.hainaut aa499f4bfd gsdx-ogl: LINUX-ONLY
* fix vertex shader for HW renderer :) Remains the fragment part...
* add some dumping infrastucture (DUMP_START and DUMP_LENGTH)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5030 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-29 14:24:26 +00:00
gregory.hainaut 83ad63a8a7 gsdx-ogl: LINUX-ONLY
* lay the foundation for the HW renderer on OGL


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4996 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-19 21:03:23 +00:00
gregory.hainaut ab01926ed5 gsdx-ogl: LINUX-ONLY
* rewrite the vertex management with a nice GSVertexBufferState object
* extend GSUniformBufferOGL to use a better object interface
* properly delete texture
* manage buffer with glMap* instead of glBufferSubData


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4990 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-15 18:27:58 +00:00