summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPStructs.cpp
AgeCommit message (Collapse)Author
2016-01-25Fifo: Make g_use_deterministic_gpu_thread a TU-local variableLioncash
2016-01-25Fifo: Make g_bSkipCurrentFrame a TU-local variableLioncash
This is only ever queried, making it a global isn't necessary.
2016-01-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2016-01-12Fifo: Create a "Fifo" namespace.degasus
2015-11-06VideoCommon: rename TextureCache to TextureCacheBaseTillmann Karras
2015-11-05Remove the "Show EFB Copy Regions" debug option.Scott Mansell
It was only implemented in OpenGL, though the option was visible in both backends, leading to memory leaks if you enabled it in DirectX. And it wasn't particularly useful as a debug feature as it only showed where in the EFB the copies were taken from, not what format it was, or what the copy was used for, or what content was in the EFB at that point in time. Also, it stretched the copy regions relative to the window, so the on-screen regions don't even line up with the window unless the game used the full EFB (some pal games) and you game image stretched to the full window.
2015-11-05BPStructs: add debug info for texture setup.Scott Mansell
2015-09-23Silence -Wshadow warning.Rohit Nirmal
2015-09-22FifoRecorder: Use Video Common to record efb2ram correctly.Scott Mansell
Texture updates have been moved into TextureCache, while TMEM updates where moved into bpmem. Code for handling efb2ram updates was added to TextureCache. There was a bug for preloaded RGBA8 textures, it only copied half the texture. The TODO was wrong too.
2015-09-05Cleanup and unify handling of efb copy stride.Scott Mansell
2015-09-04Remove extra space from 5a32c3fJosJuice
2015-09-03VideoCommon: xfb height calculation adjustedbooto
Baten Kaitos allocates its XFBs from a tagged heap structure. With the old calculation, too many lines were being written so the tag of the allocation after the XFB was being corrupted. Fixes crash mentioned in this comment: https://code.google.com/p/dolphin-emu/issues/detail?id=7734#c6
2015-07-27VideoCommon: reduce level of debug outputbooto
2015-07-25Video: stride in bytes rather than pixelsbooto
2015-07-25Video: respect stride of efb copies to xfbbooto
2015-06-12Options: merge SCoreStartupParameter into SConfigdegasus
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