Commit Graph

174 Commits

Author SHA1 Message Date
Matt Borgerson 8d5961ab8f nv2a: Avoid shader lookups+binds 2021-03-12 04:45:53 -07:00
Matt Borgerson 2dbf966a50 nv2a: Include attribute data address in LRU key 2021-03-11 04:51:36 -07:00
Matt Borgerson fcb3246d4f nv2a: Connect draw arrays primitives originally within BEGIN/END 2021-03-11 03:07:52 -07:00
Matt Borgerson 2483bc59aa Revert "nv2a: Don't attempt to connect primitives in arrays"
This reverts commit 33f8d3c88c.
2021-03-11 03:07:52 -07:00
Matt Borgerson 5756a8892c nv2a: Squash repeated draw arrays 2021-03-11 02:06:35 -07:00
Matt Borgerson 33f8d3c88c nv2a: Don't attempt to connect primitives in arrays 2021-03-11 02:06:35 -07:00
Matt Borgerson 48ccf72e55 nv2a: Consider element range start in buffer uploads 2021-03-11 01:25:45 -07:00
Matt Borgerson 9ab3dcbd6c nv2a: Update VSH constants only if different 2021-03-11 01:10:36 -07:00
Matt Borgerson 851407e07c nv2a/vsh: Output muxed op first to avoid temp clobber 2021-03-06 19:06:47 -07:00
Matt Borgerson 105f86d973 nv2a: Factor Kelvin methods into functions 2021-03-06 01:45:40 -07:00
Matt Borgerson 9d545d17e7 nv2a: Relax stall conditions on pusher 2021-03-04 20:45:58 -07:00
Camden Smallwood 10863d1c0d nv2a: Use GL_ELEMENT_ARRAY_BUFFER when calling glDrawElements 2021-03-04 17:53:08 -07:00
Matt Borgerson fc73893f3c nv2a: Fix clip range scaling precision loss 2021-03-03 18:10:49 -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 f2bfa672e6 nv2a: Specify GL_STREAM/STATIC_DRAW buffer usages 2021-02-27 15:17:17 -07:00
Matt Borgerson 0d9ff0872a nv2a: Swap glDrawRangeElements for glDrawElements 2021-02-27 15:17:17 -07:00
Matt Borgerson f89dc5c446 nv2a: Add surface download complete event 2021-02-18 21:17:30 -07:00
Matt Borgerson 7b84142c4e nv2a: Add fb sync complete event 2021-02-18 02:48:25 -07:00
Matt Borgerson 8326870f77 nv2a: Eliminate re-malloc of inline buffer 2021-02-12 18:55:06 -07:00
Matt Borgerson b536ac07d6 nv2a: Fix surface debug print field 2021-02-11 16:45:36 -07:00
Matt Borgerson 7926347c8b nv2a: Fix buffer size in surface flip 2021-02-11 16:33:47 -07:00
Matt Borgerson afed1a4835 nv2a: Clear entire PSH struct before hashing 2021-02-11 16:10:34 -07:00
Matt Borgerson a88b4cf9f5 nv2a: Minor cleanup 2021-02-11 16:10:34 -07:00
Matt Borgerson 3248c8ebbf nv2a: Fast path PGRAPH method processing 2021-02-11 15:23:47 -07:00
Matt Borgerson 8e29469ddb nv2a: Cache converted vertex data 2021-02-11 14:54:39 -07:00
Matt Borgerson 9b42f4aaa3 nv2a: Add binning to LRU 2021-02-11 14:30:52 -07:00
Matt Borgerson d2990d0e47 nv2a: Use XXH3_64bits as fast hash 2021-02-11 14:09:52 -07:00
Matt Borgerson fec0ad6f4c nv2a: Add xxHash submodule 2021-02-11 14:09:52 -07:00
Matt Borgerson 30fe6cb3c4 nv2a: Drop xxHash inline sources 2021-02-11 14:09:52 -07:00
Matt Borgerson 7a08e93085 nv2a: Add simple frame metrics 2021-02-11 13:50:18 -07:00
wutno 9ca79f75d8 nv2a: Change stepping to match retail 1.0 Xbox 2021-01-23 16:52:57 -07:00
Matt Borgerson 996f3d4dc3 nv2a: Grab lock before marking pending download 2020-12-30 03:52:46 -07:00
Matt Borgerson e431cbff82 nv2a: Fix compiler nits 2020-12-30 03:51:47 -07:00
Matt Borgerson af35a8b728 nv2a: Approximate CLAMP_OGL with CLAMP_TO_EDGE 2020-12-07 19:25:48 -07:00
Matt Borgerson 2933d8d171 nv2a: Set VGA color mode after reset 2020-12-02 23:03:51 -07:00
Matt Borgerson 0bec22318a nv2a: Add Gaussian convolution filter for AA 2020-12-02 16:49:58 -07:00
Matt Borgerson a34cab69dd nv2a: Support line and poly anti-aliasing 2020-12-01 22:36:09 -07:00
Matt Borgerson 59980ba1c7 nv2a: Refactor BUMPENVMAP[_LUM] 2020-11-14 16:30:59 -07:00
Matt Borgerson 183ed86aa6 nv2a: Fix color swizzle for SZ_G8B8 and SZ_R8B8 2020-11-14 16:30:59 -07:00
Wilhelm Kovatch ff3deacae6 nv2a: Fix BUMPENVMAP[_LUM] texture modes 2020-11-14 16:27:12 -07:00
Wilhelm Kovatch 5aa0cec31b nv2a: Support 3D texture decompression in software 2020-11-01 17:55:14 -07:00
Matt Borgerson 5cc4568dfe nv2a: Force surface flush for mipmapped textures 2020-10-28 22:03:56 -07:00
Matt Borgerson 0c2368f37d nv2a: Fix broken dot texture modes 2020-10-28 22:03:56 -07:00
Matt Borgerson 3c6596975d nv2a: Implement dot texture modes and dotmapping 2020-10-28 15:59:20 -07:00
Matt Borgerson 9060302670 nv2a: Add GL error guard for glCompressedTexImage3D
This only works with DXT1/S3TC if the implementation has the
NV_texture_compression_vtc extension, otherwise GL_INVALID_ENUM will be
raised. Bail out in this case, until a software fallback is implemented.
2020-10-28 04:40:11 -07:00
Wilhelm Kovatch b9df397493 nv2a: Fix compressed 3D textures 2020-10-26 21:43:12 -07:00
Wilhelm Kovatch 518c9f38cd nv2a: Add support for compressed 3D textures 2020-10-26 19:49:47 -07:00
Matt Borgerson 6f777e73e6 nv2a: Add B8, G8B8 surface format placeholders 2020-10-26 00:20:48 -07:00
Matt Borgerson 0433c5e6bc nv2a: Simulate PCRTC_RASTER register 2020-10-25 19:52:57 -07:00
Matt Borgerson 23096561a3 nv2a: Check for same zeta/color surface offset 2020-10-25 03:39:58 -07:00
Matt Borgerson 4cd7c98025 nv2a: Unbind surfaces when flushing 2020-10-23 14:33:45 -07:00
Dalai 6936945afa nv2a: Support texture format COLOR_LU_IMAGE_DEPTH_Y16_FLOAT 2020-10-23 13:38:57 -07:00
Matt Borgerson d6e52a02c4 nv2a: Lazily synchronize surface data to/from RAM 2020-10-22 21:29:53 -07:00
Matt Borgerson 6a2f6b3637 nv2a: Download surface before blit 2020-10-18 01:37:19 -07:00
Matt Borgerson 79989a0e3f nv2a: Always use texture cache 2020-10-18 01:16:32 -07:00
Matt Borgerson a3fc742bbe nv2a: Remove nv2a_ prefix on files in nv2a dir 2020-10-18 00:55:08 -07:00
Matt Borgerson c69e58ee0f nv2a: Make files individually compilable 2020-10-18 00:55:08 -07:00
Matt Borgerson fcd3764cce nv2a: Handle color material ambient/emissive 2020-09-06 20:42:21 -07:00
Matt Borgerson bb0fdef251 nv2a: Handle alignment padding between cubemap faces 2020-09-05 16:21:21 -07:00
Voxel9 c90335801c nv2a: Fix FFP texgen assertions
Should compare against channel index instead of texture stage index
2020-06-29 07:49:51 -07:00
Voxel9 3bbea5269e nv2a: Remove TEXGEN_SPHERE_MAP assertion 2020-06-29 07:49:51 -07:00
Matt Borgerson 60d3dc8ae1 nv2a: Add VMStateDescription 2020-06-19 05:43:14 -07:00
Matt Borgerson c9cf9a9972 nv2a: Add state flushing to PGRAPH 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 f2869790d9 nv2a: Check for PGRAPH FIFO access before context switch 2020-06-17 01:14:43 -07:00
Matt Borgerson ec4e798426 nv2a: Merge pfifo pusher/puller threads 2020-06-12 00:06:06 -07:00
Matt Borgerson c9df1d1047 nv2a: Replace some non-critical assertions with debug macros
In the event these features are utilized, execution may still continue,
albeit with the likely possibility graphical problems of varying degree.
This patch replaces hard assertions with debug print statements when
configured to do so.
2020-06-10 19:04:22 -07:00
Matt Borgerson f93c7b4ea3 nv2a: Fix device reset 2020-05-31 14:26:15 -07:00
Matt Borgerson 7e67f18595 ui: Cleanup debug messages 2020-05-22 14:57:58 -07:00
Matt Borgerson c2b74a08d3 ui: Move QEMU main loop to a thread 2020-05-04 07:22:56 -07:00
Matt Borgerson 0245d3bee9 nv2a: Update Makefile offscreen GL sources 2020-05-04 07:15:29 -07:00
Matt Borgerson 2d364b5bd1 nv2a: Add SDL-based offscreen GL context interface 2020-05-04 07:13:16 -07:00
Matt Borgerson 2199dbc4e9 nv2a: Remove platform-specific GL context management 2020-05-04 07:10:26 -07:00
Stanislav Motylkov c230d77bc2 nv2a: Add some missing RAMDAC registers
Cromwell sets these registers on video initialization and
guest OS should be able to read them in order to obtain
current screen resolution set up by firmware.
2019-10-18 21:30:16 +01:00
Jannik Vogel 2dc570561e nv2a: Fix VGA get_bpp for X1R5G5B5 2019-10-01 12:48:45 -07:00
Jannik Vogel f9b9a9bad8 nv2a: Add support for PGRAPH RDI select 0xCC 2019-09-16 12:15:25 -07:00
Jannik Vogel e42fb24752 nv2a: Add support for PGRAPH RDI select 0x17 2019-09-16 12:15:25 -07:00
Jannik Vogel 973f8db16a nv2a: Support PGRAPH RDI 2019-09-16 12:15:25 -07:00
Jannik Vogel 5ccd95ec4b nv2a: Use `pg` shortname in PGRAPH MMIO handler 2019-09-16 12:15:25 -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
Jannik Vogel 1026f0e42f vsh: Minor improvements to individually weighted skinning 2019-02-24 17:05:50 -07:00
Jannik Vogel c331854c55 vsh: Support generated weights in skinning 2019-02-24 17:05:50 -07:00
Jannik Vogel f3b7fefde4 vsh: Fix skinning mode order 2019-02-24 17:05:50 -07:00
Jannik Vogel 0f39a2cc76 nv2a: Slot 0 of SET_VERTEX_DATA specifies a vertex 2019-02-22 17:02:44 -07:00
Jannik Vogel 851e478319 psh: Separate input component usage selection for RGB and ALPHA portion 2019-02-18 11:43:20 -07:00
Jannik Vogel f9ba5b9c8c psh: Final combiner G input is a scalar 2019-02-18 11:43:20 -07:00
Jannik Vogel 52f897aa17 psh: Use vec4 for all registers 2019-02-18 11:43:20 -07:00
Jannik Vogel d225ff7a98 psh: Use float for alpha, vec3 for rgb 2019-02-18 11:43:20 -07:00
Jannik Vogel f21c2d7ddb psh: Use output clamping from NV_register_combiners GL extension 2019-02-16 12:43:08 -07:00
Jannik Vogel c1494de8d3 psh: Use input mapping from NV_register_combiners GL extension 2019-02-16 12:42:49 -07:00
Stefan Schmidt 960698a24e nv2a: Set content of disabled register combiner stages to zero 2019-02-06 23:32:22 -07:00
Jannik Vogel f3d7e72a5c nv2a: Fix A8Y8 texture formats 2019-02-06 23:28:43 -07:00
Matt Borgerson 7a59bf14d3 nv2a: Use linear addressing for LU_IMAGE_A4R4G4B4 2019-02-06 20:05:12 +01:00
Matt Borgerson 47452495c0 nv2a: Fix NV097_SET_VERTEX_DATA2S scaling
Vertex attribute values provided via NV097_SET_VERTEX_DATA2S are
apparently two 16-bit signed integers, packed into 32 bits, which are
then to be directly mapped to floating point values in the range
[-32768.0, 32767.0].

Halo:CE uses this format to provide texture (u,v) coordinates for
render-to-texture techniques, including weapon scope, dynamic shadows,
and radar beacon--all of which are now working as expected with this
patch.
2019-01-22 16:12:11 -07:00
Matt Borgerson 02f3b701d0 nv2a: Replace texture cache with a simpler implementation 2018-12-13 11:42:14 -07:00
Jannik Vogel 910dadc5ab nv2a: Fix window-clip region off-by-one error 2018-11-08 12:00:12 -07:00
Jannik Vogel e3d0803843 nv2a: Force GL surface transfer on surface address or pitch changes 2018-11-06 12:05:15 -07:00
Jannik Vogel 781a73e118 nv2a: Debug log GL surface transfers in GL 2018-11-06 12:05:15 -07:00