Use the actual PVR2 dithering kernel (standard 4x4 Bayer matrix) used on
real hardware.
Fixes the screen melt effect of Doom64 (per-pixel only).
Issue #1939
Modifier volumes should also be clipped when needed.
Implement outside clipping for non-OIT renderers.
OIT renderers are less affected since the shadowed polys themselves are
usually also clipped after shadow is applied.
Fixes overflowing shadows in baserunner cams in WSB 2K1.
Make sure to end the current render pass with the previous setting.
Fix initial layout of color attachments in OIT.
Fix missing initial transition after Term/Init in !OIT.
Issue #1734
The full push-constant region is 24 bytes(6 floats), but some of these push-constant writes only wrote 20 bytes of data(5 floats).
Causing 4 bytes at the end to be left undefined.
Resolved by pushing an extra zero.
* vk: Add `VK_EXT_provoking_vertex` optimization
The dreamcast uses the last vertex as the provoking vertex, while vulkan uses the first vertex.
This requires an additional call to `setFirstProvokingVertex` to reorder the vertices for all incoming geometry.
With `VK_EXT_provoking_vertex`, the pipeline can designate that the provoking vertex is to be the last vertex, which removes the need to re-order incoming geometry on the CPU.
* vk: Propagate physical device API version to VMA
Allows VMA to make assumptions such as using the `*KHR` or non-`KHR` versions of certain function names.
* vk: Refactor libretro device initialization for `VK_EXT_provoking_vertex`
* vk: Top out at vulkan API version to VMA to 1.1
Despite the physical device possibly being 1.2 or 1.3, we only want up to 1.1. Otherwise we will be responsible for other API functions being resolved and loaded when passing to VMA.
* vk: Enable `VK_EXT_provoking_vertex` usage for ModVol and Final(OIT) pipeline
* vk: Enable `VK_EXT_provoking_vertex` for ModVol(OIT) pipeline
Pretty much anything handling dreamcast-geometry should use this extension when available
* vk: Additional `VK_EXT_provoking_vertex` pipeline fixes
Use raii-like mechanism to delete resources when not in use.
Fix several issues reported by validation layers (vtennis rtt, main
buffer size resizing, ...)
SCALER_CTL.vscalefactor also applies to RTT and values > 1 will increase
the texture height.
dx11: initialize abufferPointers to avoid issues with first frame
rendered.
Fixes pause menu/battle animation with Skies of Arcadia (PAL)
Issue #1127
Interpolating between LoDs produces unexpected alpha values.
dx,vk: add negative LoD bias
Fixes "Press Start" text in Trizeal title screen
dx11: get rid of bogus nearest wrap hack
Can't reproduce original issue with daytona
Fixes Virtua Tennis title screen
Issue #1230
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
* 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
pvr: Heap use after free due to PolyParam vector reallocation
vk: fix wrong buffer size calculation
Renderer::Process now returns void since it can't fail anymore
naomi2: light model at index 0 is "no light"
dx9, gles: throw if naomi 2 not supported
Sort triangles during ta_parse. Use the same index as other polys. Store
results in rend_context.
Use primitive restart if available to avoid too many degenerate
triangles.
Update renderers.
Merging polygons in per-triangle can produces a large number of
degenerate triangles (up to x3), which must then be sorted, resulting in
a performance hit. This is useless since the sorted triangles are merged
after being sorted. (Regression introduced by
20d25059bf)
Issue #818
In per-strip mode, polygons are now sorted before creating the index and
merging. So it doesn't have to be done in the renderer anymore.
Fixes Unreal Tournament flashing/black screen.
gl: mark vram area in rtt to avoid overwriting data (Worms World Party)
Force Worms World Party to use CopyToVRam (regression due to
6a5db32d5d)
Don't calculate precise aspect ratio and use 4/3 instead (or more if
widescreen or stretch).
Fix clipping issue when using SCALER_CTL.vscalefactor. Avoir crash when
clip values are >= width or height.
vulkan: RenderFramebuffer wasn't working at all if !EmulateFramebuffer
copy TA_GLOB_TILE_CLIP and SCALER_CTL to rend context when starting
render. Use rend context copy to calculate framebuffer size.
Fixes framebuffer size glitches in vf4 water stages.
lr: pass aspect ratio when resizing.
dx11: Wrong sizing of rotated games.
gl: test automation fixes.
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
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.
Use w=1 to avoid multiply/divide of xy as in dx9
Disable rendering when video output disabled
Use original w value in pixel struct to avoid precision loss (samsptk)
vk oit: missing memory barrier was producing Tr modvol glitches (JSR)
gl oit: Tr modvol needs full vertex shader