Commit Graph

82 Commits

Author SHA1 Message Date
Flyinghead 33edcca348 texture: expand color data of planar textures
Partial revert of f4835a89d3
Fixes color differences between planar and !planar textures in Sakura
Taisen 2.
Issue #1256
2023-10-22 10:17:01 +02:00
Flyinghead 6b05c0ab01 tex conv: extend alpha channel of planar 4444 textures
The alpha channel needs to be extended for PT polygons to work. Fixes
Langrisser Millenium black title screen and missing textures on
character selection screen.
Issue #1201
2023-09-20 17:06:05 +02:00
Flyinghead f4835a89d3 implement dithering in full FB mode
gl, vk, dx11, dx9: implement ordered dithering in GLSL/HLSL
refactor framebuffer and texture writes to vram
don't expand color data when reading planar textures
2023-09-10 16:25:19 +02:00
Flyinghead afc1f5f4e1 Merge remote-tracking branch 'origin/master' into dev 2023-03-15 21:09:47 +01:00
Flyinghead e4332f6275 tex: ignore stride if 0. renderer: ignore invalid textures
Ignore StrideSel if 0 during texture update and use width instead.
Return false from BaseTextureCacheData::Update() if texture is invalid.
Make sure valid textures have non-null height and size.
gl,vk,dx9,dx11: ignore invalid textures

Fixes MINIDUMP-GP
2023-03-12 15:58:56 +01:00
Flyinghead 5da799244f rend: fix regression on YUV texture conversion
std::clamp wrong parameters order in d8137a967c
2023-02-18 22:44:44 +01:00
scribam d8137a967c
C++17 (#926)
* cmake: use c++17

* Use std::size

* Use std::make_unique

* Use std::clamp

* Use structured binding

* Use [[fallthrough]]

* Use enable_if_t/is_enum_v/is_integral_v/is_same_v

* Use if constexpr

* Use try_emplace

* Use auto for iterators

* Use inline variables
2023-02-18 13:24:34 +01:00
scribam 80cf4406a7 cleanup include headers 2023-01-26 10:06:51 +01:00
Flyinghead f8372c51a7 Revert "wip headers"
This reverts commit e3e2c3a0d2.
2023-01-24 14:26:14 +01:00
scribam e3e2c3a0d2 wip headers 2023-01-23 18:29:04 +01:00
Flyinghead db9fbbaebf custom texture loader must be stopped before the tex cache is cleared
Fix for MINIDUMP-53
2023-01-22 17:22:04 +01:00
Flyinghead 1ab4eb00c0 tex cache: minor key mask fix. egl: no need for depth/stencil surface
Part of PalSelect was used as cache key for palette textures
PrintTexture fix
egl,wgl,xgl: No need for depth/stencil surface
gl: non-functional refactoring
2022-12-09 17:49:32 +01:00
Flyinghead 5722dc90f0 Full framebuffer emulation. Renderer interface changes
Helps for:
Densha de Go! 2, Issue #171
Vigilante 8, Issue #275
Xtreme Sports
Sonic Shuffle
The Ring of the Nibelungen
2022-10-23 16:32:42 +02:00
Flyinghead decf70c87c get rid of INLINE, NOINLINE, __forceinline 2022-10-22 22:14:19 +02:00
Flyinghead 1858cf3b33 Merge remote-tracking branch 'origin/master' into dev 2022-09-24 19:28:38 +02:00
Edward Li c2e1425209 Stop Apple fanboys from asking where is Metal 2022-09-21 14:43:28 +02:00
Flyinghead ad8b41adb0 boxart: extract 0GDTEX.PVR. Offline scraping
extract iso9660 file system utility out of reios
.pvr limited parser
2022-07-21 10:43:45 +02:00
Flyinghead 5eb302898f box art fetch and display
Issue #22
2022-06-15 21:22:12 +02:00
flyinghead afd07c25ba pvr: store tex address in render context. texture cache refactoring
Store FT_W_SOF1 and FT_W_CTRL in render context since they can be
modified before render end. New tentative fix for vf4 water reflection
flashing black during netplay.
Refactor texture cache to use constructors. RTT code moved from
renderers.
Partial revert of ddcd3861d3
2022-06-11 13:24:22 +02:00
Flyinghead ddcd3861d3 ggpo: don't protect rtt texture vram if ggpo is enabled
tentative fix for flashing water reflection texture in vf4 during
netplay
2022-05-31 17:42:42 +02:00
flyinghead 46044c068b cheats: don't rely on cheat count on load. Fix compile warnings 2021-12-11 18:33:28 +01:00
flyinghead 99195c3f4c dx11: set clip planes on X and Y. rend: Force palette update at init
dx11: Set clip planes at X -1/1 and Y -1/1 to avoid rasterizer errors.
Fixes Daytona Mermaid lake depth issues
dx11: fix texture wrap around at UV 1 with nearest filtering
dx9: inside clipping
all renderers: force full palette update at init
2021-12-01 14:54:03 +01:00
Flyinghead 69d0801121 net rollback with ggpo 2021-09-02 17:51:23 +02:00
flyinghead 6316479930 get rid of unneeded pixel unpacker and use better name 2021-04-29 18:38:58 +02:00
flyinghead 5359e9a09d allow gpu-handled palette textures to be replaced by custom version
Issue #219
Fix incorrect texture size calculation for VQ textures.
Reorder BaseTextureCacheData fields to have hottest on top
2021-04-17 18:40:58 +02:00
flyinghead abc8b18b78 dx9: mipmaps. load/dump textures. vmu/crosshair display.
upload all texture mipmaps to gpu
dump textures. load custom textures
vmu and lightgun xhair display
fix dx9 half-pixel offset
fix 565_32 unpacker bug
2021-04-16 18:30:47 +02:00
flyinghead c889bfa6d4 dx9: copy to vram. clipping. fix depth/stencil size. better reset
Coordinate device reset with dxcontext. Keep compiled shaders.
Don't use automatic depth/stencil on backbuffer. Manually handle it.
Implement scissoring/clipping
multipass translucent depth
Render-to-texture copy to vram
2021-04-15 15:17:32 +02:00
flyinghead f107d380b9 WIP directx9 renderer 2021-04-12 22:49:04 +02:00
Flyinghead 24d172bd51 gl: use async PBO to copy texture back to vram 2021-04-08 10:33:14 +02:00
scribam 26ebcdf9f5 clang-tidy: run modernize-use-equals-default 2021-03-14 21:52:42 +01:00
flyinghead 0e20d5976b vram texture locks race condition 2021-03-05 18:22:42 +01:00
Flyinghead c3a95594f9 New option system
Fix per-game settings (Issue #115)
Automatic load/save state (Issue #173)
Reload Naomi/AW BIOS after per-game settings are loaded to allow
per-game BIOS region. (Issue #96)
Restrict Soul Reaver widescreen cheat to the EU version (Issue #188)
Disable UI elements for overridden settings
Clean up/simplify legacy Naomi ROM loading
2021-03-01 10:13:40 +01:00
flyinghead 16dec49e08 windows: use utf8 internally. Support latin2, cyrillic, etc. pathnames
upgrade libzip to 1.7
imgui: use all glyphs from font including latin2, cyrillic, greek, etc.
2021-01-19 11:11:01 +01:00
Flyinghead c03cf8eb45 rend: multi-render, delay swap, refactor main ui loop
move ui loop out of hw/pvr
vk: implement multi-rendering, delay swap. Load fb before render pass
fps counter now counts frames, not renders
vk: force ignoreTexAlpha for 565 texture in case the supporting texture
has an alpha channel (RTT). Fixes Alone in the Dark cinematic scenes.
pvr: better detection of frame swapping (FB_R_SOF/FB_W_SOF)
pvr: synchronous rendering now always waits for render in progress
(speed measurement not reliable, render skipped when multi-rendering)
vk: limit swap chain size to 2
2020-12-15 15:09:42 +01:00
Flyinghead b147f71ffa fix crash with vulkan an android
compiler bug?
2020-12-08 15:45:39 +01:00
Flyinghead 8905410aa4 clean up 2020-11-30 21:59:13 +01:00
Flyinghead 7744e1a262 vk: use-after-free if inFlight texture is deleted or cache cleared 2020-11-24 18:01:09 +01:00
Flyinghead 1713124711 vulkan: linear tiling for small texs. don't track in-flight texs
Linear tiling is faster for small, frequently updated textures
When lots of textures are updated each frame, a skipped frame will
destroy/recreate all textures, causing another skipped frame, etc. So
in-flight texture tracking is disabled, except for RTT textures
Limit swap chain to 2 images
Refactor base and oit renderers to avoid code dup
2020-07-10 18:50:53 +02:00
Flyinghead 7449230af8 handle some palette textures on the GPU
get rid of PixerPacker templates
no need for GLSL precision qualifier in GL4
2020-07-08 18:17:15 +02:00
scribam 5b60e3e47b Load custom textures with stb_image exclusively and remove loadPNGData function 2020-04-07 19:17:16 +02:00
scribam 0077bbe295 Remove unused deposterize code 2020-04-03 18:55:02 +02:00
Flyinghead d1b29a59d2 vulkan: re-enable vulkan 1.1 on Android. Fix TEST_AUTOMATION
disable vmem32 for Heroes of Might and Magic III
support no vmem in _vmem.cpp
2020-04-03 16:32:53 +02:00
scribam a155282fd0 Cleanup compiler warnings (mostly sign-compare) 2020-03-30 23:00:43 +02:00
scribam e99aac3575 Remove "using namespace std;" 2020-03-30 23:00:43 +02:00
scribam 4bf6802855 Cleanup include headers 2020-03-29 14:26:21 +02:00
Flyinghead 5894992f70 android: don't use storage for default buttons.png 2020-03-24 23:31:34 +01:00
Flyinghead 34ac18479f osx build fix 2020-03-18 19:09:25 +01:00
Flyinghead 54261b69c9 renderer: handle mipmap D-adjust param (convert to lod bias) 2020-03-18 18:51:34 +01:00
Flyinghead 03f096384b generate mipmaps for custom textures when needed 2020-03-09 22:49:05 +01:00
Flyinghead e2b3ef147d custom tex: recreate gl/vk texture when loading custom tex. vk crash 2020-02-19 14:31:35 +01:00