Commit Graph

49 Commits

Author SHA1 Message Date
Matt Borgerson 0c2a617819 nv2a: Bump vmstate version for new NV2A_MAX_BATCH_LENGTH 2025-04-18 11:58:22 -07:00
Matt Borgerson 0e50741c28 ui,xbox: Copyright updates on changed files 2025-01-06 23:06:21 -07:00
Matt Borgerson 9327159f7c nv2a: Use Resettable interface 2025-01-06 23:05:53 -07:00
Matt Borgerson 3106ea97e5 mcpx: Use new bql_[un]lock functions 2025-01-06 23:05:53 -07:00
Matt Borgerson 5cb65d1791 nv2a: Migrate nv2a_get_offsets to new _get_params model 2025-01-06 23:05:53 -07:00
Matt Borgerson 27531ec1ca nv2a: Wrap nv2a_vm_state_change direct renderer calls 2024-12-31 01:37:05 -07:00
Matt Borgerson a5385803db nv2a: Add Vulkan renderer 2024-12-31 01:37:05 -07:00
Matt Borgerson 5c495db618 nv2a: Add [last_]surface_shape.clip_y to vmstate 2023-07-27 22:09:02 -07:00
Matt Borgerson 381ac7e72c nv2a: Pass error_fatal to vga_common_init 2023-01-23 00:30:40 -07:00
Matt Borgerson b135dd14ea nv2a, mcpx: Drop minimum_version_id_old from vmsd 2023-01-23 00:30:40 -07:00
Antonio Abbatangelo 080022833d nv2a: Cache shaders to disk 2022-09-10 12:52:51 -07:00
Erik Abair a675666051 nv2a: Handle SIZE_IN > SIZE_OUT case
`NV_PVIDEO_SIZE_IN` is set to 0xFFFFFFFF during initialization and teardown
of the PVIDEO overlay. In some cases this can happen before the overlay is
explicitly stopped, leading to an assert. On hardware SIZE_IN values larger
than SIZE_OUT are capped (content is not scaled).

Fixes #330

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/pvideo_tests.cpp)
2022-07-18 10:59:08 -07:00
Erik Abair 9d2d8691b5 nv2a: Implement NV097_LAUNCH_TRANSFORM_PROGRAM 2022-06-24 20:41:04 -07:00
Matt Borgerson d8723e047b nv2a: Store primitive mode in vmstate 2022-06-15 17:30:05 -07:00
Erik Abair 88409a92bf
nv2a: Fix intermixed use of DRAW_ARRAYS and ARRAY_ELEMENTx
Co-authored-by: Matt Borgerson <contact@mborgerson.com>
2022-06-15 13:13:51 -07:00
Erik Abair 5cb31da44b nv2a: Increase DrawArrays buffer size
Fixes #364
2022-06-09 22:28:28 -07:00
Antonio Abbatangelo 2218cdea67 nv2a/mcpx: fix freezing on loadvm failure 2022-02-22 14:40:26 -07:00
Matt Borgerson be23a674f3 nv2a: Start using tracing infrastructure for logging 2022-02-01 23:34:53 -07:00
Matt Borgerson 3fd15218c7 nv2a: Init puserdac palette on startup 2022-01-12 19:51:14 -07:00
Matt Borgerson 42c44dc241 nv2a: Fix register print debug macro 2022-01-12 19:51:14 -07:00
Matt Borgerson 27afd42164 nv2a: Add puserdac.palette to vmstate 2022-01-12 01:53:12 -07:00
haxar 25b8fa8433 nv2a: Refactor VGA init 2022-01-07 16:19:30 -07:00
wutno 8f529d0d9c nv2a: Set frequency to 233MHz 2021-12-28 17:40:50 -07:00
Erik Abair 41ef1ca5e5
nv2a: Add option to suppress irq and dma_map debug messages 2021-12-28 17:39:36 -07:00
Matt Borgerson c31cbf9f4e nv2a: Writeback dirty surfaces on scale change, VM load 2021-07-26 15:03:52 -07:00
Matt Borgerson b97b053282 nv2a: Use bool type for state change callback running parameter 2021-04-18 23:41:28 -07:00
Matt Borgerson 6e564854fc xemu: Update copyright 2021-03-03 03:48:11 -07:00
Matt Borgerson 7dae26380e nv2a: Stall pusher for pending sync events 2021-03-03 03:41:20 -07:00
Matt Borgerson 48c1720da8 nv2a: Support PVIDEO overlays again 2021-03-01 18:40:30 -07:00
Matt Borgerson 2933d8d171 nv2a: Set VGA color mode after reset 2020-12-02 23:03:51 -07:00
Matt Borgerson 0433c5e6bc nv2a: Simulate PCRTC_RASTER register 2020-10-25 19:52:57 -07:00
Matt Borgerson d6e52a02c4 nv2a: Lazily synchronize surface data to/from RAM 2020-10-22 21:29:53 -07:00
Matt Borgerson c69e58ee0f nv2a: Make files individually compilable 2020-10-18 00:55:08 -07:00
Matt Borgerson 60d3dc8ae1 nv2a: Add VMStateDescription 2020-06-19 05:43:14 -07:00
Matt Borgerson f898b5e875 nv2a: Rename PCIDevice dev to parent_obj per QEMU convention 2020-06-19 05:43:14 -07:00
Matt Borgerson ec4e798426 nv2a: Merge pfifo pusher/puller threads 2020-06-12 00:06:06 -07:00
Matt Borgerson f93c7b4ea3 nv2a: Fix device reset 2020-05-31 14:26:15 -07:00
Jannik Vogel 2dc570561e nv2a: Fix VGA get_bpp for X1R5G5B5 2019-10-01 12:48:45 -07:00
Stas'M dd1248a563 nv2a: Set PCI class id and subsystem id to match hardware
This patch sets the class id, subsystem id, and subsystem vendor id
in the PCI device header to match what the NV2A hardware advertises.

This resolves an issue with PCI device enumeration failing to detect and load
the driver for the NV2A device in some operating systems, namely ReactOS
version 0.2.5-xbox (custom build), which depend on these fields being
programmed correctly.
2019-08-28 13:55:21 -07:00
espes e12aa122cf relicense xbox components as LGPL
(with permission)
2018-10-10 13:38:16 +10:00
Stefan Schmidt 1c6bb37bec Replace ffs() calls with ctz32() 2018-10-08 11:34:23 -07:00
espes 3d33d8101b cleanup nv2a 2018-09-26 17:42:41 +08:00
Matt 316967c441 nv2a FIFO Refactoring (#76)
* Port espes's fifo work to the split up nv2a code

This patch ports over the following commits from the XQEMU 1.x tree
(available via tag archive-xqemu-1.x) to the refactored nv2a code:

- 4d9107e8 (HEAD -> xbox, upstream/xbox) Merge branch 'fix-fifo' into xbox
- c33f4ab2 cleanups
- d3f83d93 cleanups
- faca5dd0 fix
- 7c62d7c1 fixes
- 8ad239b0 wip
- 45ed3c31 wip
- c006d5e8 wip

However, in its current form, this patch causes some regressions and
needs further investigation.

* nv2a: basic pattern object
2018-09-26 16:10:07 +08:00
Matt Borgerson 12401cd500 nv2a: remove global_vmstate arg in vga_common_init 2018-09-02 13:49:24 -07:00
Matt Borgerson f169ce4c26 nv2a: Move some defs to nv2a.h and fix minor nits 2018-07-25 02:03:30 +02:00
Matt Borgerson f0ea80b4bd nv2a: Use a macro to define the nv2a stub handlers 2018-07-25 02:03:30 +02:00
Matt Borgerson 7e7f837bad nv2a: Remove STUB stuff from nv2a.c 2018-07-25 02:03:30 +02:00
Matt Borgerson 0523deaa93 nv2a: Recycle FIFO command queue memory
This patch adds an additional "retired" queue in which FIFO command
entry objects are placed after execution. This queue of objects is then
returned to the pusher's new "available" queue for re-use.

This improves the performance of the system by avoiding the costly
overhead associated with the general-purpose use of `malloc` and `free`
for previous allocation of FIFO command queue objects.
2018-06-28 10:17:57 -07:00
Matt Borgerson 584dbda1d6 Fix and refactor NV2A code
This patch does the following:
- Fixes up things for Qemu 2.x compat
- Factors out the high-level NV2A blocks into separate files
- Updates g-lru-cache for latest glib compat (github.com/chergert/glrucache@c10af24)
- Changes texture hashing algorithm from FNV to xxH v0.6.5
2018-06-26 17:07:41 -07:00