summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
AgeCommit message (Collapse)Author
2010-11-01DX9/DX11: Fix and simplify ClearScreen. At least fixes a small glitch in ↵NeoBrainX
Super Mario Sunshine with DX11, might fix several other things as well in both plugins though (so test this, please!) Explanation of this commit: We only have to care about four BP registers in ClearScreen, the remaining API state should be reset. The colorEnable and alphaEnable parameters are obsolete, for some reason directly using them caused the SMS glitch with DX11 (because of that bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24 check in BPFunctions.cpp, is this one actually correct?) The comment in BPFunctions.cpp was at least misleading (if not even wrong), so I removed it. For what it's worth, someone needs to port this to the OpenGL and Software plugins (unless they're doing this properly already) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6327 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24Properly emulate the alpha read pixel engine register function (used for EFB ↵NeoBrainX
peeks). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6313 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24Fix an off-by-one error introduced in r6309.NeoBrainX
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6310 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-24DX11: Fix ClearScreen properly this time. Should fix quite a few games (or ↵NeoBrainX
break them :P) Fixes issue 3399. Also remove unnecessary stateman/gfxstate applies: - gfxstate->ApplyState/Reset only need to be called by VertexManager - stateman->Apply only needs to be called before any Draw/DrawIndexed call git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6309 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-22Main change: Implemented EFB pokes in DX9/DX11.NeoBrainX
Games affected by this change: Mario Smash Football, Mario Strikers Charged Football, Monster Hunter Tri. Other games possibly affected: Shaun White Snowboarding, Resident Evil Code: Veronica, Baten Kaitos. This implementation will decrease performance if the game uses this feature, but the glitches will be gone. I'll add an option for this in a later commit. EFB pokes are somewhat slow in DX11 right now, speed should be okayish in DX9 though. Other changes: - SOMEWHAT cleaned up the EFB access code in DX9 - Fixed incompatible parameter list of AccessEFB and TVideo_AccessEFB. - Fixed a theoretical bug in ReplaceRGBATexture2D, add support for STAGING textures - Removed unused parameters in various DX9 functions git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6300 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-21Put infrastructure in place so that other plugins may support dual-source ↵Nolan Check
blending. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6296 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-20DX11 plugin: Do destination-alpha in a single pass. No more drawing the same ↵Nolan Check
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-20DX11 plugin: Fix numerous Metroid Prime glitches. The "techno energy ball ↵Nolan Check
lighting" glitch is remains, however. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6293 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-02DX11: Clean up AccessEFB and fix a crash. Thanks to pico554 for hinting at ↵NeoBrainX
the wrong part ;) Should fix SMG for NVIDIA users. Slightly changes behavior of the AccessEFB function, so test this for regressions, please (esp. in HD resolutions). I tried to apply the same changes to Video_DX9, but for some reason EFB access didn't work anymore then. Might look into that later. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6247 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-30Added EFB Scale option to the OpenGL plug-in.skidau
Renamed EFB Scale to Internal Resolution. Removed Auto Scale option (it is now always on). Added on-the-fly changing of the Internal Resolution in the OpenGL and Direct3D9 plug-ins. Further consolidated the code in the video plug-ins. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6240 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-28Minor code formatting:skidau
First step to bring a level of consistency between the video plug-ins - variable names, spacing, function names, function order, comments, file names. This will help us identify common code for VideoMerge. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6235 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-29fully implemented display list cache with vertex data included and added in ↵Rodolfo Osvaldo Bogado
all the plugins. still experimental, not totally optimized but must bring a nice speed up please test for regressions an error. an please Linux people fix scons :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6149 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-01Marginally improve FPS counting logic in the video plugins.NeoBrainX
Should fix DX11 peaking at 59 FPS instead of 60 FPS. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6026 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18Committing some cleanups by avindra:NeoBrainX
- fix numerous warnings - make some variables unsigned - remove redundant code and header inclusions - make code more compact in lots of cases Committing some additional changes by myself: - additional header cleanups - cleanup DX11 initialization/shutdown process (hinted at by avindra) - Remove the cgD3D9 stuff from Externals since it's no longer needed git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5903 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-17Move sampler state setting outside the drawQuad utility functions.NeoBrainX
Use linear filtering for various buffer copies, improves visual quality a lot. Some other tiny changes as well. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5891 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16Since apparently no one feels like fixing SMG FIFO overflows, commit ↵NeoBrainX
iceman4love77's fix. No idea if it works or what it does, he seemed pretty confident that it works though. Only fail once if EFB pokes are requested in DX9/DX11. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5888 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-12DX9/DX11, improvement to r5870: Instead of skipping SetViewport(), fix the ↵NeoBrainX
viewport to match the old EFB dimensions. Should reduce or even fix most graphical glitches caused by huge viewports in HD resolutions. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5873 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-11DX9/DX11: Workaround the viewpoint/EFB creation issues in e.g. SMG2 on ↵NeoBrainX
NVIDIA hardware or when using HD. Will most likely cause glitches, but prevents crashing. Correct behavior can't be implemented in Direct3D, so this is the best option we have. Also two little changes which don't affect functionality or performance: Change an IUnknown* cast to a T* cast. Improve some error messages. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5870 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-02this is a pure optimization commit:Rodolfo Osvaldo Bogado
return to the old values in constants in pixelshader, the old values give mi 3 or 4 fps more,(maybe some kind of compiler optimization) in some games and with the current algorithm i notice no difference with this values, please report any problem. optimizes SSAA to make it a little faster and, the quality should be the same but with a little speedup. change the way the frame is processed depending is xfb is enabled or not to make this a little faster. please test and report any problem git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5820 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-27Load the d3dx11 dll at runtime instead of linking directly against it. ↵NeoBrainX
Should make DX11 usuable again if the DX SDK used for compiling is newer than the runtime dlls used. Various little tweaks and fixes, mostly to fix D3D11 debug layer warnings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5805 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-24fixed blending in dx9 and dx11Rodolfo Osvaldo Bogado
fixed fps counter in all the plugins enjoy git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5778 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-21DX11:NeoBrainX
Cleanups, documentation, ... Theoretically enable anisotropic filtering if selected in the config, not sure if it works though. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5761 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-21some fixes to depth test and screen clearing in dx11, now a lot of the ↵Rodolfo Osvaldo Bogado
remaining graphic errors should be fixed git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5756 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-20DX11:NeoBrainX
Make font rendering a lot prettier. Fix constant buffers in EmuGfxState::ApplyState() to really have a size which is a multiple of 16 instead of 65536. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5755 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-19DX11:NeoBrainX
Fix StateManager usage in ResetAPIState/RestoreAPIState. Fix screenshots (finally). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5745 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-19DX11: Prefer DXGI_FORMAT_R8G8B8A8 to DXGI_FORMAT_B8G8R8A8 wherever appropriate.NeoBrainX
Slightly modify the way we're doing screenshots once again, thanks to Orphis this time ;) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5743 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18Include the two files added in r5741 in the VC project file as well.NeoBrainX
Improve the way we're saving screenshots, thanks to Billiard for spotting that ;) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5742 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18DX11: Introduce a StateManager class, might improve performance a little.NeoBrainX
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5740 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18DX11: Add error checking to about any device object creation. Since we ↵NeoBrainX
aren't handling creation errors that well right now we should at least output an error message. Remove superfluous _WIN32 checks in DX11 and DX9. Meant to port that code over to Linux or what? :P git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5738 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-18DX11: Fix flickering when resizing the emulator window.NeoBrainX
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5736 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-17DX11:NeoBrainX
Implement safe texture cache. Fix screenshot functionality. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5732 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-17DX11:NeoBrainX
Fix all remaining window resizing issues. Implement screenshot functionality (doesn't seem to work completely, yet). Assign debug names to (hopefully) all remaining device objects. Flush the GPU's command buffer in Close() to make the ReportLiveDeviceObjects output clearer. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5730 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-16apply some speedup to dx11 plugin + some minor stuffluisr142004
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5721 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-15more bug fix in dx11:Rodolfo Osvaldo Bogado
fixed screen clearing and simplify drawClearQuad a little put some nice code from dx11 that i like in dx9. modify plugin spec preparing for implementing efb poke (is not used often but is a missing functionality so..) please test. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5710 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-14DX11: Fix window resizing.NeoBrainX
Still some aspect ratio problems though... git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5703 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-14some fixes to dx11, now efb access should work well (smg pulling stars)Rodolfo Osvaldo Bogado
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5698 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-14fixed blending and PC_TEX_FMT_I8 and PC_TEX_FMT_I4_AS_I8 texture loading in ↵Rodolfo Osvaldo Bogado
dx11 enjoy git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5686 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-13Add a DX11 video plugin.NeoBrainX
Might or might not work for you, yet. Anyway, read the soon to be created forum thread on this plugin before asking any questions. Huge thanks to rodolfoosvaldobogado for helping me out in various areas. Also, thanks to everyone on IRC who supported me during development ;) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5680 8ced0084-cf51-0410-be5f-012b33b47a6e