Commit Graph

2309 Commits

Author SHA1 Message Date
Ben Vanik ce70978ef6 Starting to split up alloy/core.h. 2014-07-14 19:18:42 -07:00
Ben Vanik e9284dfaed More C++11ification. 2014-07-13 22:28:00 -07:00
Ben Vanik bf882714d0 Cleaning up asserts and file/line macros. 2014-07-12 16:51:52 -07:00
Ben Vanik 1d54342930 Starting to cleanup includes a bit. Still a mess. 2014-07-11 18:03:35 -07:00
Ben Vanik eb7987a634 Setting default output values for pixel shaders. 2014-07-08 16:02:42 -07:00
Ben Vanik 824d3c246f Prevent null/broken shaders from dying in d3dcompiler. 2014-07-03 12:58:56 -07:00
Ben Vanik d5f27dbf34 Better arg passing for Execute and experimenting with APCs. 2014-07-02 15:39:49 -07:00
Ben Vanik 71eb408d67 Various fiddlings. 2014-06-22 19:41:26 -07:00
Ben Vanik 7936fa2dbd Fix constants in pixel shaders. 2014-06-20 20:44:39 -07:00
Ben Vanik 3845437276 Fix assert to allow 16 fetchers. 2014-06-10 21:06:36 -07:00
Ben Vanik 6e76c169d6 Proper(ish) VdSwap - fixes a bunch of things.
Caching is working a bit better, now.
2014-06-08 21:24:29 -07:00
Ben Vanik 8337820500 Fiddling with interrupt triggering - still not right. 2014-06-08 11:59:57 -07:00
Ben Vanik daa8a24173 Caching states. 2014-06-08 11:51:53 -07:00
Ben Vanik 6514eaa780 Disabling paged resource caching for now, as it's broken. 2014-06-08 11:25:10 -07:00
Ben Vanik 295910c3d8 Initial refactoring of gpu/.
Runs too fast - now there are ringbuffer wrapping issues.
2014-06-08 11:23:55 -07:00
Ben Vanik 4072640a64 Skeleton of new shared GPU files. 2014-06-02 19:24:33 -07:00
Ben Vanik 0e3854555d Pure dynamic MMIO access. Prep for more complex GPU memory management. 2014-06-01 23:36:18 -07:00
Ben Vanik 3a8065b7b1 Vertex buffer caching.
Doesn't help, though, as buffers are weird. Need to rethink all of this.
2014-06-01 09:42:07 -07:00
Ben Vanik 2d173ea62b Caching index buffers. 2014-05-31 22:26:39 -07:00
Ben Vanik 19c48c7a90 Partial texture cache - doesn't invalidate yet. 2014-05-31 17:38:32 -07:00
Ben Vanik 529a1478d8 Sampler state caching. 2014-05-31 16:34:05 -07:00
Ben Vanik 6607606b15 Moving texture code into shared/separate files. Leaking a lot. 2014-05-31 15:42:21 -07:00
Ben Vanik e45fc3dc56 Reducing profiling forced swap frequency. 2014-05-31 08:13:13 -07:00
Ben Vanik 6c92e6a5c5 Increasing microprofile stack size, as some of these trees are deep. 2014-05-30 11:44:24 -07:00
Ben Vanik 0267efa5cc Always swapping the graphics system so that we see the profiler update. 2014-05-30 06:50:07 -07:00
Ben Vanik 997f582d1f Removing useless counters. 2014-05-28 20:32:50 -07:00
Ben Vanik c06526e5df Backpatch function addresses. 2014-05-28 20:02:40 -07:00
Ben Vanik c1812406f5 Adding a bunch of profiling tracers. 2014-05-28 19:19:39 -07:00
Ben Vanik beb9bd11f0 Microprofile integration. 2014-05-28 13:59:43 -07:00
Ben Vanik ee69696485 Hiding some D3D11 log spew. 2014-02-06 22:18:44 -08:00
Ben Vanik b1ab2fb0a7 That was a terrible idea. Let us never speak of it again. 2014-02-01 00:41:36 -08:00
Ben Vanik 10c9537836 Swapping register values. 2014-02-01 00:05:21 -08:00
gibbed 93d61d02d7 Note about DXGI_FORMAT_B4G4R4A4_UNORM being Windows 8 only. 2014-01-25 06:15:02 -08:00
gibbed b6c831c7ec Wait for graphics driver to complete initialization before continuing. 2014-01-24 23:00:05 -08:00
gibbed 764d0b89f5 Fixed fetching of non-tiled textures that don't have a pitch that is a multiple of 256 bytes. 2014-01-24 11:09:38 -08:00
gibbed 3a7aaadbd8 TextureSwap now swaps XE_GPU_ENDIAN_8IN32. 2014-01-24 00:06:10 -08:00
Ben Vanik dfbbefa97f Asserting byte swapped vbs. 2014-01-23 23:58:23 -08:00
gibbed 61093245a5 Gah. 2014-01-22 09:47:43 -08:00
gibbed 4aeb978d89 FMT_1_5_5_5. 2014-01-22 09:45:57 -08:00
gibbed 4b70b578fd Removed hack from XE_GPU_ENDIAN_8IN16. 2014-01-22 09:45:33 -08:00
gibbed 302111afbf Fixed writing of too much data. 2014-01-21 19:09:07 -08:00
gibbed 1091c171b2 Maybe this will work? 2014-01-21 18:53:35 -08:00
gibbed a9dfe13799 Further improvements to FetchTexture2D. 2014-01-21 18:19:50 -08:00
Ben Vanik 58db76c42c Pay no attention to the man behind the curtains. 2014-01-21 18:14:36 -08:00
Ben Vanik 1316e79a2f Fixing missing field. 2014-01-21 18:12:18 -08:00
Ben Vanik 7d8aaaaea7 Texture wrapping modes. 2014-01-21 08:31:25 -08:00
gibbed 3a2c2beca4 Not sure if this is correct, seems to work. 2014-01-21 02:36:24 -08:00
gibbed 801758fc2f Oops. 2014-01-21 01:54:54 -08:00
gibbed 01b00118d4 Further improvements to FetchTexture2D. 2014-01-21 01:54:34 -08:00
gibbed efa7199974 XE_GPU_SWIZZLE_000R. 2014-01-21 01:51:56 -08:00
gibbed 9507960829 Oops. Don't need that. 2014-01-21 00:51:56 -08:00
gibbed d75f4989a8 - Tiled texture support (largely untested).
- Maybe fixed FMT_8.
- Improved swapping of source texture data.
2014-01-21 00:50:18 -08:00
Ben Vanik 44c15342f5 Swizzling some textures. 2014-01-21 00:31:24 -08:00
Ben Vanik 175e21bea1 Texture filtering (mostly). 2014-01-20 23:45:45 -08:00
Ben Vanik c660b5e4d1 Making the invalid texture bright green. 2014-01-20 22:38:07 -08:00
gibbed e02c5157ef Then I broke DXT3. Fixed DXT3 and DXT5. For real this time. 2014-01-20 20:29:45 -08:00
gibbed 2bda51f5ec Fixed DXT5. 2014-01-20 20:28:42 -08:00
gibbed e66390ae93 - Proper copying of texture data.
- Support for DXT3, DXT5, 32 float, 16 16 16 16 float.
- Only pad textures for formats that require it.
2014-01-20 20:14:47 -08:00
Ben Vanik 74aac97b3e FMT_8 2014-01-20 17:54:19 -08:00
gibbed ccfb82d883 Better texture copying. And possible support for DXT1. 2014-01-20 17:49:26 -08:00
Ben Vanik 26a2ed4d75 Fixing shaders. 2014-01-20 17:45:26 -08:00
Ben Vanik 094e165415 Fixing copy. 2014-01-20 17:00:17 -08:00
Ben Vanik 3c98e65997 Fixing texture size. 2014-01-20 16:41:21 -08:00
Ben Vanik 67cc57e918 Whoops. Re-enabling blending. 2014-01-20 16:11:55 -08:00
Ben Vanik 37ed238186 Fixing texture sizing (maybe). Need to do a custom slicing bit, probably. 2014-01-20 16:10:56 -08:00
Ben Vanik cd72bc33a3 Texture sampling in shaders. 2014-01-20 16:05:34 -08:00
Ben Vanik 4de33a6e2d Making texture fetching split from samplers. 2014-01-20 15:36:33 -08:00
Ben Vanik af223b2067 Textures part 1: uploading. 2014-01-20 13:57:22 -08:00
Ben Vanik e469d87678 Detect write to psize and include conditionally. 2014-01-20 11:07:14 -08:00
Ben Vanik 0efd7b4a62 Moving viewport transform to vertex shaders. 2014-01-20 10:46:43 -08:00
Ben Vanik f5eefb138c Geometry shaders now support disabled viewports. 2014-01-20 03:42:05 -08:00
Ben Vanik 58504d8c0b Initial pass at pointsprites. Needs a lot more work. 2014-01-20 01:13:37 -08:00
Ben Vanik ea5a6e19dd Disabling culling for rect lists. 2014-01-20 00:45:16 -08:00
Ben Vanik 1cd518b19c Geometry shader work for rect lists and quad lists. 2014-01-20 00:18:14 -08:00
Ben Vanik bcea3e00f1 Point size output from VS. 2014-01-19 16:41:52 -08:00
Ben Vanik 55fe3aca05 RECIP_IEEE. 2014-01-19 11:07:12 -08:00
Ben Vanik cb3f2308af Fixing shaders that fetch constants. 2014-01-19 10:29:34 -08:00
Ben Vanik c257ad0122 Work on D3D11 for various state settings. This code sucks. Needs a rewrite. 2014-01-18 01:50:31 -08:00
Ben Vanik a7db0f0410 Fixing component access on vfetch. 2014-01-18 01:38:11 -08:00
Ben Vanik 7bdd973935 Proper vertex format input type in shaders. 2014-01-18 01:08:45 -08:00
Ben Vanik 99c72f24f2 Better vertex buffer construction, supporting packed data. 2014-01-18 00:12:57 -08:00
Ben Vanik ffcd687ef6 Played with making xenia-run a Win32 app, but then logging stops working... 2014-01-15 21:58:09 -08:00
Ben Vanik 2a7f3de1c3 Moving shutdown logic to Emulator. 2014-01-15 07:31:21 -08:00
Ben Vanik 991e7d8ad3 Refactoring window stuff. Still needs some work. 2014-01-14 22:40:02 -08:00
Ben Vanik 6129e1eb7a Simplifying macros to fix VS' broken preprocessor. 2014-01-12 14:06:00 -08:00
Ben Vanik 27a8e09b51 Depth stencil state. 2014-01-10 01:25:50 -08:00
Ben Vanik 7969349126 Fixing some shutdown code. 2014-01-02 18:58:44 -08:00
Ben Vanik 5bc74313e3 Fixing broken instruction offsets on block splits. 2013-12-27 15:00:34 -08:00
Ben Vanik c17122e022 Using raw addresses for gpu writeback. 2013-12-15 15:32:06 -08:00
Ben Vanik fdb6a5cfa3 Initial Alloy implementation.
This is a regression in functionality and performance, but a much better
foundation for the future of the project (I think). It can run basic
apps under an SSA interpreter but doesn't support some of the features
required to do real 360 apps yet.
2013-12-06 22:57:16 -08:00
Ben Vanik 68b8737a58 SETXXv, CNDXXv, SETXXs - may not be right. 2013-11-17 15:20:50 -08:00
Ben Vanik 1f4795e7d4 Fixing shader file names. 2013-11-17 15:20:28 -08:00
Ben Vanik 9441fb8b7a Finally figured out MUL/ADD/SUB_CONST_* 2013-11-16 18:27:17 -08:00
Ben Vanik 1592cf96f7 MAX4v, MINs, MAXs 2013-11-16 16:59:33 -08:00
Ben Vanik 798cad6f87 DOT2ADDv 2013-11-16 16:15:23 -08:00
Ben Vanik 8398ea4925 I lied, MULADD was not that way. 2013-11-16 05:16:11 -08:00
Ben Vanik 60f48bdd32 Always write oPos. 2013-11-16 04:39:26 -08:00
Ben Vanik 7491058ffd Adding --dump_shaders=path/. 2013-11-16 04:39:16 -08:00
Ben Vanik 8440c9059a Fixing order of MULADDv. 2013-11-16 04:35:08 -08:00
Ben Vanik 271abbf874 Adding --trace_ring_buffer. 2013-11-16 03:06:55 -08:00
gibbed faa67028ce Mystery GPU registers. 2013-10-27 18:44:20 -07:00
Ben Vanik 2de906f3d6 Hacking around with shaders. Pretty sure this is all wrong. 2013-10-27 18:33:50 -07:00
Ben Vanik 0355047838 PM4_LOAD_ALU_CONSTANT 2013-10-27 16:18:54 -07:00
Ben Vanik b7ffd46319 Massive refactoring of all code + audio skeleton.
This should make it easier to find files and (in the future) split things
up into separate libraries.
It also changes around emulator initialization to make it a little more
difficult to do things out of order and a little more sensible as to when
real init work happens.
Also adding a skeleton audio system/driver and reworking CPU register
access to be more extensible.
2013-10-23 20:42:24 -07:00
Ben Vanik d065ee43e8 PM4_SET_CONSTANT for registers. 2013-10-22 21:32:04 -07:00
Ben Vanik 62d4d5ce84 Randomly messing with address translation. Still not right. 2013-10-22 21:05:56 -07:00
Ben Vanik e0b6d0f689 Cleaning up packet reading/endianness. 2013-10-22 20:47:27 -07:00
Ben Vanik d00f4d58e9 Better byte swapping in ringbuffer and fixed logging. 2013-10-20 18:34:46 -07:00
Ben Vanik cddab7ffb0 Fixing free. 2013-10-20 15:28:00 -07:00
Ben Vanik fbea5a6394 Making the GPU counter a vblank counter, not a timer. 2013-10-20 02:00:51 -07:00
Ben Vanik 39adeef2e3 Hiding vertex/index data for now. 2013-10-20 01:59:42 -07:00
Ben Vanik 92899739bd Index buffer upload. 2013-10-20 00:47:32 -07:00
Ben Vanik 5a80c7b9c1 Hacking shaders to get dummy texture colors and such. 2013-10-20 00:20:36 -07:00
Ben Vanik 889e586cab Skeleton for new draw type and texture fetching. 2013-10-19 21:49:25 -07:00
Ben Vanik 62b792c903 Ignoring a packet I don't care about. 2013-10-19 20:30:36 -07:00
Ben Vanik 68d5f33cfa GPU byte swapping.
A lot of other packets likely do this.
2013-10-19 16:29:00 -07:00
Ben Vanik 37065255a2 Dispatching interrupts. 2013-10-19 12:50:26 -07:00
Ben Vanik 90bc6ad1a8 Interrupts fire on the right 'thread', ringbuffer work, 2013-10-19 11:50:01 -07:00
Ben Vanik c60230f28a Implementing scratch registers correctly (I think). 2013-10-19 01:16:13 -07:00
Ben Vanik 1616d7ba22 WAIT_MEM_REG, REG_RMW (untested), COND_WRITE 2013-10-19 00:46:35 -07:00
Ben Vanik a63db2b7fd Dispatch interrupt outside of main pump. 2013-10-19 00:46:11 -07:00
Ben Vanik d3665cc2e6 Support for VS2013 (and auto picking), a Win xb script, and readme updates.
This also removes the dependency on D3DX, which is only included in the
DXSDK, meaning that just the Win8+ SDK should be required now.
2013-10-17 23:35:54 -07:00
Ben Vanik f409795dd1 Fixing PM4 type 0 packet parsing. 2013-10-15 20:24:32 -07:00
Ben Vanik 0b24356080 Skipping unknown form of PM4_EVENT_WRITE_SHD for now. 2013-10-14 21:35:23 -07:00
Ben Vanik 2eed0b1575 Fixing wraparound.
This still needs a tremendous amount of cleanup.
2013-10-13 21:18:23 -07:00
Ben Vanik 4887234bba Fixing ring buffer wrap around. I think. 2013-10-13 13:39:46 -07:00
Ben Vanik e0af361d74 Preventing (one of likely many) race condition with ringbuffer.
This was causing acks for commands not executed if the CPU ran faster
than the GPU.
2013-10-13 12:17:07 -07:00
Ben Vanik 41a652dd03 Manual reset was not the solution. Bah. 2013-10-13 12:09:25 -07:00
Ben Vanik f49e35636d Fixing uninitialized members.
Wish VC++ warned about this line clang does...
2013-10-13 11:14:46 -07:00
Ben Vanik c6d779920d Switch ring buffer wait event to manual reset.
Avoids timing issues with kicks.
2013-10-13 11:06:45 -07:00
Ben Vanik fa4c7cdd83 Wait until the ringbuffer thread is spun up.
This could be made much nicer.
2013-10-13 11:06:29 -07:00
Ben Vanik cc12f0b96a Periodically fire interrupts. 2013-10-13 11:06:13 -07:00
Ben Vanik 96a857e892 Massively disgusting and incomplete shader translator. 2013-10-12 22:14:23 -07:00
Ben Vanik 0ef278325f Hacking to get first triangle drawn. 2013-10-12 15:07:34 -07:00
Ben Vanik 51b79cb399 Minor fixes. 2013-10-12 03:02:39 -07:00
Ben Vanik 8e01e2d945 Vertex fetching. 2013-10-12 02:29:01 -07:00
Ben Vanik 04aad708c9 Shader type read for translation. 2013-10-11 22:04:34 -07:00
Ben Vanik 1378fad3c0 Basic shader cache. 2013-10-11 21:45:20 -07:00
Ben Vanik 6e4fb87992 D3D11 window up and spinning. 2013-10-11 20:23:58 -07:00
Ben Vanik 611d3bbbeb Adding in D3D11 GPU skeleton. 2013-10-09 23:18:22 -07:00
Ben Vanik 8558176ee0 Cleaning up the ucode disassembler. 2013-10-09 22:50:44 -07:00
Ben Vanik 14bf4912d1 Fixing CF decode. 2013-10-09 21:15:23 -07:00
Ben Vanik 7b97d475c2 Hacked in shader disassembler.
Checking this in before I break it. Has tons of issues.
Turns out the 360 GPU uses an Adreno (rAdeon)-like r2xx shader format.
VC++'s handling of bitfields is absolutely terrible.
2013-10-09 20:28:35 -07:00
Ben Vanik 17be429244 Microcode disassembler skeleton. 2013-10-07 19:58:24 -07:00
Ben Vanik 651954ccae Starting to drive command buffer actions down to a graphics driver. 2013-10-06 21:09:58 -07:00
Ben Vanik 371075f154 More GPU decoding. 2013-10-06 19:22:02 -07:00
Ben Vanik b7fd4f975d Fixing ringbuffer pointers and no-op instructions. 2013-09-25 00:46:47 -07:00
Ben Vanik 03494c6b88 Stubbing methods and cleanup. 2013-09-25 00:46:29 -07:00
Ben Vanik 91f62918f6 Adding vblank interrupt. 2013-09-25 00:46:09 -07:00
Ben Vanik 97b4fdb041 Fixing misnamed register enum. 2013-06-02 10:32:07 -07:00
espes 388c622ecd fill in some more xenos registers 2013-06-02 17:11:54 +10:00
Ben Vanik cf57481a0e Adding basic register names. 2013-06-01 22:51:09 -07:00
Ben Vanik e00e665a09 Basic command buffer processing. 2013-06-01 21:49:14 -07:00
Ben Vanik ba16a0d847 Trying to setup writeback and add basic secondary command execution. 2013-06-01 03:08:31 -07:00
Ben Vanik 5b0fa8f17e Basic ringbuffer worker. Super hacky, not yet writing back to CPU. 2013-06-01 01:13:44 -07:00
Ben Vanik ef0032ecff Wiring up register read/write from JIT -> GPU. 2013-05-31 21:23:26 -07:00
Ben Vanik 2cecc02787 Skeleton GPU files. 2013-05-27 21:45:55 -07:00
Ben Vanik 3cae7ed714 Converting logging to ASCII and other Windows fixes. 2013-02-09 08:05:39 -08:00
Ben Vanik 88431eadce Screw convention; moving include files alongside source files.
They now will show up in xcode/etc.
2013-02-06 02:19:50 -08:00