Commit graph

760 commits

Author SHA1 Message Date
degasus
4883fa268f Split VideoBackend::Cleanup from Shutdown.
First is called from ogl/d3d thread, second is called from emulation thread (x11...)
2013-02-26 16:42:32 +01:00
degasus
a629dea4dc Merge branch 'master' into GLSL-master
Conflicts:
	CMakeLists.txt
	Source/Core/DolphinWX/Dolphin.vcxproj
	Source/Core/DolphinWX/Src/GLInterface/WX.cpp
	Source/Core/DolphinWX/Src/GLInterface/WX.h
	Source/Core/VideoCommon/Src/TextureCacheBase.cpp
	Source/Core/VideoCommon/Src/TextureCacheBase.h
	Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h
	Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.h
	Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp

damn mipmap_fixes ...
2013-02-18 18:49:20 +01:00
Jordan Woyak
d994e56b60 Changes/cleanup to TextureCache::Load and other mipmap related code.
The significant change is what is now line 520 of TextureCacheBase.cpp:
((std::max(mipWidth, bsw) * std::max(mipHeight, bsh) * bsdepth) >> 1)
to
TexDecoder_GetTextureSizeInBytes(expanded_mip_width, expanded_mip_height, texformat);

Fixes issue 5328.
Fixes issue 5461.
2013-02-15 22:56:29 -06:00
NeoBrainX
95d08db46f Revert "[bugfix] DX9::TextureCache: Use max_lod instead of min_lod where necessary."
This reverts commit 6c8a22de24.
2013-02-07 21:45:06 +01:00
NeoBrainX
ed0abc9dc5 Merge branch 'mipmap_fixes'. 2013-02-07 20:40:33 +01:00
NeoBrainX
6870c1fdd5 Fix some potential issues when blending on EFB formats without alpha.
Clean up state transition tables.
2013-02-07 18:01:24 +01:00
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
e204a6e015 Add some TODOs. 2013-01-08 18:56:01 +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
Matthew Parlane
089434b719 Apply same force to float fix as has already been done for DX11. 2012-12-23 20:01:58 +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
8fe5aa4ee8 movie cleanup 2012-11-12 20:40:11 -05:00
rodolfoosvaldobogado
0809ba79ae fix for point rendering in dx9 backend, that will teach me to read the full documentation. if someone founs a games that use points a lot i will try to implement a faster path for point rendering.
now the map in twin snakes is functional in all the backends.
2012-11-12 19:37:08 -03:00
rodolfoosvaldobogado
3936c06ee8 more fixes for my last commit, player problem in twin snakes is fixed 2012-11-11 22:39:27 -03:00
rog
a5d210129d Add an on screen lag counter. 2012-11-11 17:57:06 -05:00
rodolfoosvaldobogado
53b62ab169 This should fix the bugs introduced by my last commit please retest the games that where showing graphical glitches. 2012-11-10 11:37:08 -03: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
NeoBrainX
52963584f0 [bugfix] Make sure to specify the correct max lod level. 2012-10-20 21:07:03 +02:00
NeoBrainX
9d5fc3d7f0 [bugfix] Properly decode lod_bias. 2012-10-20 21:07:03 +02:00
NeoBrainX
6c8a22de24 [bugfix] DX9::TextureCache: Use max_lod instead of min_lod where necessary. 2012-10-20 21:07:03 +02:00
NeoBrainX
0706050b74 [cleanup] Vastly clean up backend-specific sampler state logic. 2012-10-20 21:07:02 +02:00
NeoBrainX
069d949a57 [cleanup] TextureCache: Kill the autogen_mipmap parameter 2012-10-20 21:07:02 +02: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
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
skidau
0efd4e5c29 Skipped the ZCompLoc pass if the result can be determined at compile time. Brings back the speed lost by r146b02615c07. 2012-08-06 09:29:01 +10: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
8bed27a3d1 Enable hires textures even when texture dumping is enabled.
Remove some deprecated code.
2012-06-20 18:18:17 +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