Commit Graph

118913 Commits

Author SHA1 Message Date
Erik Abair c8ceb6a4ed nv2a: Log gl errors to stderr 2025-03-28 07:18:58 -07:00
Erik Abair 49edc43439 Revert 5f14ee4a68 for CLion. 2025-03-28 07:18:58 -07:00
Erik Abair 034bf50f84 Adds memory search commands (reviving work from Claudio Fontana in 2015). 2025-03-28 07:18:58 -07:00
Erik Abair 672e9cd553 nv2a: Handle SET_SPECULAR_ENABLE 2025-03-28 02:18:42 -07:00
Matt Borgerson 48d1195c27 ci: Drop lint action for now 2025-03-28 02:17:39 -07:00
Matt Borgerson 1586b40b11 ci: Bump Windows build container 2025-03-27 23:52:03 -07:00
Matt Borgerson 312bd94573 mcpx: Move voice_list_regs to apu.c 2025-03-27 23:33:40 -07:00
Matt Borgerson 2d73e8aafe nv2a: Use root-relative paths to reference parent dir headers 2025-03-27 23:33:40 -07:00
Matt Borgerson 0e18d11d90 nv2a: Rename methods.h -> methods.h.inc 2025-03-27 23:33:40 -07:00
Matt Borgerson a830cc4526 xbox: Disable clang-format for deliberately aligned reg defs 2025-03-27 23:33:40 -07:00
Matt Borgerson 0fe76b531f .gitignore: Unignore .clang-format 2025-03-27 23:33:40 -07:00
Matt Borgerson d6a285e173 ci: Migrate lint to build.yml 2025-03-27 23:33:40 -07:00
antangelo 68b3683f77
ci: Add clang-format lint check
Co-authored-by: Matt Borgerson <contact@mborgerson.com>
2025-03-27 18:35:52 -07:00
Matt Borgerson 0d06ce8603 meson: Bump glslang 2025-03-27 17:25:59 -07:00
Matt Borgerson cc857adb6c meson: Bump SPIRV-Reflect 2025-03-27 17:25:59 -07:00
Matt Borgerson 9764c90b21 ubuntu-win64-cross: Bump mxe/build-win64-mxe 2025-03-27 17:25:59 -07:00
Matt Borgerson ee5c556ae9 ubuntu-win64-cross: Bump Vulkan headers 2025-03-27 17:25:59 -07:00
Matt Borgerson 48c454e1b6 ci: Add 'ci: ' prefix for dependabot updates 2025-03-27 17:25:59 -07:00
dependabot[bot] a6fbb4957b
ci: bump peaceiris/actions-gh-pages from 3.9.3 to 4.0.0
Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3.9.3 to 4.0.0.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](373f7f263a...4f9cc6602d)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 17:25:32 -07:00
dependabot[bot] 5eeee7cd5c
ci: bump docker/build-push-action from 5.4.0 to 6.15.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.4.0 to 6.15.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](ca052bb54a...471d1dc4e0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 17:23:35 -07:00
dependabot[bot] 56d643ff26
ci: bump softprops/action-gh-release from 1 to 2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](de2c0eb89a...c95fe14893)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 17:23:09 -07:00
dependabot[bot] ce7e228afa
ci: bump actions/setup-python from 5.1.0 to 5.5.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.0 to 5.5.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.1.0...v5.5.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 17:02:50 -07:00
dependabot[bot] 8a2bd21bcb
ci: bump benc-uk/workflow-dispatch from 1.2.2 to 1.2.4
Bumps [benc-uk/workflow-dispatch](https://github.com/benc-uk/workflow-dispatch) from 1.2.2 to 1.2.4.
- [Release notes](https://github.com/benc-uk/workflow-dispatch/releases)
- [Commits](798e70c970...e2e5e9a103)

---
updated-dependencies:
- dependency-name: benc-uk/workflow-dispatch
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 17:02:14 -07:00
Matt Borgerson 9cf1483cd3 ci: Add dependabot config for GH actions update 2025-03-27 16:21:44 -07:00
Matt Borgerson bdea219236 ci: Pin actions to commit hash 2025-03-27 16:21:44 -07:00
Matt Borgerson 9e58abc951 ci: Drop macOS ninja install to stop 'already installed' warning 2025-03-22 15:26:12 -07:00
Matt Borgerson 708445a8dd scripts/download-macos-libs.py: Patch out epoxy.pc Requires.private 2025-03-22 15:26:12 -07:00
Matt Borgerson 1eced78a07 meson: Migrate epoxy probe to meson.build 2025-03-22 15:26:12 -07:00
Matt Borgerson 1893b56c38 nv2a/vk: Fix vertex ram buffer dirty bit check 2025-03-19 02:25:33 -07:00
Matt Borgerson d2bf1c21ee debian: Add python3-venv build dep 2025-03-17 15:05:42 -07:00
Matt Borgerson b929d4eced nv2a: Drop surface compat clip constraint 2025-03-17 14:48:47 -07:00
Matt Borgerson c3a8b9569f nv2a: Simplify surface clip to scissor size calculation 2025-03-17 14:48:47 -07:00
Logan Stromberg 860bccb722
nv2a: Fix surface clip to scissor origin 2025-03-17 14:32:40 -07:00
Matt Borgerson b455d58227 build.sh: Bump macOS on arm64 to 13.7.4 2025-03-17 13:41:55 -07:00
Matt Borgerson 6877015941 scripts/download-macos-libs.py: Bump arm64 to macOS 13.x (darwin 22) 2025-03-17 13:41:55 -07:00
Matt Borgerson c782b1e8ed scripts/download-macos-libs.py: Set mirror to main packages.macports.org 2025-03-17 13:41:55 -07:00
coldhex 02659dd3cc nv2a: Fix cubemap fourth texture coordinate component handling
Xbox hardware ignores fourth texture coordinate component for cubemaps.
2025-03-17 11:37:41 -07:00
wilkovatch a00820746f
nv2a: Handle texture dimensions not divisible by 4 in S3TC decoder 2025-03-14 18:44:25 -07:00
Matt Borgerson fac9ae83c7 scripts/xemu-version.sh: Use 0.0.0 if version cannot be detected 2025-03-13 15:10:32 -07:00
Matt Borgerson a143f66ce4 nv2a/psh: Handle 3D textures in PROJECT2D mode 2025-03-10 16:13:09 -07:00
Matt Borgerson 6e3dfb36d8 nv2a/vk: Don't set compressed, swizzled when attribute is uniform 2025-03-10 14:23:43 -07:00
Matt Borgerson 4665515d80 nv2a: Group attributes in pgraph_get_glsl_vtx_header 2025-03-10 12:30:16 -07:00
Alexandre Bouvier dfbf4dfd36
meson: Drop glslang dependency method param for CMake search 2025-03-08 15:14:58 -07:00
coldhex 3eb22b6b81 nv2a: Explicit float representation for RCC and vertex shader W range 2025-03-08 14:54:18 -07:00
coldhex 63cb75ce84 nv2a: Fix -0.0 clamping of RCC instruction and vertex shader W-output
Xbox rounds -0.0 to the negative range and 0.0 to the positive range. This
commit also restores RCC instruction clamping to be done on the output of
reciprocal calculation (which current Xemu release does) with fix for the
input=Infinity case.
2025-03-08 14:54:18 -07:00
coldhex 8dc6c90e11 nv2a/vk: Drop unnecessary dirty check for NV_PGRAPH_ZCOMPRESSOCCLUDE
This was used to enable/disable Vulkan depth clamping, but that was
removed in previous commit.
2025-03-08 14:54:18 -07:00
coldhex 854a001063 nv2a: Fix zero-vector input in fixed function vertex shader
If tPosition is a zero-vector, then invViewport matrix had no effect.
Bounding w-coordinate away from zero and infinity must be done before
applying invViewport (which is needed for OpenGL/Vulkan) to emulate
Xbox hardware behaviour properly.
2025-03-08 14:54:18 -07:00
coldhex 798ad30819 nv2a: Perspective-correct interpolation for w-buffering
z_perspective is true implies w-buffering and then the w-coordinate stored
in the depth buffer should also be interpolated in a perspective-correct
way. We do this by calculating w and setting gl_FragDepth in the fragment
shader.

Since enabling polygon offset and setting values using glPolygonOffset
won't have any effect when manually setting gl_FragDepth for w-buffering,
we introduce the depthOffset variable to obtain similar behaviour (but the
glPolygonOffset factor-argument is currently not emulated.) (Note that
glPolygonOffset is OpenGL implementation-dependent and it might be good to
use depthOffset for z-buffering as well, but this is not done here and we
still use OpenGL/Vulkan zbias functionality.)

This also implements depth clipping and clamping in the fragment shader.
If triangles are clipped, the shadows of the small rocks in Halo 2 Beaver
Creek map can have flickering horizontal lines. The shadows are drawn on
the ground in another pass with the same models as for the ground, but for
some reason with depth clamping enabled. The flickering happens if Xemu
clips the ground triangles, but the exact same shadow triangles are depth
clamped, so there are small differences in the coordinates. The shadows
are drawn with depth function GL_EQUAL so there is no tolerance for any
differences. Clipping in the fragment shader solves the problem because
the ground and shadow triangles remain exactly the same regardless of
depth clipping/clamping. For some performance gain, it might be a good
idea to cull triangles by depth in the geometry shader, but this is not
implemented here.

In the programmable vertex shader we always multiply position output by w
because this improves numerical stability in subsequent floating point
computations by modern GPUs. This usually means that the perspective
divide done by the vertex program gets undone.

The magic bounding constants 5.42101e-020 and 1.884467e+019 are replaced
by 5.421011e-20 and 1.8446744e19, i.e. more decimals added. This makes the
32-bit floating point numbers represent exactly 2^(-64) and 2^64 (raw bits
0x1f800000 and 0x5f800000) which seem more likely the correct values
although testing with hardware was not done to this precision.

Testing indicates that the same RCC instruction magic constants are also
applied to both fixed function and programmable vertex shader w-coordinate
output. This bounding replaces the special test for w==0.0 and abs(w)==inf
which used to set vtx_inv_w=1.0 (which did not match Xbox hardware
behaviour.)
2025-03-08 14:54:18 -07:00
Matt Borgerson 45078ef51f ui: InputTextMultiline buf_size should include the null-terminator 2025-03-08 04:00:18 -07:00
Matt Borgerson 355228913c meson: Update imgui,implot 2025-03-08 04:00:18 -07:00