Commit Graph

67 Commits

Author SHA1 Message Date
hibye8313 718042e6a6 GSdx: Made a DX11/OGL-independent blend map in GSDevice.cpp. Convert to OGL/DX11 specific constants at run time. 2019-06-13 13:25:46 +02:00
lightningterror 976b77f144 gsdx-hw: Use std max for scaling factor, bonus add jak3 crc id for eu preview/us international release. 2019-06-01 16:46:17 +02:00
lightningterror 877a112193 gsdx-hw: Remove no longer used linear parameter from ComputeFixedTEX0,
add an assert that m_target isn't handled with invalid_tex0 yet due to upscaling.
2019-05-31 13:50:28 +02:00
Gregory Hainaut ead3d21bdb gsdx ogl: commit texture in copy function
So far not yet used but safer this way
2019-04-26 12:40:04 +02:00
Gregory Hainaut 70c3c1a48f gsdx ogl: always commit a sparse texture when force_texture_clear is enabled
The goal is to ensure the behavior of the option. VRAM usage isn't important
as option is mainly intented for debug purpose.
2019-04-26 12:40:04 +02:00
lightningterror e77aac0bf1 gsdx-ogl: Do some integer casts for destination texture commit to StretchRect.
Fixes warning.
2019-04-26 12:40:04 +02:00
Gregory Hainaut bdcf83ca45 gsdx ogl: sparse texture : only commit new area
Avoid potential driver overhead
2019-04-26 12:40:04 +02:00
Kojin 116a5d822c gsdx-ogl: update Save() to use committed size of texture 2019-04-26 12:40:04 +02:00
Kojin 9618283217 gsdx-ogl: Add detection of Sparse Depth in isDss() 2019-04-26 12:40:04 +02:00
Kojin 55e95cc552 gsdx-ogl: add destination texture commit to StretchRect 2019-04-26 12:40:04 +02:00
Kojin 4e675ef6e1 gsdx-ogl: add texture commit ogl renderer 2019-04-26 12:40:04 +02:00
Gregory Hainaut ba782e90c8 gsdx ogl: enable sparse feature on GSdevice interface
Note: remain
* To really use sparse texture
* To debug it ^^
2019-04-26 12:40:04 +02:00
Gregory Hainaut 16d5f477ff gsdx ogl: implement CommitPages 2019-04-26 12:40:04 +02:00
Gregory Hainaut e8b2d036ee gsdx ogl: handle creation of sparse texture 2019-04-26 12:40:04 +02:00
Gregory Hainaut 643ed528c2 gsdx hw: allow to create sparse texture at device level
Obviously texture allocation should be updated too
2019-04-26 12:40:04 +02:00
lightningterror 3408d1a873 gsdx-d3d11: Move colclip code to blending function.
Also disable a log that was accidentally enabled/pushed.
2019-04-25 16:48:07 +02:00
lightningterror a0c6c1cb9f gsdx-hw: Forgot to remove a crc region check for dbzbt2-3, no longer needed. 2019-04-25 16:34:28 +02:00
lightningterror c3f36ad430 gsdx-gui: Separate opengl and direct3d blending options.
A short summary how d3d option behaves compared to gl.

None d3d-> behaves the same
Basic d3d-> even less than 1/3 of Basic opengl.
Medium d3d -> less than 1/3 of Basic opengl.
High d3d -> 1/3 of Basic opengl.

Note: Medium and High options are mostly intended for debug use.
2019-04-23 15:24:04 +02:00
lightningterror de5e9a85bb gsdx-d3d11: Partial port of frame buffer masking from opengl.
It works on games such as Fifa Street 1 and 2 (character and stage
rendering), mission impossible operation surma (shadow rendering).
It needs at least Basic level of blending enabled on d3d11.
2019-04-22 05:07:42 +02:00
Gregory Hainaut f406051ed9 gsdx ogl: Bypass the texture cache when the frame buffer will be sampled.
Proof of concept. It should provide a huge speedup when accurate
blending is enabled for tri-ace / Jak / R&C (shadow rendering).

See #2894
Need PR#2892

v2: Add const + comment to explain that code isn't ideal.
2019-04-17 03:48:30 +02:00
lightningterror 52da124a2b gsdx-ogl: Check if primitives are triangles instead of overlapping.
Single triangle draw can now hit the tex_is_fb path.
Primitive Overlap will return no overlap  for single primitive (triangle).
Ratchet and Clank, Jak, tri-Ace games.

It should improve shadow rendering.

Idea by Gregory.
2019-04-10 12:33:31 +02:00
lightningterror 9c222f8efe gsdx-hw: Some minor comment and code adjustments. 2019-04-04 02:13:57 +02:00
Gregory Hainaut 374374fdf1 gsdx ogl: disable sparse in extenstion detection
* Allow to keep automatic as default value in the option
* You need to force enable sparse in the option to enable sparse
2019-03-26 14:22:23 +01:00
lightningterror 535b0d4aac gsdx-ogl: Disable sparse depth on amd.
* Bad driver as usual.

* Driver reports a compatible sparse format for depth texture but it isn't attachable to a frame buffer.
2019-03-26 14:22:16 +01:00
lightningterror 8219bcd1b4 gsdx-hw: Move GSC_YakuzaGames to partial level.
Don't enable hack on native res if crc is below aggressive. Upscaling
issues.

Bonus, revert recent barrier changes on gl date code.
2019-03-05 12:39:07 +01:00
lightningterror e48ce1bc69 gsdx-ogl: Minor adjustments to DATE code.
Don't set DATE true when Accurate Date is off, DATE is true anyway so
no need to set it again.

Don't call full barrier for DATE 45 at the date selection, do it
at the shader call check. It's the same, plus we avoid extra checks.
2019-03-04 19:39:58 +01:00
Gregory Hainaut e56f75fe9a gsdx hw:move vertices fixup for texture shuffle in RendererHw
Bonus: fix m_vt value
2019-02-22 16:57:59 +01:00
Gregory Hainaut 29aef04fbf gsdx ogl: re-normalize coordinate when TEX0 is invalid
Fix #258
Fix #695
2019-02-20 13:49:57 +01:00
lightningterror 12b622c9c1 gsdx: Cleanup/update Wild Arms offset hack.
Don't use integer for the variable, option has only on and off states.
Use member variable names and adjust some checks.
2019-02-13 10:28:07 +01:00
lightningterror 19586fdd7f gsdx: Move GSTexturecache files from Common to HW renderer. 2019-02-11 18:18:02 +01:00
lightningterror dabc99f466 gsdx-ogl: Small colclip improvements.
1. Allow hrd colclip to also run on the unsupported
cases which should be pretty rare.

2. Remove colclip from high sw blending.

3. Disable the hdr colclip shader which may not be
actually required to run.

Idea by Gregory
2019-02-08 14:53:15 +01:00
lightningterror a9e622357a gsdx-ogl: Fix override detection for extensions. 2019-02-07 18:38:40 +01:00
Gregory Hainaut 6282c3d263 gsdx ogl: remove boilerplate of extension check
* Use GLExtension::Has in cold path
* Throw error at first error
* Remove aniso check, all hardware support it. Bonus add GL4.6 extension support
* Remove viewport array check. We replace the function pointer anyway
2019-02-07 12:34:02 +01:00
Gregory Hainaut 86a10969f3 gsdx ogl: load GL_EXT_direct_state_access for sparse texture
They forgot to add is to the ARB extension...
2019-02-07 12:34:02 +01:00
Gregory Hainaut 2ea47a1d96 gsdx-ogl: add sparse format detection
v2: fix wrong variable name
2019-02-07 12:34:02 +01:00
Gregory Hainaut fa7ffcd1bf gsdx-ogl: use a print_once macro 2019-02-07 12:34:02 +01:00
Gregory Hainaut 0e4c63db5d gsdx-ogl: add extensions check that might be useful in the future
Namely
* GL_ARB_multi_bind
* GL_ARB_vertex_attrib_binding
* GL_ARB_shader_storage_buffer_object
* GL_ARB_sparse_texture
* GL_ARB_sparse_texture2
* GL_ARB_compute_shader
* GL_ARB_texture_view

v2: add default option value
2019-02-07 12:34:02 +01:00
Gregory Hainaut aed7ccaadf gsdx ogl: use a set to store the supported extension
Split mandatory/optional extensions

Note: set is nice but likely much slower than reading a boolean
So both are kept
2019-02-07 12:34:02 +01:00
Gregory Hainaut e6b0a7828e gsdx-ogl: add a separate glext.h file
Allow to compile on distribution that still ship an older file
The file is only a patchup of the missing 4.3/4.4/4.5/4.6 define

v2: rename the file and add khronos copyright
2019-02-07 12:34:02 +01:00
Gregory Hainaut 8cd6f4375e gsdx-ogl: use only core debug extension
There are 2 extensions GL_ARB_debug_output (promoted from amd extension)
and GL_KHR_debug (the core extension, promoted from GL_ARB_debug_output)

As we use the callback we could drop the manual query of errors.
And save us the load of the GL_ARB_debug_output extension function pointer.
2019-02-07 12:34:02 +01:00
Gregory Hainaut cd333c2c94 gsdx-ogl: add missing define of glcorearb.h
Migration isn't expected soon but it should ease the process
2019-02-07 12:34:02 +01:00
Gregory Hainaut 8a723b3be8 gsdx-ogl: clean partially the GL1 mess
Remaining will require a move to glcorearb.h
2019-02-07 12:34:02 +01:00
Gregory Hainaut 4f09124f19 gsdx-ogl: generate nearly all gl entries function pointers
I used glcorearb.h as input file

Code is limited to core gl + KHR/ARB extension
GL1.X must be handled manually (need only 3 functions)
I think the solution would be to migrate gl.h/glext.h to the
single glcorearb.h. However we might need to update the code to fetch
pointer accordingly

Note: we don't check the null ptr anymore on GSwnd. It isn't important
as we check the extension.

v2: update copyright
v3: update copyright space
v4: update copyright of script

fix copyright
2019-02-07 12:34:02 +01:00
Gregory Hainaut dbffad2aef gsdx hw: use non virtual Create Texture function.
Just do the format check in FetchSurface. It removes a level of virtual function
and avoid useless code duplication.
2019-02-02 22:54:30 +01:00
lightningterror ece7d6e718 gsdx-ogl: Update intel bad driver log.
Assume that driver support is good when GL_ARB_texture_barrier and
GL_ARB_direct_state_access are both supported, disable the log in that
case.

Kaby Lake and above already support the required extensions (windows) so
the log is useless. It should be the same case for Skylake. Mesa driver
should already be good.

Note: SSO is still broken even on latest igpu.
2019-01-27 00:12:08 +01:00
lightningterror 19b97f8684 gsdx-ogl: Remove useless SetupIA from GSDeviceOGL.h not used. 2019-01-26 16:13:07 +01:00
lightningterror 2e2c9b14a4 gsdx-ogl: Enable anisotropic filtering only for triangles.
Sprites are flat so aniso is likely useless (it would save perf for
others primitives).

Idea by Gregory.
2019-01-26 14:52:30 +01:00
lightningterror 78f0b65e19 GSdx-d3d11: Merge GSRendererDX11 and GSRendererDX together.
Update VS and cmake project files to match new changes.
2019-01-24 20:30:48 +01:00
lightningterror b9df1e643b gsdx-hw: Adjust/cleanup hw hacks variable calls.
Use a function to check UserHacks for all variables in GSState.cpp
instead of checking each variable individually.

Get rid of UserHacks_HPO local variables in GSRendererOGL/DX and use the
member variable m_userHacks_HPO instead, we don't need duplicates that
do the same thing.

Add ResetStates call at the beginning of GSRendererDX to match gl
behavior.
2019-01-23 12:24:12 +01:00
lightningterror 2aadf0be89 GSdx: Adjust Scaling Factor.
Use value of 1 when upscale multiplier is 0 for ScalingFactor, this is
to avoid doing math with 0 in shader.

It helps custom res be less broken. Still not recommended to use custom
res ofc.
2019-01-22 23:25:01 +01:00