summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPStructs.cpp
AgeCommit message (Collapse)Author
2015-05-25Merge pull request #2274 from degasus/disable_bboxRyan Houdek
Disable bbox
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-25VideoCommon: return 0 if bbox is disableddegasus
Through just returning the last written value sounds better, this crashes Paper Mario. In my opinion, gfx issues are fine on older GPUs, but crashes should not happen.
2015-05-25VideoCommon: Make BBox emulation optionaldegasus
2014-12-21VideoCommon: split VertexLoaderBase from VertexLoaderdegasus
2014-12-15VideoCommon: Merge LineGeometryShader into GeometryShaderGen.Jules Blok
This adds line-width emulation support to OpenGL.
2014-12-15GeometryShaderGen: Support multiple primitive types.Jules Blok
And make more stereoscopy code optional.
2014-12-15GeometryShaderManager: Upload Line/Point width constants.Jules Blok
2014-12-14VideoCommon: Add a separate constants buffer for the geometry shader.Jules Blok
2014-11-22OGL: disable bbox writes if not supporteddegasus
2014-11-17OGL: implement bounding box support with ssbodegasus
This implemention tries to be as accurate as the old SW implemention, but it will remove the dependcy of our vertexloader on videosw.
2014-10-29Remove old (and now incorrect) error checking code.Scott Mansell
We will now rely on Memory::CopyFromEmu to do bounds checking. Some games actually load palettes from 0x00000000, despite the fact no valid palette data should ever be there. Fixes Issue 7792.
2014-10-23Revert changes preloading of RGBA8 tiles.Scott Mansell
This path should probally be optimised, but it's out of the scope of this PR.
2014-10-21Remove another 3 getPointers.Scott Mansell
Thanks neobrain for spotting these.
2014-10-10Get buildbot to compile.crudelios
2014-10-10Reimplement Bounding Box calculation using the software renderer.crudelios
2014-09-28Add the 'desynced GPU thread' mode.comex
It's a relatively big commit (less big with -w), but it's hard to test any of this separately... The basic problem is that in netplay or movies, the state of the CPU must be deterministic, including when the game receives notification that the GPU has processed FIFO data. Dual core mode notifies the game whenever the GPU thread actually gets around to doing the work, so it isn't deterministic. Single core mode is because it notifies the game 'instantly' (after processing the data synchronously), but it's too slow for many systems and games. My old dc-netplay branch worked as follows: everything worked as normal except the state of the CP registers was a lie, and the CPU thread only delivered results when idle detection triggered (waiting for the GPU if they weren't ready at that point). Usually, a game is idle iff all the work for the frame has been done, except for a small amount of work depending on the GPU result, so neither the CPU or the GPU waiting on the other affected performance much. However, it's possible that the game could be waiting for some earlier interrupt, and any of several games which, for whatever reason, never went into a detectable idle (even when I tried to improve the detection) would never receive results at all. (The current method should have better compatibility, but it also has slightly higher overhead and breaks some other things, so I want to reimplement this, hopefully with less impact on the code, in the future.) With this commit, the basic idea is that the CPU thread acts as if the work has been done instantly, like single core mode, but actually hands it off asynchronously to the GPU thread (after backing up some data that the game might change in memory before it's actually done). Since the work isn't done, any feedback from the GPU to the CPU, such as real XFB/EFB copies (virtual are OK), EFB pokes, performance queries, etc. is broken; but most games work with these options disabled, and there is no need to try to detect what the CPU thread is doing. Technically: when the flag g_use_deterministic_gpu_thread (currently stuck on) is on, the CPU thread calls RunGpu like in single core mode. This function synchronously copies the data from the FIFO to the internal video buffer and updates the CP registers, interrupts, etc. However, instead of the regular ReadDataFromFifo followed by running the opcode decoder, it runs ReadDataFromFifoOnCPU -> OpcodeDecoder_Preprocess, which relatively quickly scans through the FIFO data, detects SetFinish calls etc., which are immediately fired, and saves certain associated data from memory (e.g. display lists) in AuxBuffers (a parallel stream to the main FIFO, which is a bit slow at the moment), before handing the data off to the GPU thread to actually render. That makes up the bulk of this commit. In various circumstances, including the aforementioned EFB pokes and performance queries as well as swap requests (i.e. the end of a frame - we don't want the CPU potentially pumping out frames too quickly and the GPU falling behind*), SyncGPU is called to wait for actual completion. The overhead mainly comes from OpcodeDecoder_Preprocess (which is, again, synchronous), as well as the actual copying. Currently, display lists and such are escrowed from main memory even though they usually won't change over the course of a frame, and textures are not even though they might, resulting in a small chance of graphical glitches. When the texture locking (i.e. fault on write) code lands, I can make this all correct and maybe a little faster. * This suggests an alternate determinism method of just delaying results until a short time before the end of each frame. For all I know this might mostly work - I haven't tried it - but if any significant work hinges on the competion of render to texture etc., the frame will be missed.
2014-09-21GPU: Only load the relevant color components upon writes to the tev color ↵Tony Wasserka
registers. The other two components need not be valid upon write, hence loading them results in glitches. Fixes issue 6783.
2014-09-09Kill Core::g_CoreStartupParameter.Rachel Bryk
2014-08-19msvc: resolve all warnings in VideoCommon.Shawn Hoffman
2014-07-11avoid the extern keyword in .cpp filesdegasus
2014-06-08Fix the capitalization of "GameCube" throughout the project.Paul Olszewski
2014-06-02Fix a typo in a BP register name (BPMEM_TX_SETLUT_4 -> BPMEM_TX_SETTLUT_4).Lioncash
Also fixed the alignment of the register values.
2014-06-02Add missing registers in GetBPRegInfoLioncash
2014-05-29Make GetBPRegInfo just take two strings as parametersLioncash
Gets rid of the size parameters.
2014-05-22Merge pull request #370 from Sonicadvance1/remove_specialized_memcmpshuffle2
Removes ZeroFrog's "optimized" memcpy and memcmp functions.
2014-05-20BPStructs: Consistently put the two shared copy args firstJasper St. Pierre
And rename them so they make a bit more sense.
2014-05-20BPStructs: Remove another function wrapperJasper St. Pierre
2014-05-20BPStructs: Move LoadBPReg hereJasper St. Pierre
2014-05-20BPStructs: Flatten out BPWrittenJasper St. Pierre
2014-05-20BPStructs: Reindent BPWrittenJasper St. Pierre
2014-05-20BPStructs: Document BPMEM_BP_MASK betterJasper St. Pierre
2014-05-20BPMemory: Fix "DISPLAYCOPYFILER" typoJasper St. Pierre
2014-05-20BPStructs: Remove calls to SetInterlacedMode when reloading stateJasper St. Pierre
SetInterlacedMode is a dummy no-op that does nothing.
2014-05-20BPFunctions: Remove the rest of GetConfigJasper St. Pierre
2014-05-20PixelShaderManager: Fizzle out fog changes when disabled hereJasper St. Pierre
This lets us remove a use of GetConfig.
2014-05-20BPFunctions: Remove use of a dumb methodJasper St. Pierre
GetPointer serves no purpose.
2014-05-17Removes ZeroFrog's "optimized" memcpy and memcmp functions.Ryan Houdek
These were only compiled in on Windows and x86_32. They provided "optimized" copies and compares based on blocksizes for the AMD Athlon and Duron CPU families. The code was taken from something that AMD provides with a as-is license. Just get rid of this crap.
2014-04-21BPMemory: Use BitField for the GenMode fields.Tony Wasserka
2014-03-25BPMemory: Make use of BitField in a number of structures.Tony Wasserka
2014-03-25BPMemory: Use the new BitField class in two selected structures.Tony Wasserka
2014-03-11Fixes spacing for "for", "while", "switch" and "if"Matthew Parlane
Also moved && and || to ends of lines instead of start. Fixed misc vertical alignments and some { needed newlining.
2014-03-09clang-modernize -use-nullptrTillmann Karras
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-02-18Convert all includes to relative paths.Lioncash
2014-02-15move perfquery enable checks into videocommon (caller side)degasus
2014-01-25Rewrote bounding box algotithm. Fixes issues 5967, 6154, 6196, 6211.crudelios
Instead of being vertex-based, it is now primitive (point, line or dissected triangle) based, with proper clipping. Also, screen position is now calculated based on viewport values, instead of "guesstimating". This fixes many graphical glitches in Paper Mario: TTYD and Super Paper Mario. Also, the new code allows Mickey's Magical Mirror and Disney's Hide & Sneak to work (mostly) bug-free. I changed their inis to use bbox. These changes have a slight cost in performance when bbox is being used (rare), mostly due to the new clipping algorithm. Please check for any regressions or crashes.
2014-01-16fixup "Remove the ZTP speedup hack"degasus
This fixes revision b49c09c36b67
2014-01-16Remove the ZTP speedup hack. Also remove useless debugging code, and a ↵Tony Wasserka
presumably outdated workaround (which was commented out). Fixes issue 6875.
2014-01-03ogl: clamp to edge for out of bound efb accessdegasus
fixes issue 6898 OpenGL defaults are GL_REPEAT, which is even more unlikely than GL_CLAMP_TO_EDGE. As I can't test the behavoir of the real hardware, I changed it to how it works before, but I guess just clip the texture makes more sense.