Commit graph

309 commits

Author SHA1 Message Date
degasus
c5fa3e0f3d move RestoreAPIState and ResetAPIState into backends
it's a backend specific hack, so it should be here
should give a small speedup in dx11 efb2tex
2013-01-28 18:16:03 +01:00
degasus
e0ffdda26e Merge branch 'immediate-removal' into GLSL-master
Conflicts:
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp

immediate-removal is a new created branch seperated from master but reverted the revert of immediate-removal
so we get less conflicts by merging
2013-01-24 16:58:28 +01:00
degasus
e7d5b274c0 add stage parameter for texture load, so ogl can bind to the correct sampler 2013-01-19 00:47:48 +01:00
lioncash
0ef3bd9c77 Revert "Made several variables/parameters unsigned in the DX9, DX11 and OGL plugins. They make more sense like this (given their names)."
Turns out I was wrong in my previous commit. My bad.

This reverts commit 8743166663.
2013-01-16 15:46:11 -05:00
lioncash
8743166663 Made several variables/parameters unsigned in the DX9, DX11 and OGL plugins. They make more sense like this (given their names).
This also gets rid of some more typecasts in some cases.
2013-01-16 09:42:51 -05:00
degasus
2f78986e2c Merge branch 'Graphic_Update' into GLSL-master
Conflicts:
	Source/Core/VideoCommon/Src/VertexManagerBase.cpp
	Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
2013-01-14 21:36:31 +01:00
degasus
ff5ac8c505 fix win compiler errors 2013-01-14 20:08:53 +01:00
NeoBrainX
be706a3977 Disable color writing when alpha test always fails. 2013-01-08 18:56:01 +01:00
NeoBrainX
e979b2d4a2 DX11: Fix a small mistake.
Remove some incorrect and/or confusing comments.

Fixes issue 5251. Thanks to limburgerite :)
2013-01-08 18:16:48 +01:00
degasus
316a33d1e6 Merge branch 'master' into GLSL-master
Conflicts:
	Source/Core/DolphinWX/Src/VideoConfigDiag.h
	Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
2012-12-27 10:36:54 +01:00
Matthew Parlane
e3eebdf591 Fixes swprintf_s issues hopefully.
Also fixed an include not using correct caps.

According to:
http://connect.microsoft.com/VisualStudio/feedback/details/646532
2012-12-23 20:25:11 +13:00
rog
30718230b2 Fix some warnings. 2012-12-06 20:25:07 -05:00
NeoBrainX
4ff9e03509 Merge branch 'efb_scaling_fixes'. 2012-11-19 13:18:57 +01:00
NeoBrainX
a38bb488d2 Remove Renderer::xScale and Renderer::yScale. 2012-11-16 14:29:09 +01:00
NeoBrainX
78031c2d54 Move ComputeDrawRectangle() to Renderer::UpdateDrawRectangle(). 2012-11-16 14:25:49 +01:00
rog
14aa7150d9 Add option for author name for movies. Also, minor cleanup for previous options i've added. 2012-11-14 16:23:20 -05:00
rog
a5d210129d Add an on screen lag counter. 2012-11-11 17:57:06 -05:00
rodolfoosvaldobogado
ee72852491 implement some code to reduce the amounts of calls to setup vertex format, in d3d9 it gives no noticeable speedup, in opengl it still does not work right.
thanks to neobrain for the idea
2012-10-26 23:18:09 -03:00
rodolfoosvaldobogado
eaa1ea71c1 Implement the new buffer approach in opengl. sadly in my machine it gives my only 2 more fps and if your hardware does not support ARB_map_buffer_range is even slower than plain vertex arrays.
change naming in all the backends vertex managers to make more easy to continue with the merge an some future improvements.
please test this as i'm interested in knowing the performance in linux and windows with the different hardware platforms.
2012-10-26 11:34:02 -03:00
rodolfoosvaldobogado
72cb1734ee Some code cleaning for my last commit.
the amount and size of the buffer is now changed to "new hardware" frienly values and will fall back to the right values if hardware does not support them.
my next commit will be to a branch, with my ogl work.
2012-10-22 19:37:26 -03:00
rodolfoosvaldobogado@gmail.com
5230146c73 Hey, long time no commits :).
So to compensate lets bring back some speed to the emulation.
change a little the way the vertex are send to the gpu,
This first implementation changes dx9 a lot and dx11 a little to increase the parallelism between the cpu and gpu.
ogl: is my next step in ogl is a little more trickier so i have to take a little more time.
the original concept is Marcos idea, with my little touch to make it even more faster.
what to look for: SPEEEEEDDD :).
please test it a lot and let me know if you see any problem.
in dx9 the code is prepared to fall back to the previous implementation if your card does not support the amount of buffers needed.
So if you did not experience any speed gains you know where is the problem :).
for the ones with more experience and compression of the code please test changing the amount and size of the buffers to tune this for your specific machine.
The current values are the sweet spot for my machine.
All must Thanks Marcos, I hate him for giving good ideas when I'm full of work.
2012-10-20 10:22:15 -03:00
Ryan Houdek
a357c77257 Add in GLSL setting again.
PS and VS making. Untested and won't work for now.

Add in program shader cache files.

Readd NativeVertexFormat stuffs.

Add in PS and VS cache things.

SetShaders in places.

Fixed EFB cache index computations in OpenGL renderer.

The previous computation was very likely to go out of array bounds,
which could result in crashes on EFB access.

Also, the cache size was rounded down instead of up. This is a problem
since EFB_HEIGHT (528) is not a multiple of EFB_CACHE_RECT_SIZE (64).
2012-10-09 23:23:37 -05:00
Pierre Bourdon
8cefcaa94c Implement a simple benchmarking mode which logs FPS to a file
Very useful to compare performance between two builds, check the impact of
a configuration option, etc. FPS log is stored in User/Logs/fps.txt and is
reset each time you launch a game. Only enabled if you check the "Log FPS
to file" option in your graphics settings.

Could be improved a bit: currently logs only every 1s (so you can't really
see small variations), maybe output more infos to the fps.txt like
average/stddev (but Excel/Libreoffice/Google Docs can compute that easily
too).
2012-10-04 05:41:02 +02:00
NeoBrainX
035840e7b5 Move last XFB size from Render to FramebufferManager. 2012-10-03 13:44:35 +02:00
NeoBrainX
8f5223d0e6 More cleanups. 2012-10-03 13:44:13 +02:00
NeoBrainX
6e4a61a991 Minor cleanups. 2012-10-03 13:44:04 +02:00
NeoBrainX
ac2ce8b16e Video_DX11: Remove some redundant code. 2012-09-27 18:15:45 +02:00
NeoBrainX
08a9c66037 Revert the recent zcomploc changes including the Graphic_Fixes merge.
Reason:
- It's wrong, zcomploc can't be emulated perfectly in HW backends without severely impacting performance.
- It provides virtually no advantages over the previous hack while introducing lots of code.
- There is a better alternative: If people insist on having some sort of valid zcomploc emulation, I suggest rendering each primitive separately while using a _clean_ dual-pass approach to emulate zcomploc.

This reverts commit 0efd4e5c29.
This reverts commit b4ec836aca.
This reverts commit bb4c9e2205.
This reverts commit 146b02615c.
2012-08-10 20:12:02 +02:00
NeoBrainX
c143e08b9a Recreate screenshot texture whenever the backbuffer resolution changes. Fixes crashes when taking screenshots after changing window size or switching to/from fullscreen mode. 2012-08-07 15:18:10 +02:00
NeoBrainX
1c8cdebc22 Set g_texture_cache to NULL upon shutdown. Fixes a crash introduced in previous commits. 2012-06-21 14:21:16 +02:00
NeoBrainX
cc0523e55b TextureCache: Properly assign texture hashes when EFB to RAM is used without caching.
Fixes issue 5472.
2012-06-20 18:18:21 +02:00
NeoBrainX
8d30ac462a Instead of invalidating texcache whenever the graphics configuration dialog gets opened, clean up textures on configuration changes. 2012-06-20 18:18:05 +02:00
NeoBrainX
b5ad382b07 Fast mipmaps deserves to die!! 2012-06-08 00:22:57 +02:00
skidau
146b02615c Merge rodolfoosvaldobogado's zcomploc code (Graphic_Fixes branch) 2012-05-26 13:47:07 +10:00
NeoBrainX
a5e68ab10e TextureCacheBase: Support dumping individual mipmaps. 2012-05-13 17:41:04 +02:00
skidau
ec0ddb476e Fixed texture encoding in DX11. Thanks to wordmanwords for the patch. 2012-05-06 10:51:38 +10:00
rodolfoosvaldobogado
6a446efd5f Second Stage: re implement zcomplock and correct all the logic error in PixelShaderGen.cpp. i disable fastzcomlock for the moment to avoid confusions.
please test for regressions
2012-04-03 00:08:36 -03:00
rodolfoosvaldobogado
a0d60210fd First Stage:
Fix depth related errors in dstalpha pass.
best place to test: water splash effect in super mario galaxy
2012-04-02 14:26:12 -03:00
NeoBrainX
460610ea0e Revert Rodolfo's recent zcomploc commits until they actually work correctly.
This reverts commit 402006a83a.
This reverts commit 48d8d71391.
This reverts commit 450dcc9d2c.
2012-03-30 01:57:53 +02:00
rodolfoosvaldobogado
450dcc9d2c As requested, this is my implementation of zcomploc using a multi-pass algorithm. My apologize to the others devs for committing in the main branch but is the only way to get this tested as soon as possible.
please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev.
please as soon as yo find a bug let me know.
2012-03-27 15:44:58 -03:00
Shawn Hoffman
d15740daf1 Merge branch 'wxw3-update' 2012-03-25 12:27:38 -07:00
NeoBrainX
fee98b426b Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong). 2012-03-24 15:58:44 +01:00
NeoBrainX
2afe605069 D3D11: Disable mipmapping when no mipmap filter is selected. 2012-03-24 06:04:00 +01:00
Shawn Hoffman
c3d13b048c build against wxWidgets3 from Externals on Windows.
use Externals version of libpng on Windows.
2012-03-18 02:31:19 -07:00
Henrik Rydgard
f5d4fe0bfe Fix some minor bugs pointed out by PVS Studio (thanks!) 2012-03-03 20:07:20 +01:00
NeoBrainX
3a9fed0ba2 PixelShaderGen: Fix a bug introduced in revision 9adc119e3c.
D3D11: Fix shader constant mapping.
2012-02-21 12:51:41 +01:00
NeoBrainX
9adc119e3c PixelShaderGen: For custom textures and scaled EFB copies, use correct texel to pixel mapping when sampling textures
(D3D9 only)

This is basically the same as revision e58692653a, just for scaled textures and with a LOT more work...
2012-02-20 20:32:08 +01:00
Matthew Parlane
fc3eb7c6a7 Fixed a few warnings. 2012-02-09 17:18:46 +13:00
NeoBrainX
eb01a110c9 Implement texture preloading 2012-02-03 21:21:13 +01:00
NeoBrainX
1446fb33d5 TextureCacheBase: Replace the efbcopy_state member variable of texture cache entries with a more general "texture type" 2012-01-31 19:52:02 +01:00