Commit Graph

74 Commits

Author SHA1 Message Date
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 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 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 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 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 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 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 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
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 65b5a376ed gsdx-ogl-wnd:
* 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
2013-06-07 19:16:27 +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 acaf1ac8d5 gsdx-ogl-wnd: Make the HW renderer "work" on the opensource driver
* 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
2013-05-27 18:02:27 +00:00
gregory.hainaut 75418aba43 gsdx-ogl-wnd:
* 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
2013-05-27 16:53:38 +00:00
gregory.hainaut aafa7a088a gsdx-ogl-wnd:
* 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
2013-05-26 13:05:03 +00:00
gregory.hainaut c9b3dcf581 gsdx-ogl-wnd:
* 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
2013-05-25 14:28:16 +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 dce89ff1a0 gsdx-ogl-wnd: fix compilation error on linux
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5634 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-18 16:19:23 +00:00
gregory.hainaut c4dfd0c7c5 gsdx-ogl-wnd: gl.h doesn't provide same functions on linux and windows...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5519 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-17 15:24:55 +00:00
gregory.hainaut 58cc2ddd1f gsdx-ogl-wnd:
* 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
2013-01-16 18:25:53 +00:00
gregory.hainaut b65ad2c3e5 gsdx-ogl-wnd:
* 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
2013-01-14 09:15:39 +00:00