Commit Graph

125 Commits

Author SHA1 Message Date
Rodolfo Osvaldo Bogado 6b1ca64428 experimental commit: simplify even more the params. please test and if theres something wrong will revert asap
thanks for the comments in the prev commit they make my re think the approach.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5136 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-26 22:14:29 +00:00
Rodolfo Osvaldo Bogado 02189ec5e0 Simplify the params for the safe texture cache
after some test the more relevant parameters were the color samples and the tlut max size.
so delete the rest of the parameters and define 3 modes:
Safe : the two values are set to 0 meaning all the texture data and all the tlut data are hashed this is the most correct and slowwwwwwwwwww way
Normal: 37 samples are taken from the color textures an the firs 4096 bytes of the tlut are hashed, is a lot faster than safe mode but in some games i observe small glitches.
Fast: 8 samples are taken from the color textures an the first 1024 bytes are hashed from the tlut, is a little slower than the unsafe cache but at least all the games i tested have correct text output and fast frame rate. the glitches in dinamyc color textures are more noticeable in this mode
this values could be improved, if you find a better combination please post it and the game it fixes and i will update the source.
for the moment, as my time is limited by a lot of work, only implemented the d3d gui, if someone can implement the opengl gui will be a lot of help for me.
please test a lot and let me know the results.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5135 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-26 12:54:08 +00:00
Rodolfo Osvaldo Bogado 3cc5d8ce6f First a bugfix:
fixed a misbehavior in the clear code that causes depth clear problems in reference hardware (Intel as example).
add 6 parameters to optimize Safe Texture Cache:
SafeTextureCacheColorSamples, SafeTextureCacheIndexedSamples, SafeTextureCacheTlutSamples:

this 3 parameters gives the number of samples taken to calculate the final hash value, less samples = more speed, more samples = more accuracy
if 0 is specified the hash is calculated using all the data in the texture.
SafeTextureCacheColorMaxSize, SafeTextureCacheIndexedMaxSize, SafeTextureCacheTlutMaxSize:
this parameters limits the amount of data used for the hash calculation, it could appear as redundant but in some games is better to make a full hash of the first bytes instead of some samples of all the texture.

color, indexed, tlut : define the texture type, full color data, indexed, and the tlut memory.

the parameters are available in the config , no GUI at this time, if the test are OK will add it to the GUI.
if someone needs it will give more examples on how to configure the values for specific games.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5116 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-23 21:52:12 +00:00
Glenn Rice 154bc956ad Some code clean up, and take care of some compiler warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5090 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-20 04:18:19 +00:00
Rodolfo Osvaldo Bogado 6200c99dd4 test commit: please test if this improve the performance with the safe texture cache
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5038 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-10 15:55:24 +00:00
Rodolfo Osvaldo Bogado e93e777ffb second try to implement a more correct safe texture cache, implemented full hashing of tlut textures as they are the more problematic, this should solve virtually all the problems with characters in all the games that have them.
sorry to tell but this will bring a speed drop, so let you decide if this change stay or not.( used the fastest open source hash algorithm i know) 
do not apply full hashing to other format because it kills the performance.
for popular request added 9x SSAA believe me will kill your graphic card even if is the best but the image quality is exceptional.
as always please test and let me know the results.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5034 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-08 23:23:04 +00:00
Rodolfo Osvaldo Bogado 811cfb059e D3D and Opengl:
reverted a tiny leftover of my safe texture cache commit
D3D
renamed the SSAA modes to use samples as MSAA now they are 2,25x and 4x.
OpenGL:
fixed a nasty logical bug introduced in 4984 that causes efb corruption when efb to texture is used
re enabled shader caching as it was not producing errors.
fixed efb misalignment caused by integer rounding still a bit misaligned but many games will look better now

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5020 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-06 16:05:48 +00:00
Rodolfo Osvaldo Bogado 9e2bbec47f a lot of modifications here :)
first fixed scaling when updating backbuffer to make it friendly with encoders, now frame dumping must work without errors in any codec.
clean screenshot and frame dumping code now is more correct, faster and stable.
improve safe texture cache, improving the distribution of the hash algorithm, including tlut hash in the final hash of the texture, and making use of a 64 bit hash to make it more accurate.
clean a lot of code and corrected some missused vertex formats when drawing full screen quads.
and biggest change last:
implemented pseudo antialiasing: a image post-process algorithm that mimics antialiazing and is fare more easier to implement in this scenario.
you can change the intensity of the effect changing the values of the antialiasing combo. the right value depends on the game.
for example mkwii looks awesome with 8x.
please try all the changes and let me know the results.
if something is broken, please let me know and will fix it asap.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5000 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-03 03:52:50 +00:00
Glenn Rice feba09f7a3 Linux global build. At least the basic footwork is done here.
Basic usage:  "sudo scons install=global install"
Hopefully this doesn't break builds on Macs.  I have tested this on linux and windows.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4994 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-02 21:56:29 +00:00
Rodolfo Osvaldo Bogado d02426a8e9 mixed commit:
in D3D and Opengl:
fixed one nasty bug in texture loading where if a dynamic texture keeps his format but the tlut format is changed, the try or reloading the texture in the same texture could cause a hang if the size of the resulting texture is different than the original (size in bytes)
Applied a ugly temporal hack to the texture conversor to solve efb to ram misalignments and effect distortions.
in D3D:
Pseudo implementation of logic ops using basic blending: the first 8 operations are "good approximations", the remaining 8 are bullshit :) if someone have a better approximation to emulate this logic please let me know.
please test if i don't break anything in the process and test Mario kart wee you will get a nice surprise.:)
 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4656 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-07 18:48:31 +00:00
Rodolfo Osvaldo Bogado a99a1451f9 d3d: a little speedup in efb to ram please test and let me know the result
opengl: a little code cleanup and possible speedup in texture recreation.
d3d and opengl :plugins corrected the efb alignment when efb to ram is used.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4637 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-03 20:09:15 +00:00
Rodolfo Osvaldo Bogado f8c2dcaa4e fix for re missing characters in both plugins, thanks to autoran for the testing. also modified depth efb copy behavior to work accordantly to this change.
in opengl  efb copy, set the destination texture format and not use argb always.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4575 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-14 23:15:09 +00:00
Rodolfo Osvaldo Bogado 78fa929c70 Some errors in the values passed to e pixel shader caused the menu error, no they are fixed, thanks to LordMark for help me with the testing.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4490 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-31 13:40:53 +00:00
Rodolfo Osvaldo Bogado dd7f6f991f small code cleanup, and little fixing of errors introduced by mi in my first commit :(
fixed scissor test in direct 3d


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4480 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-30 04:14:43 +00:00
hrydgard 29808cdde2 OpenGL: commit rodolfoosvaldobogado's (what a name!) speedup patches.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4322 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-26 12:39:12 +00:00
hrydgard 7a8f6bdd6d D3D various: "Safe texture cache" option, texture replace instead of destroy/create when possible, a commented out "optimization" that didn't speed things up (use DrawPrimitive instead of DrawIndexedPrimitive when possible), reduce code duplication in Flush(), don't periodically clean out the shader caches since it's not really beneficial - shaders are cheap to keep. some code cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4302 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-19 13:14:55 +00:00
hrydgard 2d93c654f0 Rename Config.cpp/h to VideoConfig.cpp/h.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4260 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-13 09:23:30 +00:00
hrydgard 512053fa5e Kill some horribly ugly hackery :( It's just not right to pass entire IniFile objects across DLLs. Only POD (plain-old-data, like int, float, char, char[] etc) are safe to pass across DLL boundaries.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4257 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-13 08:54:46 +00:00
hrydgard 700f2ff694 Lots of code and warning cleanup. OGL/D3D: Moved to a shared config class in VideoCommon. This lets VideoCommon code read the config without ugly hacks. Fixed various config race conditions by keeping a copy (g_ActiveConfig) of the g_Config struct which is updated once per frame.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4256 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-13 08:21:35 +00:00
death2droid 0ccd9d1e8f DiscIO:Fix the includes up Dolphin should now compile.
D3D and OGL: A minute clean up with texture dumping

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4199 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-04 13:46:04 +00:00
sl1nk3.s 5a21d72693 Fix screen flickering with frameskip on D3D plugin, also fix occasional hang when turning frameskip off
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4194 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-04 06:09:21 +00:00
hrydgard efc74c77a9 D3D: Basic EFB copy-to-texture support. Fixes star domes in SMG (but does not fix the pull star, need EFB reads for that) and some other things.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4188 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-03 21:56:08 +00:00
hrydgard baede3a7f3 Moving more things out of GL into VideoCommon...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4187 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-03 20:37:35 +00:00
hrydgard 562a4e25ac Some housecleaning around the D3D plugin, start of preparations to share even more code with the GL plugin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4183 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-03 19:24:16 +00:00
omegadox 7aede7309f GFX: Cleanup - Move OGL's GetBlockHeightInTexels and GetBlockWidthInTexels code into VideoCommon.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3962 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-08-11 20:36:13 +00:00
sl1nk3.s 8b0bc273c5 Fix framelimiter's accuracy, thanks to sskkiipp !(issue 1237)
Also added an "auto" mode which automatically limits the framerate to fullspeed and move it from Interface settings to Basic setttings

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3934 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-08-03 18:35:25 +00:00
XTra.KrazzY c86d2e5129 Now ALL copyright dates are fixed to the legally correct year: The year in which the project began. Now we don't have to change it every year :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3898 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-28 21:32:10 +00:00
hrydgard fd70f99f04 Roll back r3833 for render targets but keep it for static textures. Most mirroring issues are OK and we shouldn't see any slowdown.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3844 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-19 08:17:41 +00:00
hrydgard 3ad0db6830 GL: Delete code for GL_TEXTURE_RECTANGLE_ARB in case of non-pow2 textures - all modern GFX cards that can run Dolphin should support non-pow2 textures anyway. This removes some complexity and reduces the numbers of pixel shaders that need to be generated in some situations. Also fixes some texture mirroring problems. Let me know if this breaks things on ATI for some reason.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3833 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-18 11:26:58 +00:00
Nolan Check f338d5c44c Code cleanup. Juggling rectangles. I'm about to investigate the problems with Real XFB's in PAL games, so I wanted to make sure all our rectangles were cleaned up and organized.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3794 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-15 00:51:24 +00:00
Nolan Check 07a767691d Clean up OpenGL code and introduce the Framebuffer Manager. More work is forthcoming; I plan to implement resolution switching (while the game is running) and also multiple virtual XFBs for game-controlled buffer swapping.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3587 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-28 23:35:08 +00:00
nakeee 6b2855de5e revert last 2 commits
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3533 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-22 09:31:30 +00:00
omegadox 6de0cd1e4b They should be called SU Registers (Setup Unit/Rasterization). BP (Bypass) is really the name of the commands that are passed in.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3531 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-22 07:40:28 +00:00
Nolan Check 4292962ea2 Changes for OpenGL plugin:
- Render targets should not have an alpha channel
- Use correct source rectangle for render-to-texture effects
- Use "GL_INTENSITY8" instead of just "GL_INTENSITY" (makes no difference)

The background of the "Stage Clear" screen in SSBM is now fixed!

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3502 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-20 09:29:28 +00:00
death2droid 254edc3813 Some more modification of texture dumping and loading.
They now use gameID instead of game name for the folders.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3247 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-16 01:21:57 +00:00
death2droid 700742c30c Small little change and clean up.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3242 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15 12:41:56 +00:00
death2droid b6cfaf5653 Added features to hires loading and texture dumping so it now dumps the files into a specific folder like for Mario Party 7 the textures will be dumped into a folder named Mario Party 7.
For texture loading it now only checks the folder with the same name as the game.
Like same as before moddified texture of Mario Party 7 would go in the folder named Mario Party 7 :P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3241 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15 12:28:32 +00:00
death2droid 7986366ff3 Remove a stupid mistake of mine
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3238 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15 08:00:54 +00:00
death2droid 80e2052372 Make some updated to hires texture loading ect.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3235 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15 07:07:24 +00:00
donkopunchstania 14a67bc8bc Changing where depth is read. Trying to use the same depth buffer GL uses when copying depth to a texture. This eliminates some quirky code and gets depth copies working in AA, but may not work on older graphics cards.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3234 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15 02:39:55 +00:00
Nolan Check dcad8a779d TextureDecoder now indicates I4 and IA4 texture formats. It also decodes paletted textures more efficiently.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3213 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-13 02:06:02 +00:00
death2droid be45b223bb A fix by baby.lueshi that fixes the problems with rev 3187
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3190 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-09 07:55:30 +00:00
death2droid 8e535bf2c0 Revert r3187 causes games to return lots of errors.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3189 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-09 06:25:03 +00:00
death2droid b4ccf03967 Some changes to the hashing by baby.lueshi
You may have to redump textures.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3188 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-09 02:04:04 +00:00
Nolan Check b277102796 Use correct width and height for compressed textures
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3187 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-08 23:33:23 +00:00
death2droid d0304dc997 Add hires texture support to OpenGL
Currently still only dumps files as .tga but supports loading as .png, .bmp,.tga , .dds

This is by  baby.lueshi

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3166 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-07 07:43:56 +00:00
Nolan Check 3ba23768e8 Add PC-native DXT1 support to VideoCommon and VideoOGL. Thanks to XTra.KrazzY and death2droid.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3159 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-06 02:10:07 +00:00
omegadox 6736898486 OpenGL Plugin: code cleanup trying to follow code style wiki and updated copyright date
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2850 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-04-03 14:35:49 +00:00
hrydgard e62b7f35ce Clean up OpenGL plugin error handling macros. No longer bother with enabling TEXTURE_2D and TEXTURE_RECTANGLE_ARB - they don't apply when using shaders. Change a PanicAlert when looking for valid plugins into a LOG_WARN.
Let me know if this breaks anything - it shouldn't.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2726 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-22 11:21:44 +00:00
Shawn Hoffman 7572e0bf8d remove newlines from OGL logging (they get added by logmanager)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2720 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-21 20:07:56 +00:00