Commit Graph

6703 Commits

Author SHA1 Message Date
Gregory Hainaut cb4af8fe83 gsdx-ogl: small optimization for the GPU
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.
2015-07-21 08:19:36 +02:00
Gregory Hainaut 7ca463bf75 gsdx: NaN is likely not well supported for S & T
Add also a comment to explain the NaN issue on Q
2015-07-21 08:19:36 +02:00
refractionpcsx2 539a1767a3 Merge pull request #359 from AdmiralCurtiss/memcard-folder-cache
Memory Card as folder support by AdmiralCurtiss
2015-07-20 23:15:59 +01:00
Admiral H. Curtiss d331d59a9f MemoryCard: When converting a file to a folder, simulate the conversion process once before writing the data. This prevents half-converted/corrupted cards by ensuring we crash before any actual writes occur. 2015-07-21 00:08:09 +02:00
Gregory Hainaut 223b7daa1d gsdx-ogl: fix fbmask regression
I forget to remove an useless 255.0f factor
2015-07-19 23:55:27 +02:00
Gregory Hainaut a54e636364 gsdx-linux: add a tooltip for the filtering option 2015-07-19 23:27:45 +02:00
Gregory Hainaut 5c740ff41e gsdx-ogl: wipeout AlphaStencil & Alpha hack
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)
2015-07-19 22:43:48 +02:00
Gregory Hainaut 759e75091a gsdx-gui: yes openGL support correctly 8 bits texture 2015-07-19 17:29:25 +02:00
Gregory Hainaut 6719fc89a6 gsdx-sw: Nan is not well supported in Vertex
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
2015-07-19 16:41:05 +02:00
Gregory Hainaut 7f76883b98 Merge pull request #658 from ssakash/patch-34
Add Accurate Frame Buffer mask for Windows [GUI] and remove some old options.
2015-07-19 09:07:13 +02:00
refractionpcsx2 063f42be81 Merge pull request #664 from josephgbr/master
Updated Brazilian Portuguese translation
2015-07-19 00:34:55 +01:00
Rafael Ferreira 66c84f769b Updated Brazilian Portuguese translation
Signed-off-by: Rafael Ferreira <rafael.f.f1@gmail.com>
2015-07-18 17:33:47 -03:00
Gregory Hainaut 38c086008d glsl: round blending as SW renderer
Better tone on God of War with ultra accurate mode
2015-07-18 17:16:46 +02:00
Gregory Hainaut 88cd333839 gsdx-ogl: don't enable both HW&SW blending 2015-07-18 16:15:52 +02:00
Gregory Hainaut c4e165067d glsl: use signed integer when working with substraction...
It mostly fixes rendering of GoW with ultra blending

Color is still a bit wrong but rounding is likely incorrect
2015-07-18 14:41:03 +02:00
Gregory Hainaut c701ab4368 glsl: don't use normalized value for color range
Globally shader uses less intruction (except blending part)

It would also allow to improve the rounding of color
2015-07-18 14:41:03 +02:00
Gregory Hainaut 57394a03e0 partially revert: glsl: disable computing of extra alpha coeff in SW blending
It generates undefined data in screen. Maybe blending isn't switch off properly.
I need to investigate it.
2015-07-18 14:41:03 +02:00
Gregory Hainaut 5f5266ba45 gsdx-ogl-debug: don't optimize alpha channel in dump
Allow to dump AEM part of the shader
2015-07-18 14:40:57 +02:00
Gregory Hainaut 036cb229a3 glsl: add various comment for future idea
For example GL4 GPU supports special bit operation
2015-07-18 14:40:57 +02:00
Gregory Hainaut 6c1c857024 gsdx-ogl-debug: properly detect start of instruction in dump 2015-07-18 14:40:46 +02:00
Akash 37897eb922 add accurate framebuffer mask for windows. 2015-07-18 11:24:00 +05:30
Akash 69ce2a1de6 remove stored_renderswitch since, console message is no longer needed. 2015-07-18 10:50:48 +05:30
Akash 2deb0f3e46 remove F9 switch log statement since, renderer change log statement is already present. 2015-07-18 10:50:47 +05:30
Akash 7c4f3d28ce remove is_gsopen stuffs since old GUI is deprecated. 2015-07-18 10:50:34 +05:30
Gregory Hainaut 698dda2310 gsdx-ogl: remove subroutine from the gui too 2015-07-17 22:28:59 +02:00
Gregory Hainaut 36e83b42ce glsl: round texture and fragment color as the SW renderer
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.
2015-07-17 21:08:49 +02:00
Gregory Hainaut 5f247a6e16 glsl: rewrite tfx function to ease future update
No need to put lots of ifdef, compiler will optimize everything
It increases a bit the readability
2015-07-17 21:08:49 +02:00
Gregory Hainaut ea9e608288 gsdx-ogl: fix texture palette mask 2015-07-17 21:08:49 +02:00
Gregory Hainaut b4c04ed00a gsdx-ogl: wipeout subroutine code
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
2015-07-17 21:08:49 +02:00
Gregory Hainaut e3751f6cd9 glsl: disable computing of extra alpha coeff in SW blending
Hum, I'm curious of the impact to enable only this code when it is actually used.
2015-07-17 21:08:49 +02:00
Gregory Hainaut 784822a5c2 glsl: redo blending management to use A/B/C/D directly
1/ Code is much more readable
2/ It will allow to round differently the operation in the future
2015-07-17 21:08:49 +02:00
Gregory Hainaut e245b27c97 gsdx-ogl-debug: allow to dump various ps shader
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
2015-07-17 21:08:48 +02:00
Gregory Hainaut 344030cbe4 Merge pull request #656 from turtleli/gsreplay-opengl-windows
GSdx: windows: Make GSReplay work with OpenGL renderers
2015-07-16 14:39:43 +02:00
Jonathan Li 6c300288f9 gsdx: windows: Make GSReplay work for OpenGL
On Windows, GSReplay does not work with the OpenGL hardware and software
renderer. Make it work.
2015-07-15 20:40:47 +01:00
Admiral H. Curtiss 39e1de4d13 MemoryCard: Add options to convert FolderMemoryCards to 16MB, 32MB, and 64MB FileMemoryCards. 2015-07-14 21:41:50 +02:00
Gregory Hainaut 6ed137dc9c gsdx-ogl: log openGL driver version 2015-07-13 12:35:55 +02:00
Gregory Hainaut 45e0cfae01 linux: add an example for the validation of tfx fs shader of GSdx 2015-07-13 12:06:32 +02:00
Gregory Hainaut 363a3100c0 linux: use latest profile on cg to validate shader
Otherwise it doesn't work with GSdx
2015-07-13 12:06:32 +02:00
refractionpcsx2 854403af81 Merge pull request #654 from TheLastRar/empty-ethernet-setting-crash
Dev9ghz: Fix crash when ethernet adapter is not selected
2015-07-12 22:34:04 +01:00
TheLastRar ebafb24099 dev9ghz: proper casing 2015-07-12 18:38:23 +01:00
TheLastRar 820323bc1e dev9ghz: Check if user has selected an adapter
Avoid copying from an invalid pointer
2015-07-12 18:37:38 +01:00
Gregory Hainaut c9d6ce3b63 Merge pull request #653 from PCSX2/texture-shuffle-again
gsdx: texture shuffle detection
2015-07-12 18:48:00 +02:00
Gregory Hainaut 8be32e4661 gsdx-tc: fix a memory leak when depth isn't fully supported
Fix issue #642
2015-07-12 17:57:42 +02:00
Gregory Hainaut f6f28042bd gsdx: texture shuffle detection
Don't check rt 32 bits state, it give false positive on suikoden
2015-07-12 15:21:04 +02:00
Admiral H. Curtiss 6bd578ccbe FolderMemoryCard: Reduce unnecessary file I/O by only flushing files that have actually changed since the last known memory card state on the host file system.
This means that we are now no longer touching files that haven't technically been written to. Some games use timestamp information to automatically highlight the save that was last written to, so this should fix a small but annoying bug where it would highlight the wrong one.

Do note that while there is a much simpler check that looks like this:
	// Remove (== don't flush) all memory card pages that haven't actually changed.
	for ( auto oldIt = m_oldDataCache.begin(); oldIt != m_oldDataCache.end(); ++oldIt ) {
		auto newIt = m_cache.find( oldIt->first );
		assert( newIt != m_cache.end() ); // if this isn't true something broke somewhere, the two maps should always contain the same pages
		if ( memcmp( &oldIt->second.raw[0], &newIt->second.raw[0], PageSize ) == 0 ) {
			m_cache.erase( newIt );
		}
	}
	m_oldDataCache.clear();
It can fail in edge cases that don't actually seem too unlikely. Imagine a save being deleted, and then a new save from the same game but in a different slot being created quickly afterwards. It seems quite possible that the new save's file data then occupies the exact same pages as the old save's, and since it's from the same game it might be close enough to where a page sized section (juse 0x200 bytes!) matches the data from the old save that previously resided in that location -- which would cause this code to throw away and not flush this data! It's a shame too, since this variant would be a few ms faster as well, but I feel it's better to be safe than sorry here.
2015-07-12 14:38:21 +02:00
Admiral H. Curtiss 03a6be28c0 FolderMemoryCard: Write the SuperBlock as part of Flush() instead of when the card is Close()d.
This mainly means that the superblock is now no longer written every single time the memory card is closed, but only when it's changed (which should be exactly once, when the memory card is formatted). It also means that you can format a memory card and then have the emulator crash later without having to reformat the card next time.
2015-07-12 14:38:20 +02:00
Admiral H. Curtiss 3a55360572 FolderMemoryCard: Fix a bug where the cache wouldn't be populated properly on first write to any given page.
I'm kinda surprised this didn't horribly break things, honestly. I guess it's because memory card data is always written in blocks, but still.
2015-07-12 14:38:20 +02:00
Admiral H. Curtiss 8e92d25b75 FolderMemoryCard: Add support for deleting of files/folders.
We're not actually deleting files though, we just rename them to prepend _pcsx2_deleted_, in case something breaks or whatever, so the user can in an emergency just restore the save by removing that part of the filename.
2015-07-12 14:38:19 +02:00
Admiral H. Curtiss 798ec3eb9c FolderMemoryCard: Some code cleanup. Use more named constants, mark methods as const where appropriate, and some other minor things. 2015-07-12 14:38:18 +02:00
Admiral H. Curtiss c0cc91fd0a FolderMemoryCard: Only add folders if all files and subfolders in it also fit into the remaining memory card space.
This avoids situations where, for example, it would only add the icon file but not the game data file because the memory card was near-full.
2015-07-12 14:38:18 +02:00