Commit Graph

902 Commits

Author SHA1 Message Date
Flyinghead ddfc00ed9f Merge remote-tracking branch 'origin/master' into dev 2022-04-13 16:29:41 +02:00
Flyinghead fd50529d86 gl: (lr) black screen when vmu display is on
need to call glBindVertexArray(0) to avoid VAO being modified by the
frontend
2022-04-12 18:23:09 +02:00
Flyinghead 15b21fff2b vk: don't use anisotropic with nearest. Use linear mipmap filter
Issue #580
2022-04-11 13:35:48 +02:00
scribam f46bccfecd cmake: reunified dx9 files 2022-04-10 11:28:09 +02:00
flyinghead d035af7ff0 xbox: low resolution (640x480) with recent firmware
Device ids for xbox series s/x returned from
GetGamingDeviceModelInformation() have changed
2022-04-09 12:04:51 +02:00
Flyinghead e0058c17ff lr: don't terminate emu on deinit. gl4: buffer wasn't released on term()
shared libraries containing gnuc unique symbols are never unloaded on
linux, and possibly other platforms. So don't terminate the emulator on
deinit and init it only once.
Issue #566

gl4: buffer not released on term() was causing crashes or black screen when restarted.
2022-04-05 14:53:47 +02:00
Flyinghead bf61f5cfe8 Merge remote-tracking branch 'origin/master' into dev 2022-04-04 12:11:10 +02:00
Flyinghead a635fb3f77 test automation build fix, better exit 2022-04-03 20:46:50 +02:00
flyinghead 2c96d49cf2 dx9, dx11: support for forced point/linear tex sampling and anisotropy 2022-04-02 11:18:48 +02:00
Hugo Locurcio a9cabdc342 Add texture filter override setting, expose anisotropic filtering
The new texture filter option can be set to:

- Default (keeps the game's intended filter mode).
- Force Nearest-Neighbor (crisper appearance).
- Force Linear (smoother appearance).

Additionally, mipmapping can now be enabled on nearest neighbor-filtered
textures (which is used if nearest-neighbor filtering is enabled, including
with anisotropic filtering).

Anisotropic filtering was already implemented in both OpenGL and Vulkan,
but it was not exposed in the GUI.
2022-04-01 16:00:41 +02:00
Hugo Locurcio 90a95b4688 Add 6×, 7×, 8× and 9× options for internal resolution
This can be used to get a smoother image (supersampling) on
1440p and 4K displays. The 9× setting is also suited for native
resolution rendering on 8K displays.
2022-04-01 16:00:28 +02:00
Flyinghead 6c38295d62 new naomi network protocol. vblank event. initd rumble support
new vblank event, used by cheats, lua and naomi net
new udp net protocol for naomi. rx/tx on vblank on emu thread.
input: rumble power configurable (Issue #158)
ui: rumble intensity slider, enable/disable upnp
aica: hook to consume midi out
decode midi out to simulate rumble for initd
upnp can now be disabled
2022-03-27 15:23:21 +02:00
Flyinghead 1e01dbb151 wrong line padding value when copying RTT to vram due to previous commit 2022-03-26 20:51:07 +01:00
Flyinghead be270259ee crash with RTT and copy to VRAM if width > linestride
RTT texture width must not exceed FB_W_LINESTRIDE
fixes Flag to flag crash
2022-03-25 15:41:16 +01:00
Flyinghead 56768f2d3d naomi2: use TA parser. Use N2light directly with vk, dx11
Use TA parser to handle list type and clipping for Naomi 2 polys.
Pass all pass-throuch TA data to TA parser but stop on naomi2 command.
Set default projection matrix instead of identity (fixes Area conquered
screen invisible in initd).
Change N2Light and N2LightModel so they are usable in GLSL (vulkan) and
HLSL (dx11).
TA parser throws exception for unhandled param.
ta_vtx.cpp refactoring.
Support for subtractive lights (diffuse+specular). Used in some clubk
circuits.
Fix vulkan crash when direct FB render.
2022-03-16 17:28:45 +01:00
Flyinghead ad08590197 vulkan: cache per-poly desc sets in map
avoid desc set pool exhaustion in per-triangle
2022-03-13 11:39:30 +01:00
Flyinghead 53b5588bda Merge remote-tracking branch 'origin/master' into dev 2022-03-13 11:01:27 +01:00
Flyinghead 1015a8c098 naomi2: vulkan support
oit: use #define instead of functions in GLSL
2022-03-12 17:56:46 +01:00
Flyinghead 27ddc215cc naomi2: boost lights by constant factor. simplify shaders 2022-03-08 17:38:29 +01:00
Flyinghead c11a6cd432 naomi2: partial gles2 compatibility
Issue #553
2022-03-07 20:32:08 +01:00
Flyinghead 7f61b44d42 imgui: better drag scrolling code 2022-02-21 19:48:52 +01:00
Flyinghead ecc03e3ebc naomi: use boot rom id to configure eeprom
Make eeprom from scratch if it doesn't exist based on boot id info.
Override eeprom settings to make game happy
Change region to supported one
Get rid of per-rom region info in rom list
New option to configure Naomi games in free play
2022-02-18 17:35:20 +01:00
Flyinghead d736dd027d naomi2: initd card support. lua: fix multi-threading crash
initial d card reader support. insert card button.
lua: use mutex to enforce thread-safety
2022-02-16 19:02:04 +01:00
Flyinghead 214db9e0b1 gl4: depth pass need texture and UV for punch-through polys 2022-02-15 17:18:32 +01:00
Flyinghead 3bbc89afc9 dx11: fix crash with modvols 2022-02-15 17:16:45 +01:00
Flyinghead 3872a6b475 libretro: support VMU and lightgun crosshair with dx11 OIT renderer
OIT support was missing
Issue #525
2022-02-15 11:06:51 +01:00
Flyinghead 083a1c85a8 gl: shader compile error on shield tablet
Don't use GL_NV_shader_noperspective_interpolation since it's not really
needed (and wasn't enabled)

Issue #510
2022-02-14 18:54:27 +01:00
Flyinghead 943e0285ac libretro: support VMU and lightgun crosshair with dx11 renderer
Issue #525
2022-02-14 18:47:23 +01:00
Flyinghead d7abfc688c dx11: oit depth pass needs the palette for PT polygons
Punch-through polys may use a palette, which is needed for alpha testing
Issue #467
2022-02-14 18:41:38 +01:00
Flyinghead 8f01ef90cf gl,dx9,dx11: only render frame when Renderer::present() has been called
Issue #511
2022-02-14 18:38:58 +01:00
flyinghead 8d071bf4ea naomi2: dx11 support. fix ambient color. no depth write in per-strip
dx11: naomi2 support
n2: ambient color was swapping red and blue
gl, dx11: don't write depth in per-strip to avoid missing geometry,
prefer wrong depth order/blending for now
optimize naomi2 per-triangle sorting
2022-02-13 21:01:45 +01:00
Flyinghead a14086d484 naomi2: shader error in gles. Invert clubkart wheel axis 2022-02-11 19:06:58 +01:00
Flyinghead 20d25059bf naomi2: remove geom shader. Merge transparent polys. bump mapping fix.
elan: Get rid of geometry shader and do geometry clipping manually.
pvr: Aggressively merge transparent polys in per-triangl and OIT mode, duplicating the last vertex to merge opposite cull mode strips.
gl4: reset OIT pointers in final shader. No need for clear pass.
gl4: alternate between 2 buffers for verts.index/tr poly params.
gl4: use gl_VertexID + poly number for poly index.
gl: new GlBuffer class.
2022-02-11 15:54:18 +01:00
Flyinghead debbae6ab1 naomi2: elan v10 emulation. texture dma xfers. 2-volume support
emulate elan v10 (fixes modvol in vf4, initd, beachspiker, wldrider)
wrong color order for model and vtx color
model param override xor support
improved light direction precision. Angle attenuation algo change
get rid of alpha light and modifier volume hacks
texture dma xfer from main and elan ram
gl4: use geometry only vtx and geom shaders for depth pass
2-volume support
2022-02-05 14:50:12 +01:00
Flyinghead 0362fd1079 naomi2: disable elan when net rollbacking, optimizations. ggpo: RTT fix
n2: do not process elan commands during ggpo rollbacks.
n2: Cache model colors to avoid unpacking for each vtx
pvr: merge equivalent polys with different culling by duping a vtx
pvr: fix crash during direct FB render
pvr: use correct color ordering for naomi2. Use identify matrix for null matrix pointers
ggpo: do not signal end of frame on a render to texture
2022-02-01 17:37:54 +01:00
Flyinghead 38765dc89a pvr: fix multipass. naomi2: constant color shading.
pvr: link multipass TA contexts. Each pass has its own.
pvr: get rid of context pool
naomi2: constant color shading. Use model diffuse and specular
selection. Don't use vtx color for offset color.
naomi2: pseudo-parallel lights fix
naomi2: pass-through TA data needs forced list type. Terminate with
end-of-list
enable RTT copy to vram for Beach Spikers
2022-01-31 20:40:09 +01:00
Flyinghead 5fb8b458bb pvr: use TA_OL_BASE instead of PARAM_BASE/TA_ISP_BASE to id TA context
Writes current TA_OL_BASE to all tiles OPB block. Read from region array
at render time to identify context.
Fixes vf4 water reflections RTT
get rid of dump_frame/read_frame
2022-01-29 18:39:38 +01:00
Flyinghead de1322b928 naomi2: Fix T&L matrix. vmem elan ram support.
Fix T&L matrix (wild riders)
Open GL support for normal/light matrix
handle elan RAM in vmem
2022-01-28 21:24:30 +01:00
Flyinghead e5d517dad2 use platform.isConsole(), platform.isNaomi(), ... 2022-01-27 17:52:19 +01:00
Flyinghead 6ed78d1202 another GL_CLIP_DISTANCE0 build fix 2022-01-26 22:37:38 +01:00
Flyinghead 270eaa1452 GL_CLIP_DISTANCE1 undefined 2022-01-26 22:19:53 +01:00
Flyinghead e1038ea632 naomi2: fix regressions. 2-volume and bump mapping support WIP
optimize open gl uniforms
2022-01-26 22:15:10 +01:00
Flyinghead 8947100701 libretro: missing new param to gl4GetProgram 2022-01-25 15:43:30 +01:00
Flyinghead cb99e7d920 naomi2: do T&L on the gpu. bypass TA format. env mapping.
fix model/instance/matrix parsing
handle culling reversed model flag
geometry shader for near plane clipping
2022-01-25 15:37:04 +01:00
Flyinghead 45ba648622 dx11: VersionHelpers.h -> versionhelpers.h
the mingw version is all lowercase
2022-01-19 14:37:49 +01:00
Flyinghead 62ec3546d6 dx11: uwp doesn't need texture conversions 2022-01-16 10:37:55 +01:00
Flyinghead 8bb0bd05f9 ui: limit scaling further on small low-resolution screens (retroid) 2022-01-16 09:58:33 +01:00
Flyinghead e538242962 dx11: convert 16-bit textures to 32 bits on windows7
1555, 4444 and 565 aren't supported on win7
Issue: https://github.com/libretro/flycast/issues/1123
2022-01-16 09:54:39 +01:00
cmitu 8dcf0f58b5 postprocess: fix GLES2-only build
Added a missing `ifndef` guard for `glBindVertexArray`, useful for GLES2-only builds.
2022-01-02 10:51:03 +01:00
Flyinghead d86305a7c3 android: on-screen gamepad not editable in Open GL
Swap wasn't called during editing
Issue #464
2021-12-26 16:03:19 +01:00