summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* video_core: Block in WaitFence.Markus Wick2019-12-301-1/+4
| | | | | | | This function is called rarely and blocks quite often for a long time. So don't waste power and let the CPU sleep. This might also increase the performance as the other cores might be allowed to clock higher.
* common_func: Use std::array for INSERT_PADDING_* macros.bunnei2019-11-041-4/+4
| | | | - Zero initialization here is useful for determinism.
* Core: Wait for GPU to be idle before shutting down.Fernando Sahmkow2019-10-051-0/+3
|
* GPU_Async: Correct fences, display events and more.Fernando Sahmkow2019-10-051-0/+3
| | | | | | | This commit uses guest fences on vSync event instead of an articial fake fence we had. It also corrects to keep signaling display events while loading the game as the OS is suppose to send buffers to vSync during that time.
* video_core: Implement RGBX16F PixelFormatFearlessTobi2019-09-221-0/+1
|
* Merge pull request #2793 from ReinUsesLisp/bgr565bunnei2019-09-041-7/+2
|\ | | | | renderer_opengl: Implement RGB565 framebuffer format
| * renderer_opengl: Implement RGB565 framebuffer formatReinUsesLisp2019-08-211-0/+1
| |
| * renderer_opengl: Use VideoCore pixel formatReinUsesLisp2019-08-211-5/+0
| |
| * gpu: Change optional<reference_wrapper<T>> to T* for FramebufferConfigReinUsesLisp2019-08-211-2/+1
| |
* | video_core: Silent miscellaneous warnings (#2820)Rodrigo Locatti2019-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * texture_cache/surface_params: Remove unused local variable * rasterizer_interface: Add missing documentation commentary * maxwell_dma: Remove unused rasterizer reference * video_core/gpu: Sort member declaration order to silent -Wreorder warning * fermi_2d: Remove unused MemoryManager reference * video_core: Silent unused variable warnings * buffer_cache: Silent -Wreorder warnings * kepler_memory: Remove unused MemoryManager reference * gl_texture_cache: Add missing override * buffer_cache: Add missing include * shader/decode: Remove unused variables
* | Video_Core: Implement a new Buffer CacheFernando Sahmkow2019-08-211-0/+4
| |
* | GPU: Flush commands on every dma pusher step.Fernando Sahmkow2019-07-261-0/+2
|/ | | | | | This commit ensures that the host gpu is constantly fed with commands to work with, while the guest gpu keeps producing the rest of the commands. This reduces syncing time between host and guest gpu.
* Merge pull request #2592 from FernandoS27/sync1bunnei2019-07-261-1/+33
|\ | | | | Implement GPU Synchronization Mechanisms & Correct NVFlinger
| * NVServices: Styling, define constructors as explicit and correctionsFernando Sahmkow2019-07-051-11/+7
| |
| * NVServices: Make NVEvents Automatic according to documentation.Fernando Sahmkow2019-07-051-1/+1
| |
| * GPU: Correct Interrupts to interrupt on syncpt/value instead of event, mirroring hardwareFernando Sahmkow2019-07-051-10/+4
| |
| * nv_host_ctrl: Make Sync GPU variant always return synced result.Fernando Sahmkow2019-07-051-1/+7
| |
| * Gpu: use an std mutex instead of a spin_lock to guard syncpointsFernando Sahmkow2019-07-051-4/+4
| |
| * Gpu: Mark areas as protected.Fernando Sahmkow2019-07-051-0/+11
| |
| * nv_services: Stub CtrlEventSignalFernando Sahmkow2019-07-051-1/+3
| |
| * Gpu: Implement Hardware Interrupt Manager and manage GPU interruptsFernando Sahmkow2019-07-051-3/+2
| |
| * video_core: Implement GPU side SyncpointsFernando Sahmkow2019-07-051-0/+24
| |
* | Merge pull request #2743 from FernandoS27/surpress-assertbunnei2019-07-251-1/+8
|\ \ | | | | | | Downgrade and suppress a series of GPU asserts and debug messages.
| * | GPU: Add missing puller methods.Fernando Sahmkow2019-07-181-1/+8
| |/ | | | | | | | | This adds some missing puller methods. We don't assert them as these are nop operations for us.
* / gl_rasterizer: Implement compute shadersReinUsesLisp2019-07-151-0/+6
|/
* video_core/gpu: Create threads separately from initializationLioncash2019-04-121-0/+5
| | | | | | | | | Like with CPU emulation, we generally don't want to fire off the threads immediately after the relevant classes are initialized, we want to do this after all necessary data is done loading first. This splits the thread creation into its own interface member function to allow controlling when these threads in particular get created.
* video_core/gpu: Amend typo in GPU member variable nameLioncash2019-03-271-3/+3
| | | | smaphore -> semaphore
* gpu: Rewrite virtual memory manager using PageTable.bunnei2019-03-211-3/+3
|
* gpu: Use host address for caching instead of guest address.bunnei2019-03-151-3/+8
|
* video_core/gpu: Make GPU's destructor virtualLioncash2019-03-071-1/+1
| | | | | | | | | | Because of the recent separation of GPU functionality into sync/async variants, we need to mark the destructor virtual to provide proper destruction behavior, given we use the base class within the System class. Prior to this, it was undefined behavior whether or not the destructor in the derived classes would ever execute.
* gpu: Refactor a/synchronous implementations into their own classes.bunnei2019-03-071-15/+11
|
* gpu: Move command processing to another thread.bunnei2019-03-071-4/+18
|
* gpu: Refactor command and swap buffers interface for asynch.bunnei2019-03-071-3/+12
|
* gpu: Refactor to take RendererBase instead of RasterizerInterface.bunnei2019-03-071-15/+19
|
* common/math_util: Move contents into the Common namespaceLioncash2019-02-271-1/+1
| | | | | These types are within the common library, so they should be within the Common namespace.
* video_core: Remove usages of System::GetInstance() within the enginesLioncash2019-02-161-2/+5
| | | | | Avoids the use of the global accessor in favor of explicitly making the system a dependency within the interface.
* Merge pull request #2099 from greggameplayer/BGRA8-Framebuffer-Realbunnei2019-02-131-0/+1
|\ | | | | Implement BGRA8 framebuffer format
| * Implement BGRA8 framebuffer formatgreggameplayer2019-02-091-0/+1
| |
* | kepler_compute: Fixup assert and rename enginesReinUsesLisp2019-02-101-3/+3
|/ | | | | | | | | | When I originally added the compute assert I used the wrong documentation. This addresses that. The dispatch register was tested with homebrew against hardware and is triggered by some games (e.g. Super Mario Odyssey). What exactly is missing to get a valid program bound by this engine requires more investigation.
* video_core/GPU Implemented the GPU PFIFO puller semaphore operations. (#1908)Kevin2019-01-301-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implemented the puller semaphore operations. * Nit: Fix 2 style issues * Nit: Add Break to default case. * Fix style. * Update for comments. Added ReferenceCount method * Forgot to remove GpuSmaphoreAddress union. * Fix the clang-format issues. * More clang formatting. * two more white spaces for the Clang formatting. * Move puller members into the regs union * Updated to use Memory::WriteBlock instead of Memory::Write* * Fix clang style issues * White space clang error * Removing unused funcitons and other pr comment * Removing unused funcitons and other pr comment * More union magic for setting regs value. * union magic refcnt as well * Remove local var * Set up the regs and regs_assert_positions up properly * Fix clang error
* gpu: Rewrite GPU command list processing with DmaPusher class.bunnei2018-11-271-2/+25
| | | | - More accurate impl., fixes Undertale (among other games).
* Merge pull request #1329 from raven02/bgr5a1ubunnei2018-09-171-0/+1
|\ | | | | Implement RenderTargetFormat::BGR5A1_UNORM
| * Implement RenderTargetFormat::BGR5A1_UNORM (Pokken Tournament DX)raven022018-09-151-0/+1
| |
* | GPU: Basic implementation of the Kepler Inline Memory engine (p2mf).Subv2018-09-121-0/+3
|/ | | | This engine writes data from a FIFO register into the configured address.
* Merge pull request #1284 from bunnei/bgra8_srgbbunnei2018-09-111-0/+1
|\ | | | | gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.
| * gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.bunnei2018-09-101-0/+1
| | | | | | | | - Used by Octopath Traveler (with multiple render targets).
* | video_core: Refactor command_processor.Markus Wick2018-09-101-3/+0
| | | | | | | | Inline the WriteReg helper as it is called ~20k times per frame.
* | video_core: Move command buffer loop.Markus Wick2018-09-101-1/+3
|/ | | | This moves the hot loop into video_core. This refactoring shall reduce the CPU overhead of calling ProcessCommandList.
* command_processor: Use std::array for bound_engines.Markus Wick2018-09-041-2/+2
| | | | | subchannel is a 3 bit field. So there must not be more than 8 bound engines. And using a hashmap for up to 8 values is a bit overpowered.
* gpu: Make memory_manager privateLioncash2018-08-281-3/+9
| | | | | | | | | | Makes the class interface consistent and provides accessors for obtaining a reference to the memory manager instance. Given we also return references, this makes our more flimsy uses of const apparent, given const doesn't propagate through pointers in the way one would typically expect. This makes our mutable state more apparent in some places.
* Implemented RGBA8_UINTDavid Marcec2018-08-201-0/+1
| | | | Needed by kirby
* renderer_opengl: Implement RenderTargetFormat::RGBA16_UNORM.bunnei2018-08-141-0/+1
| | | | - Used by Breath of the Wild.
* Implement RG32UI and R32UIDavid Marcec2018-08-131-0/+2
| | | | Needed for xenoblade
* renderer_opengl: Implement RenderTargetFormat::RGBA16_UINT.bunnei2018-08-131-0/+1
| | | | - Used by Breath of the Wild.
* renderer_opengl: Implement RenderTargetFormat::RG8_UNORM.bunnei2018-08-131-0/+1
| | | | - Used by Breath of the Wild.
* Implement R8_UINT RenderTargetFormat & PixelFormat (#1014)greggameplayer2018-08-121-0/+1
| | | | - Used by Go Vacation
* gl_rasterizer: Implement render target format RG8_SNORM.bunnei2018-08-121-0/+1
| | | | - Used by Super Mario Odyssey.
* gl_rasterizer: Implement render target format RGBA8_SNORM.bunnei2018-08-121-0/+1
| | | | - Used by Super Mario Odyssey.
* Merge pull request #1016 from lioncash/videobunnei2018-08-111-9/+1
|\ | | | | video_core: Get rid of global variable g_toggle_framelimit_enabled
| * video_core; Get rid of global g_toggle_framelimit_enabled variableLioncash2018-08-111-9/+1
| | | | | | | | | | | | | | | | | | Instead, we make a struct for renderer settings and allow the renderer to update all of these settings, getting rid of the need for global-scoped variables. This also uncovered a few indirect inclusions for certain headers, which this commit also fixes.
* | Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats and more (R16_UNORM needed by Fate Extella) (#848)greggameplayer2018-08-111-0/+7
|/ | | | | | | | | | | | | | | * Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats Do a separate function in order to get Bytes Per Pixel of DepthFormat Apply the new function in gpu.h delete unneeded white space * correct merging error
* gl_rasterizer_cached: Implement RenderTargetFormat::B5G6R5_UNORM.bunnei2018-08-081-0/+1
| | | | - Used by Super Mario Odyssey.
* video_core: Eliminate the g_renderer global variableLioncash2018-08-041-1/+5
| | | | | | | | | | | | | | We move the initialization of the renderer to the core class, while keeping the creation of it and any other specifics in video_core. This way we can ensure that the renderer is initialized and doesn't give unfettered access to the renderer. This also makes dependencies on types more explicit. For example, the GPU class doesn't need to depend on the existence of a renderer, it only needs to care about whether or not it has a rasterizer, but since it was accessing the global variable, it was also making the renderer a part of its dependency chain. By adjusting the interface, we can get rid of this dependency.
* Implement R32_FLOAT RenderTargetFormatUnknown2018-08-011-0/+1
|
* GPU: Allow using R16F as a render target format.Subv2018-07-261-0/+1
|
* Implement R16_G16Unknown2018-07-261-0/+5
| | | | | | | | | | | | | | | | | | correct trailing white spaces Delete tabs correct placement Add RG16F & RG16UI & RG16I & RG16S PixelFormats Return correct data according to changes done previously correct PixelFormat declaration correct coding style error correct coding style error part 2 correct RG16S Declaration error correct alignment
* Merge pull request #816 from Subv/z32_s8bunnei2018-07-251-0/+1
|\ | | | | GPU: Implemented the Z32_S8_X24 depth buffer format.
| * GPU: Implemented the Z32_S8_X24 depth buffer format.Subv2018-07-251-0/+1
| |
* | GPU: Allow the usage of R8 as a render target format.Subv2018-07-251-0/+1
|/
* gl_rasterizer_cache: Implement RenderTargetFormat RG32_FLOAT.bunnei2018-07-241-0/+1
|
* gl_rasterizer_cache: Implement RenderTargetFormat BGRA8_UNORM.bunnei2018-07-241-0/+1
|
* gpu: Rename Get3DEngine() to Maxwell3D()Lioncash2018-07-211-5/+4
| | | | This makes it match its const qualified equivalent.
* vi: Partially implement buffer crop parameters.bunnei2018-07-181-0/+1
|
* GPU: Implemented the Z24S8 depth format and load the depth framebuffer.Subv2018-07-021-0/+9
|
* GPU: Implemented the RGBA32_UINT rendertarget format.Subv2018-06-301-0/+1
|
* GPU: Partially implemented the Maxwell DMA engine.Subv2018-06-121-0/+3
| | | | Only tiled->linear and linear->tiled copies that aren't offsetted are supported for now. Queries are not supported. Swizzled copies are not supported.
* Merge pull request #527 from Subv/rgba32f_texcopybunnei2018-06-061-0/+1
|\ | | | | GPU: Allow the usage of RGBA32_FLOAT and RGBA16_FLOAT in the texture copy engine.
| * GPU: Allow the usage of RGBA32_FLOAT in the texture copy engine.Subv2018-06-061-0/+1
| |
* | GPU: Implemented the R11FG11FB10F texture and rendertarget formats.Subv2018-06-061-0/+1
|/
* GPU: Added a function to retrieve the bytes per pixel of the render target formats.Subv2018-04-251-0/+3
|
* GPU: Move the Maxwell3D macro uploading code to the inside of the Maxwell3D processor.Subv2018-04-251-7/+0
| | | | It doesn't belong in the PFIFO handler.
* gpu: Add several framebuffer formats to RenderTargetFormat.bunnei2018-04-181-0/+3
|
* graphics_surface: Fix merge conflicts.bunnei2018-03-271-0/+1
|
* maxwell: Add RenderTargetFormat enum.bunnei2018-03-271-1/+1
|
* Frontend: Updated the surface view debug widget to work with Maxwell surfaces.Subv2018-03-241-0/+4
|
* Frontend: Ported the GPU breakpoints and surface viewer widgets from citra.Subv2018-03-241-0/+5
|
* renderer_opengl: Better handling of framebuffer transform flags.bunnei2018-03-231-1/+4
|
* video_core: Move FramebufferInfo to FramebufferConfig in GPU.bunnei2018-03-231-0/+29
|
* gpu: Expose Maxwell3D engine.bunnei2018-03-231-0/+4
|
* GPU: Move the GPU's class constructor and destructors to a cpp file.Subv2018-03-181-10/+8
| | | | This should reduce recompile times when editing the Maxwell3D register structure.
* GPU: Store uploaded GPU macros and keep track of the number of method parameters.Subv2018-03-181-1/+9
|
* GPU: Macros are specific to the Maxwell3D engine, so handle them internally.Subv2018-03-181-3/+0
|
* GPU: Process command mode 5 (IncreaseOnce) differently from other commands.Subv2018-03-171-0/+3
| | | | | | Accumulate all arguments before calling the desired method. Note: Maybe we should do the same for the NonIncreasing mode?
* GPU: Partially implemented the QUERY_* registers in the Maxwell3D engine.Subv2018-02-121-1/+1
| | | | Only QueryMode::Write is supported at the moment.
* Make a GPU class in VideoCore to contain the GPU state.Subv2018-02-121-0/+55
Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.