Commit Graph

7225 Commits

Author SHA1 Message Date
Gregory Hainaut 0a7eed686c Merge pull request #763 from PCSX2/gsdx-texture-format
Gsdx improves texture format setup
2015-09-11 14:44:31 +02:00
Gregory Hainaut cee0fde940 gsdx-tc: improve support of TEXA register
* Greatly reduce the number of clut read (factor 10x)
* Avoid to get wrong TEXA texture in the cache.
* Fix "jump depends on uninitialized variable" Valgrind warning.

Fix #748

I try my best to avoid any breakage of DX but please test it too.
2015-09-11 14:16:11 +02:00
Gregory Hainaut 78569ee833 gsdx-ogl: redo properly the setup of texture format
* add lengthly comment to explain the format
* Likely reduce the number of shader permutation
* Avoid slow AEM (on GPU)

Expect regressions because TC needs some fixes

v2: fix palette mode
2015-09-11 14:14:22 +02:00
Gregory Hainaut 6c7ce3465e pcsx2:CDVD: guarantee that index of mg_zones array is below than 8
CID 146917 (#1 of 1): Untrusted array index read (TAINTED_SCALAR)
tainted_data: Using tainted variable cdvd.Result[1] as an index into an array mg_zones
2015-09-11 09:25:09 +02:00
Gregory Hainaut 8928c3e7f1 onepad: be sure pad variable is 0 or 1
CID 146918 (#1 of 1): Use of untrusted scalar value (TAINTED_SCALAR)
tainted_data: Passing tainted variable pad to a tainted sink
2015-09-11 09:18:49 +02:00
Gregory Hainaut 113c0aa411 pcsx2: use sizeof of object instead of pointer (portability)
CID 146912 (#1 of 1): Sizeof not portable (SIZEOF_MISMATCH)
suspicious_sizeof: Passing argument recConstBuf of type u32 * and argument 131072U /* RECCONSTBUF_SIZE * sizeof (recConstBuf) */ to function memset is suspicious. In this case, sizeof (u32 *) is equal to sizeof (u32), but this is not a portable assumption.
2015-09-11 08:54:29 +02:00
Gregory Hainaut 2430abed33 gsdx: potential division by zero
CID 146833 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)
divide_by_zero: In expression this->m_width / this->m_upscale_multiplier, division by expression this->m_upscale_multiplier which may be zero has undefined behavior.
2015-09-11 08:54:29 +02:00
Gregory Hainaut e6d1a4cccf gsdx: avoid a potential division by zero
CID 146835 (#1 of 1): Division or modulo by float zero (DIVIDE_BY_ZERO)
50. divide_by_zero: In expression (float)(end - start) / (float)frame_number, division by expression frame_number which may be zero has undefined behavior
2015-09-11 08:54:29 +02:00
Gregory Hainaut 2934a15902 gsdx: remove a duplicated check 2015-09-11 08:54:29 +02:00
Gregory Hainaut f092f9045c pcsx2: initialize the block pointer
There is a check on it on the resize function
2015-09-11 08:54:29 +02:00
Gregory Hainaut ac8f4e69d6 pcsx2|gsdx: avoid potential null deferencement 2015-09-11 08:54:29 +02:00
Gregory Hainaut 0260c9119e common: suspicious missing comma 2015-09-11 08:54:29 +02:00
Gregory Hainaut 1baa6be6de debugger: enforce a null terminated char of a C-string
CID 146728 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)
buffer_size_warning: Calling strncpy with a maximum size argument of 128 bytes on destination array mod.name of size 128 bytes might leave the destination string unterminated
2015-09-11 08:52:05 +02:00
Gregory Hainaut b082147c4d onepad: avoid potential resource leak 2015-09-10 14:21:27 +02:00
Gregory Hainaut f4f08b9c99 pcsx2: avoid couple of out-of-bounds access 2015-09-10 14:20:51 +02:00
Gregory Hainaut c687c73edd pcsx2:debugger: avoid strlen call on random data 2015-09-10 13:46:36 +02:00
Gregory Hainaut 0bcaff4214 pcsx2:cdvd/debug: various uninitialized data
Most of the time, code is correct. In doubt always init the value.
2015-09-10 13:45:42 +02:00
Gregory Hainaut 5e8f899620 pcsx2:debug: miss a break that lead to a mem leak 2015-09-10 13:42:23 +02:00
Gregory Hainaut 5c933a7faf pcsx2:gzip: free the index
Normally index will be NULL if len is 0 but it won't hurt
2015-09-10 13:41:22 +02:00
Gregory Hainaut 8b2de15096 build: add an option to build a coverity DB 2015-09-10 13:40:45 +02:00
refractionpcsx2 2a8bae187f Merge pull request #811 from micove/GSdx_Debug
Rename Release/Debug SSE2 to Release/Debug.
2015-09-09 23:28:05 +01:00
Miguel A. Colón Vélez 26e2b4a5be Rename Release/Debug SSE2 to Release/Debug. 2015-09-08 23:17:07 -04:00
Jonathan Li d8a7bfd438 gui: Adjust mainframe size and status bar position
There are a few odd things with Windows and the background logo.
1. The windows containing the logo is smaller than the logo.
2. The fitting algorithm doesn't work at 200% DPI.

Both make no sense, but can apparently be worked around.
2015-09-08 18:47:45 +01:00
Jonathan Li bcc125ceb6 gui:windows: Implement image DPI scaling
This should reproduce the old non-DPI aware pre-wxWidgets 3.0 behaviour
for the main dialogs, except the font rendering should be better.

And add comments that I should have already added but didn't.
2015-09-08 18:47:44 +01:00
Jonathan Li 59ffed85ba gui: Fix image list scaling
The listbook images aren't rescaled unless the embedded icons are used.
Make sure all the images are correctly rescaled.
2015-09-08 18:27:48 +01:00
Jonathan Li 5cf94e5a15 gui: Allow screenshot icon to be themed.
The logo and all the other icons can apparently be themed (though
theming is a bit broken). Let's allow the camera screenshot to be
themed as well.
2015-09-08 18:27:48 +01:00
Jonathan Li 2263961d4d gui: Simplify and rework EmbeddedImage class
The wxImage Scale/Rescale methods with wxIMAGE_QUALITY_HIGH upsamples
and downsamples using the bicubic and box resampling methods
respectively, so let's just use that instead of the ResampleBox method,
which is undocumentated and probably shouldn't be used.

The Rescale function also modified the image when it was not supposed
to. Fix it, and rename it scale to avoid confusion with the wxWidgets
class.
2015-09-08 18:27:48 +01:00
Gregory Hainaut ddc03cbccf gsdx: add a nice enum to replace the hardcoded convert shader 2015-09-08 16:51:24 +02:00
Gregory Hainaut 1ae0fed83b gsdx: fix a regression due to the shader renaming 2015-09-08 16:06:15 +02:00
Gregory Hainaut 81e056e79a gsdx: always enable the boost queue
ifdef was for VS2010

GSThread.h is useless. I keep it for the transactional queue implementation
2015-09-08 14:43:09 +02:00
Gregory Hainaut 3706cfe908 gsdx: always enable CXX11 mutex feature.
ifdef was only useful for VS2010
2015-09-08 14:34:17 +02:00
Gregory Hainaut ca9b5ce11d gsdx-ogl: move depth conversion shader
Add 2 new shaders:
* ps_main12: cast a 16 bit depth to a RGB5A1 color
* ps_main16: cast a a RGB5A1 color to a 16 bit depth

Shader might be used in future commit as it seems Silent Hill uses this
kind of format.

Fix tab/indentation too
2015-09-08 12:41:05 +02:00
Gregory Hainaut 4eed4ca3a1 gsdx-debug: restore 16 bit dump format in the SW renderer
Actually dump both 32/16 bits (former for texture shuffle and later
for real 16 bits RT)
2015-09-08 12:41:05 +02:00
Jonathan Li 9d4a8688c1 Merge pull request #801 from turtleli/windows-left-list-icons
Have listbook icons (Emulation Settings, Plugin BIOS selector) on the left for all platforms.
Don't set minimum widths for Framelimiter and Frameskip panels.
2015-09-07 08:46:49 +01:00
Jonathan Li 1d2d8cd38b gui: Don't set min widths for Framelimiter/skip panels
It causes weird behaviour at higher DPIs.
2015-09-07 08:26:20 +01:00
Jonathan Li 5e9ba64db8 gui: Have listbook icons on left for all platforms
On Windows, this fixes the minimise/restore weird dialog bug on the
Emulation Settings and Plugin/BIOS selector dialogs. It also fixes a bug
at high DPI, where it becomes difficult to click on GUI elements at the
top of the dialog.

It also makes it easier for me to work on the Windows DPI stuff, I don't
have a 4k monitor.
2015-09-07 08:25:56 +01:00
Jonathan Li ca0aeb8e62 Windows: Avoid lockup for RuntimeError exception
This is the same problem that the Plugin Open and BIOS load exceptions
had - The message box pops up, intercepts the hide event for GSFrame and
leaves you with no alternative but to terminate PCSX2 via the Task
Manager.

The same solution applies - Close the GSFrame first.
2015-09-06 20:36:19 +01:00
Jonathan Li d87b34ab36 gui: Increase presets message width
This prevents clipping at 200% DPI on Windows.
2015-09-05 23:10:15 +01:00
Jonathan Li e2f1bafeef gui:windows: Fix tooltip wrapping
wxWidgets 3.0 now wraps tooltips automatically on Windows, so the custom
tooltip wrapping functionality is no longer necessary.
2015-09-04 22:54:11 +01:00
Jonathan Li 31a505768d gui: Use SetSizerAndFit after dialogs are constructed.
It seems to fix the button UI problem for Linux wx3.0 builds.
2015-09-04 17:58:25 +01:00
Jonathan Li 9052930ebc Merge pull request #791 from turtleli/gsdx-gui-changes
Add tooltips to Windows GUI. Fixes #578.
Rearrange Window GSdx GUI a bit.
Reformat tooltip descriptions to be both Linux and Windows (un)friendly.
Add new tooltip descriptions.
2015-09-03 22:49:41 +01:00
Jonathan Li 2b6d44a043 gui: Fix Emulation Settings dialog, GS section
Expand "Disable Framelimiting" and "Synchronised MTGS". Fixes message
truncation on Linux, and Windows at higher DPI.

Don't use pxFitDigits on Spin Controls - the sizing algorithm fails
horribly on GTK3, which means you can't see anything.

And don't use a row of spacers - it causes a minor display issue with
GTK3.
2015-09-03 17:22:12 +01:00
Jonathan Li 288931ddc3 Merge pull request #781 from ssakash/patch-49
Fix Windows Lilypad local volume control GUI checkbox.
Make MicroVU E-bit delay slot warning a Dev warning.
Don't minimise GS Window if main window is minimised.
2015-09-02 21:51:04 +01:00
Akash b5aceceef2 don't minimize GS window along with main window.
previously the GS window (rendering window) also gets minimized with the Main window (GUI) whenever it gets minimized. many users didn't like this behavior, hence make it so that GS window doesn't get minimized along with the main one.

The parent window pointer parameter is no longer needed, since the parent parameter at WX Frame has been replaced with Null which doesn't force minimize it due to no parent relationship.
2015-09-02 08:27:18 +05:30
Akash 8ebe03a89d MicroVU: use DevCon.Warning for E-bit delay slot.
The following E-bit delay slot warning initially used a console error message which has a sort of bright red which would cause users to provide a lot of attention towards to it, whereas it isn't much to be bothered since it doesn't cause any issues on the game according to refraction it was already dealt with on the code.

So, use a proper warning indicator instead of a error log message.
2015-09-02 08:27:15 +05:30
Jonathan Li e5f045c375 gsdx: Add new tooltips and descriptions.
For Linux and Windows, add tooltip descriptions for AF, AA1, extra
rendering threads, Enable Shade Boost, FX Shader/External Shader, FXAA.

For Windows, also add Alpha Correction and Logarithmic Z tooltips.

For Linux, add software mipmap tooltip.

Thanks to tsunami2311, ssakash, gregory38 and whoever did the wiki for
helping with descriptions.
2015-09-01 19:25:28 +01:00
Jonathan Li 55adc7e728 gsdx: tooltip description formatting and minor fixes
The hack description box messages were replaced by tooltips on Windows,
so there is no need for the first line in the description to refer to
the hack anymore.

3-state checkboxes were also converted to comboboxes, so remove any
references to checkbox states.

Reformat the descriptions so it looks okay on both Windows and Linux.
Could be better, but I'm out of ideas.

Also fix a few typos and missing punctuation.
2015-09-01 19:25:27 +01:00
Jonathan Li b687b106f1 gsdx: Removed unnecessary defines and functions
The changes to the Hacks dialog removes the need for these defines.

Also remove the swap_state function since it's now unused.
2015-09-01 19:25:26 +01:00
Jonathan Li c72b4d6e8a gsdx:windows: Rework hacks dialog to use tooltips
Changes the three-state checkboxes to comboboxes.
Removes the hack description box.
Hides Alpha and Alpha Stencil when OpenGL is selected.
Rearranges the hacks dialog.
2015-09-01 19:25:26 +01:00
Jonathan Li fcc8a941b0 gsdx:windows: Redo main dialog
This moves the hardware, non-renderer dependent options to the top and
makes the renderer options visible only when it affects the current
renderer.

The texture filtering checkbox has been changed to a combobox and now
uses the same description as Linux does.

Also changes the Title to GSdx Settings.
2015-09-01 19:25:25 +01:00