Commit graph

131 commits

Author SHA1 Message Date
Connor McLaughlin 304391bd00 GPU: Truncate sprite/rectangle positions to 12 bits before rendering
Fixes disappearing objects in Skullmonkeys.
2020-04-27 12:51:18 +10:00
Connor McLaughlin 2ffcad3d37 GPU: Add method to convert from window coordinates to beam ticks/lines 2020-04-26 01:22:56 +10:00
Connor McLaughlin 6e6c11f8bf GPU: Fix dithering enable check for non-textured polygons
Fixes screen fade out effects in Final Fantasy VIII.
2020-04-24 19:53:49 +10:00
Connor McLaughlin badfe6117e GPU: Remove textured draw time penalty
Fixes missing elements in Bloody Roar 2.
2020-04-20 12:25:00 +10:00
Connor McLaughlin 3319adfa2f GPU: Tweak rectangle draw times 2020-04-19 16:57:51 +10:00
Connor McLaughlin 16500064f8 GPU: Tweak triangle draw times 2020-04-19 15:24:40 +10:00
Connor McLaughlin 1757932b3a GPU: Implement FIFO and timings
This will cause a slight performance loss. I've left some knobs in which
can be tweaked to mitigate this, but the goal is to be compatible with
all games which require them.
2020-04-19 01:17:28 +10:00
Connor McLaughlin 6775100170 GPU: Drop OpenGL ES renderer
We can put this through the normal GL renderer instead.
2020-04-11 00:00:10 +10:00
Connor McLaughlin 3325d2c42c GPU: Add Force NTSC timings option
This option forces NTSC timings for PAL games, causing them to either
run faster (more likely) or smoother (less likely).
2020-04-10 13:35:10 +10:00
Connor McLaughlin 3cfead36c4 Revert "GPU: Clamp coordinates to 11 bits after applying drawing offset"
This reverts commit 5302f83818.

This is not the correct fix, and breaks other games.
2020-04-04 19:31:19 +10:00
Connor McLaughlin c483a78889 GPU: Implement interlaced VRAM fills 2020-04-04 00:24:37 +10:00
Connor McLaughlin 2aecb570c1 GPU: Implement interlaced rendering in hardware backends 2020-04-04 00:24:37 +10:00
Connor McLaughlin 7f5c6f8b4f GPU/HW: Move some flush checks to command time 2020-04-04 00:10:55 +10:00
Connor McLaughlin 5302f83818 GPU: Clamp coordinates to 11 bits after applying drawing offset
Fixes flickering in some scenes (e.g. Galbadia Missile Base).
2020-04-04 00:10:45 +10:00
Connor McLaughlin 48fba47ee6 GPU: Implement skip-drawing-to-active-field for interlaced mode
Currently only in the software renderer.
2020-04-04 00:10:41 +10:00
Connor McLaughlin 148279e2f2 GPU: Rewrite CRTC display modeling and overscan handling 2020-03-29 01:14:37 +10:00
Connor McLaughlin 54abd37daa GPU: Let the GPU drive DMA transfers for large time slices
Fixes FMV breakage... again.
2020-03-26 00:13:20 +10:00
Connor McLaughlin e2e2b573c0 GPU/HW: Move drawing offset to CPU-side
Saves updating the uniform buffer.
2020-03-24 00:20:15 +10:00
Connor McLaughlin d67bcd654c GPU: Prevent emulator locking up when switching between PAL/NTSC mode 2020-03-20 01:12:41 +10:00
Connor McLaughlin f9a298f1b7 GPU: Fix incorrect handling of check mask bit
Fixes boxes in Silent Hill in Software Renderer.
2020-03-06 00:45:21 +10:00
Connor McLaughlin 34f1c644f5 GPU: Update GPUSTAT if raster has passed to the next line
Fixes games which poll GPUSTAT, including The Next Tetris (Europe).
2020-03-01 17:14:42 +10:00
Connor McLaughlin b0b1fd8f1a GPU: Timing for CPU->VRAM transfers
Fixes Monkey Hero, probably others.
2020-03-01 17:14:38 +10:00
Connor McLaughlin 6b9c6d3750 GPU: Add a helper function to determine how many GPU ticks are pending 2020-03-01 17:14:32 +10:00
Connor McLaughlin fdcb891ed3 GPU: Fix incorrect detection of 480i mode 2020-02-29 00:19:23 +10:00
Connor McLaughlin fcc0ae9571 GPU: Implement "Crop Mode" (none, overscan, all borders) 2020-02-28 17:01:01 +10:00
Connor McLaughlin 07ba2ecd3d Settings: Simplify resolution scale enumeration 2020-02-28 16:59:55 +10:00
Connor McLaughlin bd542831a8 GPU: Fix incorrect bit check in DrawMode::IsUsingPalette()
Fixes Sony Computer Entertainment fade in the NTSC-J BIOS.
2020-02-17 00:09:27 +09:00
Connor McLaughlin b8210ecbe3 GPU: Use correct texture page size in overlap tracking 2020-02-12 20:58:34 +09:00
Connor McLaughlin 1e45c9c4e1 GPU: Fix incorrect overwrite of set mask bit from draw mode
Fixes motion blur in Vagrant Story.
2020-02-08 00:01:37 +09:00
Connor McLaughlin 7e862cd63e GPU: Texture bit should be ignored when drawing lines
Fixes line flickering in Vagrant Story.
2020-02-07 00:10:36 +09:00
Connor McLaughlin 1b9609ef61 Implement event-based scheduler instead of lock-step components 2020-01-24 16:23:39 +10:00
Connor McLaughlin 4a3478b360 HostInterface: Add function to switch between sw/hw rendering 2020-01-24 14:51:53 +10:00
Connor McLaughlin 71c1e243fe Remove YBaseLib dependency 2020-01-10 13:40:53 +10:00
Connor McLaughlin f5d65448d6 GPU: Improve structure alignment 2019-12-11 20:28:14 +10:00
Connor McLaughlin 8f624afb59 GPU: Fix handling of GP1(09h) 2019-12-11 16:47:49 +10:00
Connor McLaughlin ffe90083d3 GPU: Refactor draw mode setting 2019-12-11 16:35:14 +10:00
Connor McLaughlin df6e079920 GPU: Add a Force Progressive Scan option (disable interlacing) 2019-12-10 22:52:46 +10:00
Connor McLaughlin c284d3835f GPU: Add a simplified OpenGL ES renderer
Seems this is the only way to get semi-decent performance out of Mali
drivers :/
2019-12-07 01:37:37 +10:00
Connor McLaughlin db0d11c2ff GPU/HW: Cull primitives larger than 1024x512 2019-11-24 23:46:33 +10:00
Connor McLaughlin 9d6d00480c GPU: Implement mask bit handling in software renderer
Still needs implementation in the hardware renderers.
2019-11-24 18:47:42 +10:00
Connor McLaughlin 246c97ccb3 System: Scaffolding for multi-system/multi-bios 2019-11-16 20:50:59 +10:00
Connor McLaughlin 49569d29aa GPU: Refactor command execution/VRAM->CPU transfers
Simpler, and handles odd sizes correctly.
2019-11-14 22:17:11 +10:00
Connor McLaughlin 9ea7a8418c GPU: Eliminate temporary buffer when reading back 2019-11-14 17:17:22 +10:00
Connor McLaughlin 7152d54104 GPU: Simplify 480i mode handling in CRTC 2019-11-14 00:58:15 +10:00
Connor McLaughlin d8452d7d7d GPU: Track horizontal blanking, correct timer increment point 2019-11-12 01:32:06 +10:00
Connor McLaughlin cc7483ad58 GPU/HW: Only copy the dirty area to the VRAM read texture 2019-11-05 22:34:36 +10:00
Connor McLaughlin 2c631aba5e GPU: Move stats from renderer class to base classes 2019-11-05 19:44:17 +10:00
Connor McLaughlin afbec85f89 GPU/HW: Track dirty area of VRAM shadow texture via drawing area 2019-11-05 19:19:49 +10:00
Connor McLaughlin 9de9cf3be2 GPU/HW: Add D3D11 renderer and refactor host interface/display 2019-11-04 00:39:48 +10:00
Connor McLaughlin be81d08109 GPU/HW: Split shadergen to seperate class 2019-11-03 13:36:59 +10:00
Connor McLaughlin 91c99f0226 GPU/HW: Use uniform blocks for batch rendering 2019-11-03 13:18:43 +10:00
Connor McLaughlin aa1f3ad8f7 GPU: Don't truncate clear colour to 15-bit with true colour on 2019-11-03 01:05:37 +10:00
Connor McLaughlin ba1a5a5ca9 GPU: Fix batching regression (draws split on texture page) 2019-11-03 00:36:47 +10:00
Connor McLaughlin bb572d5c14 GPU: Remove hack for bitwise ops on TextureMode enum 2019-11-03 00:01:54 +10:00
Connor McLaughlin c52c0608ae GPU: Move resolution scale to hardware backend only 2019-11-02 01:32:27 +10:00
Connor McLaughlin c9feb7ea07 GPU: Add force true color setting 2019-11-02 00:31:25 +10:00
Connor McLaughlin 3aa4219067 GPU: Implement dithering on software backend 2019-11-01 23:11:37 +10:00
Connor McLaughlin ac82383abe GPU: Implement dithering on OpenGL backend 2019-11-01 23:11:30 +10:00
Connor McLaughlin 1c79737021 GPU: Simplify batch state 2019-11-01 21:47:45 +10:00
Connor McLaughlin 5626d4f282 GPU: Fix texcoord off-by-one error in rectangles 2019-10-29 23:42:08 +10:00
Connor McLaughlin 772ef27a55 GPU: Implement display disable command GP1(03h) 2019-10-28 17:43:34 +10:00
Connor McLaughlin b1d3ba3d68 GPU: Remove unused resolution fields in CRTC 2019-10-27 20:20:53 +10:00
Connor McLaughlin 540e942a46 Add basic software GPU renderer 2019-10-26 12:57:45 +10:00
Connor McLaughlin 9b56499afa Refactoring settings/support changing GPU renderer at runtime 2019-10-26 12:55:56 +10:00
Connor McLaughlin a76ec6fc19 Compile fixes for GCC 2019-10-22 23:07:51 +10:00
Connor McLaughlin 1b8b730f85 GPU: Compute display aspect ratio based on visible area 2019-10-21 00:18:52 +10:00
Connor McLaughlin 2e70c22422 GPU: Properly handle display range config 2019-10-20 23:19:26 +10:00
Connor McLaughlin baf97cb864 GPU: Split command handlers into seperate file 2019-10-18 23:52:52 +10:00
Connor McLaughlin 45bfcc8225 GPU: Fix GPUSTAT(31) during vblank 2019-10-16 02:17:18 +10:00
Connor McLaughlin 7448cbaf9d GPU: Copy-less processing from DMA 2019-10-13 17:33:20 +10:00
Connor McLaughlin ec8c5d4bb6 DMA: Batch multi-word transfers together 2019-10-13 16:48:11 +10:00
Connor McLaughlin 0f68c8c5d3 Add debugging for GPU/Timers 2019-10-12 22:15:38 +10:00
Connor McLaughlin b7209eafb1 GPU: Fix out-of-bounds read in GP1(10h) 2019-10-06 00:37:31 +10:00
Connor McLaughlin bc8e035e37 GPU: Implement texture window 2019-10-05 23:27:48 +10:00
Connor McLaughlin f59d35023c GPU: Stub out more commands 2019-10-05 22:22:49 +10:00
Connor McLaughlin 6541c82071 GPU: Use 12-bit int (sign plus 11 bits) for vertex position
Fixes whacky polygons in Crash 2 and logo in Crash 1.
2019-10-04 23:48:31 +10:00
Connor McLaughlin 27bc65fc2a GPU: Use BitField sign extending for position 2019-10-04 23:21:20 +10:00
Connor McLaughlin 004c22f031 Frontend: Prevent drawing imgui into the vram texture 2019-10-04 22:27:18 +10:00
Connor McLaughlin 4fa79f1503 GL: Eliminiate most redundant state setting calls at draw time 2019-10-04 22:10:43 +10:00
Connor McLaughlin 8362b8e43b UI: Beginning of customizable settings, debug menu 2019-10-04 15:00:32 +10:00
Connor McLaughlin bddbab9d60 Rename to DuckStation 2019-10-04 13:54:09 +10:00
Renamed from src/pse/gpu.h (Browse further)