Commit Graph

74 Commits

Author SHA1 Message Date
Gregory Hainaut 9865270e68 gsdx: split GSVector.h into smaller files 2017-03-19 13:50:13 +01:00
Gregory Hainaut 7d3c850813 gsdx ogl: improve ST/Q precision
When a float overflow is detected, geometry shader is disabled. And ST/Q is done on the CPU

It will help
Issue 551
Issue 1684
2017-03-11 00:24:38 +01:00
Akash a2cdcb4e4d GSdx-PCRTC: Improve output circuit selection
Previously, the auto output circuit selection of the GSdx wasn't good, it simply defaulted to the second output circuit even when the first output circuit is also enabled. The new algorithm for auto selecting returns the merged rectangle dimensions when both of the output circuits are enabled and if the condition for merge is not satisfied then it returns the bigger output circuit.
2017-01-30 15:29:28 +01:00
Akash 055f236aa5 GSVector: Add constructor to dispatch same values 2016-11-01 17:54:46 +01:00
Gregory Hainaut 90707f8d4e gsdx: avoid aliasing issue
Extend GSVector to support float move

Initial code likely used integer move for performance reason. However due to
the nan correction, register is now in float domain.
2016-08-14 20:48:34 +02:00
Jonathan Li e5ea4cc5d4 gsdx: Defer vector initialisation to GS/GPUinit
It can cause PCSX2 to crash if the instructions aren't supported.
2016-07-27 23:34:14 +01:00
Jonathan Li da2046e90e gsdx: Use alignas instead of __aligned
__aligned is defined in FreeBSD headers and will cause compile errors.
2016-05-21 13:23:11 +01:00
Gregory Hainaut d129aedfe8 GSdx:vector: add sllv32 and srlv32 for 128 bits op
(variable shift)
2016-04-14 10:18:43 +02:00
Jonathan Li 0f11838d93 gsdx: s/_WINDOWS/_WIN32/
It's the proper Windows preprocessor macro.
2016-01-27 22:41:45 +00:00
Jonathan Li 14dffa762b gsdx: Add runion_ordered to GSVector
Allows to save a few instructions cycles when xy and zw are already
sorted (min and max rectangle coords).
2016-01-16 19:21:55 +00:00
Gregory Hainaut f3394b16b8 gsdx: use standard quote character
Nicer with tool that support ANSII text (cppcheck)
2015-11-06 23:01:58 +01:00
Jonathan Li c088039394 gsdx:linux: Fix clang compile
Everything seems to compile and run with clang 3.7.0 now. I don't know
if clang 3.6.x works or not. 3.5.x doesn't.
2015-09-21 20:45:50 +01:00
gabest11 e010004f1f gsdx: _isnan was not reliable, rewrote it as GSVector4::replace_nan, it uses cmpps and the result as the mask to blend the original value and FLT_MAX. No jumps or function calls. 2015-08-03 14:35:47 +02:00
Gregory Hainaut b6a951a9fa gsdx: debug compilation fix
I'm not sure gcc behavior is correct here!
2014-11-11 20:54:34 +01:00
Gregory Hainaut 48b3d91768 partially revert previous commit ec1da2805c
It breaks windows...
2014-11-10 12:19:30 +01:00
Gregory Hainaut ec1da2805c pcsx2/GSdx: disable AVX for the moment on linux
I need to check carefully the consequence of ABI change. So far wx is very unhappy!

Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6),
and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1006,wx containers,compatible with 2.6).
2014-11-09 15:45:54 +01:00
Gregory Hainaut f25e056914 gsdx: enable AVX with GCC
* Use overloaded function instead of specialized template
=> see http://stackoverflow.com/questions/3052579/explicit-specialization-in-non-namespace-scope

* replace _mm256_slli_si128 by _mm256_slli_si256
  I hope they're equivalent. I didn't find any info on _mm256_slli_si128,
  however srl use _mm256_srli_si256
2014-10-26 14:47:35 +01:00
refraction 5b14ca0fb9 GSDX: Clear up all compiler warnings. No changes to emulation.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5840 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-26 00:58:21 +00:00
gregory.hainaut f22b366cea gsdx:
* redo glsl2h.pl script to generate only one big glsl headers.
* fix gcc warning in GSVector.h
* fix memory leak of GSDeviceOGL.m_shader
* clean shader compilation function => split generation header & drop malloc stuff
cmake:
* only rebuild shader when asked by the use. Avoid perl dependency to build pcsx2


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5698 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-07 16:13:11 +00:00
gabest11 ddaa892726 Removed ATL/MFC dependencies from every project, the free version of visual studio does not have those. It compiles with vs2012 express now, will fix others later, in case they are broken.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5692 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-01 21:28:58 +00:00
gabest11@gmail.com 9cd463e4f8 GSdx: obligatory vs2010 compiler fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5681 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-24 06:29:08 +00:00
gabest11@gmail.com 4dd898c754 GSdx: Found some 16-bit integer overflow in GSState::VertexKick, some triangles could have been removed by the scissor test.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5680 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-24 01:11:00 +00:00
gabest11@gmail.com 20d99ae9fc GSdx: vs2010 fix and minor changes
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5678 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-23 10:46:24 +00:00
gabest11@gmail.com d20bd4f86a GSdx: The sw renderer now uses avx2, not much faster though, +10% maybe, if the game is not EE limited. I'm not sure if haswell has that much better sse execution (load/store units doubled for example), or the avx2 code is not fully optimized yet.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5677 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-20 05:07:52 +00:00
gabest11@gmail.com 3b753bec42 GSdx: sse2/ssse3 missing graphics fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5676 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-18 00:25:46 +00:00
gabest11@gmail.com 8b9f5b5bc2 GSdx: More avx2 code to read/write different block formats, the GSBenchmark function shows nice improvements, but no games run faster. I just upload the changes before messing with the drawing part.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5675 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-17 04:11:10 +00:00
gabest11@gmail.com c94ee5e4ce GSdx: one more try to fix vs2010
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5654 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-10 20:43:03 +00:00
gabest11@gmail.com 43c7235cc3 GSdx: Added a vector class for AVX2 and upgraded a few functions to use it, still a lot to do. New project config AVX2, _M_SSE = 0x501, only use it if you have haswell. Might break GCC or older MSVC, please test it.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5652 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-10 15:56:11 +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
gabest11 67ef781116 GSdx: this may fix silent hill shadows and mister mosquito intro blur, also reduced texture cache keep-alive time from 30 to 10 frames and found two memory leaks, killzone can run a few seconds longer before crashing, I think there is something in pcsx2 allocating too much memory.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5096 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-12 17:56:06 +00:00
gabest11 9b8c753ead GSdx: broken frame skipping should be fixed, and a few random sw renderer optimizations.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5077 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-21 04:44:04 +00:00
gabest11 6a86a6520d GSdx: made a little mistake masking the unused giftag regs, when all 16 were in-use
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5076 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-20 00:34:44 +00:00
gabest11 9ec7f14fa8 GSdx: Simplified vertex formats and the related code, everything works with the basic GSVertex until it gets uploaded to the vertex buffer.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5074 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-19 04:53:36 +00:00
gabest11 f68f007f00 GSdx: the promised index buffer update, needed a lot of changes, expect bugs in the next dozen revisions.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5045 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-05 02:40:24 +00:00
gabest11 9d54677055 GSdx: re-implemented the drawing pipeline in c++, just for reference and easier debugging.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4972 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-11-25 23:48:59 +00:00
gabest11 cc8d14511b GSdx: the texture cache fix discussed under r4589.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4592 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-04-25 01:44:00 +00:00
gabest11 732b038571 GSdx: mipmapping fix (ford mustang racing, and probably other games which use small, non-square textures)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4529 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-04-04 11:05:54 +00:00
gabest11 686b6da8e5 GSdx: finally, some use for hsubps (SSE3).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4504 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-29 06:45:35 +00:00
gabest11 47713eee81 GSdx: Replaced a few divs with something more obscure in DrawTriangle, it shares necessary calculations with the triangle setup for tile based rasterization (http://drdobbs.com/article/print?articleId=217200602). AVX already has half the floating point capacity of larrabee, but I'm still thinking how to do this efficiently. We could take advantage of the block organized GS memory at last.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4498 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-27 15:46:32 +00:00
gabest11 8ca01f4b77 GSdx: only minor changes
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4494 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-27 03:12:12 +00:00
gabest11 243a0f4ad1 GSdx: (almost) complete mipmapping support, if the min/mag filter differs then bilinear is used.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4440 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-17 02:55:20 +00:00
gabest11 1d759c852d GSdx: When mipmapping is on, LOD is calculated per pixel, it isn't used for anything, but it's there. I cannot really measure any significant slowdown, but rest of the fun is yet to come.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4428 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-14 03:32:28 +00:00
gabest11 0df52e40cc GSdx: one more fix for vs2008.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4426 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-12 23:48:32 +00:00
gabest11 2cfe05d290 GSdx: the usual fixes for gcc.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4424 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-12 23:15:23 +00:00
gabest11 b31634df8f GSdx: using mipmap levels (only per batch, no tri-linear) and a couple of small changes, including the stdcall fix for linux.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4419 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-12 22:10:58 +00:00
gabest11 9586e38dd4 GSdx: still working on the rasterizer, would be nice to add some avx code there, but it's just so unfitting for anything.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4407 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-09 11:52:53 +00:00
gabest11 a96a345077 GSdx: the x64 ABI on windows is not so nice after all.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4380 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-02-28 11:08:52 +00:00
gabest11 9b658615f5 GSdx: The revision makes every super robot taisen game look perfect! Just joking :P But I tested OG and Alpha 3, and didn't notice anything terribly bad till the beginning of the first battle stage.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4335 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-02-21 23:25:25 +00:00
gabest11 d44def8c0b Fixed many gcc errors, there are still plenty. Intel's compiler might be a better alternative.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4311 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-02-18 01:56:05 +00:00
gabest11 1e6f280021 - more project cleanups and small code changes, also added the psx emu interface again
- someone should check __xgetbv under linux (avx/fma detection)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4295 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-02-12 21:45:16 +00:00