Commit Graph

66 Commits

Author SHA1 Message Date
Ryan Houdek 8c1091a21f Merge branch 'master' into GLSL-master
Conflicts:
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp
2013-03-15 11:19:52 -05:00
degasus 2c84c32ddc decrease d3d vertex buffer size 2013-03-12 17:48:20 +01:00
degasus a1c5e90083 Merge branch 'master' into GLSL-master
Conflicts:
	CMakeLists.txt
	Source/Core/DolphinWX/CMakeLists.txt
	Source/Core/DolphinWX/Src/GLInterface.h
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Core/VideoCommon/Src/TextureCacheBase.cpp
	Source/Core/VideoCommon/Src/VertexManagerBase.cpp
	Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj
	Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters
	Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h
	Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/main.cpp
2013-03-06 15:59:29 +01:00
Jordan Woyak f3f89e1d00 Merge branch 'master' into vertex-loader-cleanup
Conflicts:
	Source/Core/Common/Src/CommonFuncs.h
	Source/Core/VideoCommon/Src/VertexLoader.cpp
2013-03-04 15:47:56 -06:00
NeoBrainX 5a7bb2abfa D3D11: Port perf queries code to the PerfQueryBase interface.
Remove deprecated PerfQuery methods from RenderBase.
Windows build fix.
2013-03-01 19:30:37 +01:00
NeoBrainX 7682ed22c6 Merge branch 'master' into perfqueries.
Conflicts:
	Source/Core/VideoCommon/Src/VideoConfig.h
	Source/Core/VideoCommon/VideoCommon.vcxproj.filters
	Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp
	Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp
2013-03-01 01:07:34 +01:00
Jordan Woyak 6b80e6f83c Tweak Vertex/Index buffer handling a bit. 2013-02-27 01:57:02 -06:00
Jordan Woyak db1be085c2 VertexManager cleanup 2013-02-22 01:41:52 -06:00
degasus 76e6085e31 consistently usage of buffer pointers 2013-02-21 12:36:29 +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 ed0abc9dc5 Merge branch 'mipmap_fixes'. 2013-02-07 20:40:33 +01: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
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
NeoBrainX 4d8d86bd6a D3D11: Implement some PE pixel performance metrics.
Super Mario Sunshine is using a cool trick: To determine how much goop has been cleaned in ep. 6 of Sirena Beach, it counts the number of pixels that are input to the blending stage. For that it's using the PE performance registers ;)

Fixes issue 1498.
2012-08-26 20:26:10 +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 b5ad382b07 Fast mipmaps deserves to die!! 2012-06-08 00:22:57 +02: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
NeoBrainX fee98b426b Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong). 2012-03-24 15:58:44 +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
NeoBrainX eb01a110c9 Implement texture preloading 2012-02-03 21:21:13 +01:00
NeoBrainX c5008fe9de TextureCache: Renaming some variables
OGL: Fix a possible bug at texture dumping
OGL: Add a TODO about a possible bug
2012-01-31 18:09:34 +01:00
NeoBrainX 8244efcc02 Revert r7421 and r7422.
Should fix issue 4413.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7592 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-06-11 19:37:21 +00:00
Nolan Check 9b697ed28f DX11: I think I've figured out where the game enables texture offsets for lines and points.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7461 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-04-15 22:34:54 +00:00
donkopunchstania 77a4a64909 Fix an error introduced in r7083. In the pixel shader manager the farZ and zRange of the z bias were flipped. Switched to using the viewport struct rather than a raw float array to hopefully avoid such confusion in the future. Fixes issue 4060.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7446 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-04-11 01:49:32 +00:00
Jordan Woyak 3d5d205c73 I think clean up DX11 code a bit. Used "smart" pointers to avoid need to manually AddRef/Release in many places. Eliminated the D3DBlob class (replaced with just D3D10CreateBlob). Eliminated some Init/Shutdown functions (moved stuff into ctors/dtors). This should not affect behavior at all, only code maintainability.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7421 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-30 07:17:23 +00:00
Nolan Check 40b8db30e3 DX11: Correct line width and point size by taking viewport rect into account. Twilight Princess map looks almost perfect except for the drop shadows around the borders: the lines are too skinny, but the corner points seem to be correct.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7418 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-28 05:42:21 +00:00
Nolan Check c83e5ee35b DX11: Don't apply culling to lines and points. Fixes Metroid Prime beam-charging effects.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7346 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-15 03:51:31 +00:00
Nolan Check 7c536b8f15 DX11: Support thick lines and large points with geometry shaders. Lines still aren't drawn with correct thickness, see Twilight Princess map. But the map corners are drawn with correct shadow "blobs" for the first time!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7340 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-14 09:38:29 +00:00
NeoBrainX 7dc3a6cc92 D3D9/11: Fix that "Disable Dest. Alpha Pass" option...
Thanks to NaturalViolence for reporting ;)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7244 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-25 18:22:04 +00:00
hrydgard ee6d20e83a build fixin'
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6939 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-27 22:52:17 +00:00
Soren Jorvang 955e3abe9e Clean out the long since bit-rotted video profiling code.
Profiler.{cpp,h} also happened to be the only dupliated
filenames left in Source, the absence of which should make
link-time optimization easier to get working.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6935 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-27 21:57:36 +00:00
NeoBrainX 994913ce07 DX11 code maintenance, part 7:
Header cleanups. If anything, this will decrease compile time.. :P

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6916 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-25 16:43:08 +00:00
NeoBrainX cd6f00a3e5 DX11 code maintenance, part 6:
Move constant buffer management from EmuGfxState to Vertex/PixelShaderCache.
Finally remove the EmuGfxState class, cheers!

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6915 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-25 15:08:30 +00:00
NeoBrainX e0c6092721 DX11 code maintenance, part 4:
Move blend state management from EmuGfxState to Renderer.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6905 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-24 10:42:43 +00:00
NeoBrainX 50c1baf8de DX11 code maintenance, part 2:
Move depth state management from EmuGfxState to Renderer.
Call stateman->Apply in Renderer::ApplyState instead of EmuGfxState::ApplyState.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6903 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-24 09:10:35 +00:00
NeoBrainX e0b757fe6a DX11 code maintenance, part 1:
Move sampler state/shader resource management from EmuGfxState to Renderer.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6902 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-24 08:44:32 +00:00
NeoBrainX 7854bd7109 Merged the D3D9 debugger into VideoCommon/VideoUICommon:
Separated UI from debugger functionality. Generally cleaned up that stuff.
Most functionality needs to be reimplemented now, but will be available to D3D9, D3D11 as well as OpenGL then.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6523 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-05 14:15:36 +00:00
NeoBrainX ee21237d6a Polish, fix and otherwise improve the video plugin configuration dialog:
- Add some info about a backend's feature set (MSAA, Real XFB, EFB to RAM, ..) to VideoConfig
- Gray out options if they aren't supported by the backend or if changing them doesn't affect anything (e.g. changing STC mode if STC is disabled)
- Allow signed bytes for D3D11. Not sure if this causes glitches, but it should work
- Call wxEvent.Skip() in the event function handlers, not sure if this fixes any bugs but the old code definitely caused bugs during development of this patch
- Fix a memory leak in the configuration dialog if D3D11 is used
- Other minor stuff that doesn't need to be mentioned or which I forgot

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6450 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-21 14:47:28 +00:00
Jordan Woyak 159ed43f67 Move some shared gfx plugin code into VideoCommon. Changed "Renderer" class to use virtual functions. (setting stuff up for video plugin merging)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6433 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-18 02:21:26 +00:00
Nolan Check 95cfca08e2 Put infrastructure in place so that other plugins may support dual-source blending.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6296 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-21 05:22:18 +00:00
Nolan Check cb453a0fb3 DX11 plugin: Do destination-alpha in a single pass. No more drawing the same geometry twice! SMG is faster now because it uses destination-alpha extensively. This uses dual-source color blending, a DirectX 10-level feature. The equivalent OpenGL function comes from the GL_ARB_blend_func_extended extension, which was made core in OpenGL 3.3.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6294 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 03:11:22 +00:00
Nolan Check b1d6417f13 DX11 plugin: Use a better mechanism to load vertex and index buffers; prevent a potential bug where triangles, lines, and points could fight over the same buffers
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6292 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 02:17:16 +00:00
Nolan Check 0e534dd033 Clarify texture cache code. Previously, there were THREE sets of texture dimensions, and it was hard to tell which set was for what purpose.
Now, there are two:
Real dimensions: Width and height of the original GameCube texture
Virtual dimensions: Width and height of the texture used by dolphin-emu's renderer

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6291 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20 00:39:45 +00:00