aboutsummaryrefslogtreecommitdiff
path: root/src/GPU3D.cpp
Commit message (Collapse)AuthorAge
* Fix some compiler warningsWaluigiWare642021-05-03
|
* update copyright year and add missing GPL headersRSDuck2021-03-12
|
* Allow for a more modular renderer backends (#990)Wunk2021-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Draft GPU3D renderer modularization * Update sources C++ standard to C++17 The top-level `CMakeLists.txt` is already using the C++17 standard. * Move GLCompositor into class type Some other misc fixes to push towards better modularity * Make renderer-implementation types move-only These types are going to be holding onto handles of GPU-side resources and shouldn't ever be copied around. * Fix OSX: Remove 'register' storage class specifier `register` has been removed in C++17... But this keyword hasn't done anything in years anyways. OSX builds consider this "warning" an error and it stops the whole build. * Add RestartFrame to Renderer3D interface * Move Accelerated property to Renderer3D interface There are points in the code base where we do: `renderer != 0` to know if we are feeding an openGL renderer. Rather than that we can instead just have this be a property of the renderer itself. With this pattern a renderer can just say how it wants its data to come in rather than have everyone know that they're talking to an OpenGL renderer. * Remove Accelerated flag from GPU * Move 2D_Soft interface in separate header Also make the current 2D engine an "owned" unique_ptr. * Update alignment attribute to standard alignas Uses standardized `alignas` rather than compiler-specific attributes. https://en.cppreference.com/w/cpp/language/alignas * Fix Clang: alignas specifier Alignment must be specified before the array to align the entire array. https://en.cppreference.com/w/cpp/language/alignas * Converted Renderer3D Accelerated to variable This flag is checked a lot during scanline rasterization. So rather than having an expensive vtable-lookup call during mainline rendering code, it is now a public constant bool type that is written to only once during Renderer3D initialization.
* fixes to the threadedness of the sw rasteriserRSDuck2021-01-26
| | | | also fix #639 and fix #880
* GX: fix vector testRSDuck2021-01-04
| | | | | after I broke it in d2c04c5c511cca3daeed292a397a5ae8ae2aa6a7 fixes Mario & Luigi Partners in Time
* make FIFO size static whene possibleRSDuck2020-12-30
|
* GX: add fastpath for single parameter cmdsRSDuck2020-12-30
|
* fix segfault for build with OpenGL disabledRSDuck2020-12-14
|
* GPU: forward BG0HOFS to internal rendering engine register for 3D layer ↵Arisotura2020-12-10
| | | | | | | | scroll (only when the rendering engine is enabled). fixes #840 thank you RSDuck and Hydr8gon for your insight into this.
* add cur vertex and light information to savestateRSDuck2020-12-09
|
* Merge vram dirty trackingRSDuck2020-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit b463a05d4b909372f0cd1ad91caa0c77a25e5901 Author: RSDuck <rsduck@users.noreply.github.com> Date: Mon Nov 30 01:55:35 2020 +0100 minor fix commit ce73cebbdf5da243d7ebade82d8799ded9cd6b28 Author: RSDuck <rsduck@users.noreply.github.com> Date: Mon Nov 30 00:43:08 2020 +0100 fix dirty flags of BG/OBJ mappings not being reset commit fc5d73a6178e3adc444398bdd23de8314b5ca8f8 Author: RSDuck <rsduck@users.noreply.github.com> Date: Mon Nov 30 00:11:13 2020 +0100 use flat vram for gpu2d everywhere commit 34ee9fe2bf04fcfa2a5a1c8d78d70007e606f1a2 Author: RSDuck <rsduck@users.noreply.github.com> Date: Sat Nov 28 19:10:34 2020 +0100 mark VRAM dirty for display capture commit e8778fa2f429c6df0eece19d6a5ee83ae23a0cf4 Author: RSDuck <rsduck@users.noreply.github.com> Date: Sat Nov 28 18:59:31 2020 +0100 use flat VRAM for textures and texpals also skip rendering if nothing changed and a bunch of fixes commit 53f2041e2e1a28b35702a2ed51de885c36689f71 Author: RSDuck <rsduck@users.noreply.github.com> Date: Fri Nov 27 18:29:56 2020 +0100 use vram dirty tracking for extpals also preparations to take this further commit 4cdfa329e95aed26d3b21319c8fd86a04abf20f7 Author: RSDuck <rsduck@users.noreply.github.com> Date: Mon Nov 16 23:32:22 2020 +0100 VRAM dirty tracking
* make OpenGL renderer a build optionRSDuck2020-10-01
| | | | mostly meant for the Switch port
* remove some UBRSDuck2020-09-04
| | | | | | | - savestates used to read a four bytes from a single byte value - a few unassigned variables - some other things - also make the ROR macro an inline function
* 3D: add a bunch of missing variables to savestates. oops.Arisotura2020-08-19
| | | | fixes #716
* * rework GPU's settings interface, make it config-agnosticArisotura2020-05-28
| | | | | * make video settings dialog functional, sorta * fix dialogs that were resizable
* get the OpenGL renderer going.Arisotura2020-05-25
| | | | | | sorta. (also make the blackmagic_II branch obsolete in the process)
* GPU3D: more accurate viewport transform (emulate quirk with W greater than ↵Arisotura2020-04-12
| | | | 0xFFFF)
* GPU3D: implement zero-dot W limit (DISP_1DOT_DEPTH)Arisotura2020-04-12
|
* GPU3D: swap vin and vout during clipping, giving results that are closer to ↵Arisotura2020-04-11
| | | | | | hardware. fixes #598 and also fixes #379
* update copyright yearsArisotura2020-02-14
|
* fix bugs with line polygonsArisotura2019-06-12
|
* hack so that the GL renderer can render linesArisotura2019-06-12
|
* fix more bugsArisotura2019-05-24
|
* getting somewhere??Arisotura2019-05-24
|
* more code botchingArisotura2019-05-24
| | | | | | it's less shitty tho but still has bugs
* welp.Arisotura2019-05-21
| | | | progress
* remove reference to GL version 4.3 from filenames and namespacesArisotura2019-05-20
|
* BAHAHAHHHHArisotura2019-05-16
| | | | HARK HARK HARK
* BAHAHAHAHAHAHAHAAArisotura2019-05-16
|
* de-hardcode the GL renderer.Arisotura2019-05-12
| | | | | init framebuffer to black. fix bugs.
* calculate hi-res vertex positions. reduces shaking of polygons when ↵Arisotura2019-05-11
| | | | rendering at a higher res.
* hires hax. somewhat functionalArisotura2019-05-08
|
* first attempt at thingsArisotura2019-04-01
| | | | (also fix softrenderer reset)
* also, update copyright nameArisotura2019-01-22
|
* redesign main emu loop to use timestamps instead of being a trainwreckStapleButter2019-01-05
| | | | | | | | * cleaner code * faster in some cases * more accurate (on-demand compensation for timers and GPU) * less prone to desyncs * overall betterer
* GX: polygon pipeline doesn't get as far if the polygon is rejected by ↵StapleButter2019-01-03
| | | | culling/clipping.
* GX: always latch rendering engine registers even when not flushing (similar ↵StapleButter2019-01-03
| | | | to hardware).
* move the W=0 check, to be sure to check all the verticesStapleButter2018-12-20
|
* some work on extreme/degenerate shit in GPUStapleButter2018-12-20
| | | | | | * clip against Z then Y then X. apparently, fixes #310. I had also observed hints that the hardware does it this way. * truncate W to 24 bits before viewport transform. * mark any polygons that have a W=0 at that point as degenerate. do not render.
* implement proper support for POWCNT1.StapleButter2018-12-18
| | | | fixes #260
* be sure to always reset NormalPipelineStapleButter2018-12-17
|
* GX: timing for command 0x50 is more like 325 cycles on average on hardware. ↵StapleButter2018-12-15
| | | | | | (measured 319/325/331) fixes #297
* set GXSTAT busy flag immediately when writing a command to the GXFIFO.StapleButter2018-12-15
| | | | | | there was a slim chance that a game could send a couple commands and read GXSTAT.busy as zero immediately after. the new timings made that happen in NSMB (not in the USA ROM, oddly), such that the game was reading the clip matrix while matrix commands were running, and getting the first few values wrong. fixes #295 and probably others in the same vein.
* begin work on general timing renovation. way shitty because it behaves as if ↵StapleButter2018-12-04
| | | | caches were off, so everything will be slow as shit.
* oopsiesStapleButter2018-11-28
|
* add some missing shit to savestatesStapleButter2018-11-25
|
* fix regression in Marvel Nemesis. keep GX cycle counter from drifting ↵StapleButter2018-11-25
| | | | absurdly far in the negatives, and fix a few other issues.
* drain GX pipelines when there's nothing else running. fixes some weird bugs, ↵StapleButter2018-11-24
| | | | apparently.
* * fix possible issues with GXFIFO stallingStapleButter2018-11-24
| | | | | * rework GPU timings, now almost same as hardware. display lists generally execute faster. not finished. not bad for a start tho. * Rayman RR2 is still getting sound streaming issues. I don't think GXFIFO stalls are supposed to halt the ARM7. that doesn't make sense and would mess badly with sound since it's also using the ARM7 bus.
* add proper support for GXFIFO stalls.StapleButter2018-11-23
| | | | | | | | bad games that blast the GXFIFO and overflow it: * Super Mario 64 DS * Rayman RR2 latter seems to get its music streaming crapoed.