Commit graph

4506 commits

Author SHA1 Message Date
James Benton
b7a8d738c8 Merge branch 'warning-fixes' of https://github.com/achurch/decaf-emu into achurch-warning-fixes 2015-12-23 16:18:51 +00:00
James Benton
9cbecd5b66 Add SDL as a backend.
The backend can be switched in config.json
If DECAF_GLFW is defined, GLFW support is compiled.
If DECAF_SDL is defined, SDL support is compiled.

Both are compiled by default.
2015-12-23 15:58:44 +00:00
Andrew Church
303b40cb9c Remove unnecessary conditionals which trigger a (spurious) maybe-uninitialized warning. 2015-12-23 22:03:37 +09:00
Andrew Church
05fa8983e9 Fix some unused-variable warnings. 2015-12-23 22:03:22 +09:00
James
81ada1d851 Merge pull request #130 from achurch/separate-windows
Use separate TV and DRC windows with SDL.
2015-12-23 12:29:26 +00:00
Lioncash
4d9c477d17 gx2r_surface: Prevent null pointer dereference 2015-12-23 04:13:46 -05:00
Andrew Church
86ffc4d3a5 Use separate TV and DRC windows with SDL.
Also listen for SDL window close button events, and save the current
window positions in the config when exiting.
2015-12-23 15:03:29 +09:00
James
f5d4a31c81 Merge pull request #128 from achurch/sdl
Implement an SDL2-based UI, and use it in CMake builds.
2015-12-23 01:35:33 +00:00
Andrew Church
4e9a422a26 Exit cleanly when a quit is requested.
Processor threads are now interrupted so they can be quickly reaped,
and invalid trace calls with null arguments (apparently intended to
avoid the functions being removed by link optimization?) are wrapped
in an if((volatile)0) block so they are not actually executed.
2015-12-23 08:23:37 +09:00
Andrew Church
97577368f8 Typo fix. 2015-12-23 06:32:20 +09:00
James Benton
fbbcdb9f94 Add mic module and stub MICInit. 2015-12-22 00:39:08 +00:00
Andrew Church
f70601604c Use GX2GetSurfaceElementBytes() instead of rolling our own function. 2015-12-22 09:11:14 +09:00
Andrew Church
001070367d Implement an SDL2-based UI, and use it in CMake builds. 2015-12-22 07:32:56 +09:00
Andrew Church
43454626c6 Calculate proper display sizes in GX2Calc{TV,DRC}Size().
The surfaceBitsPerPixel() helper function is probably a good candidate
for moving somewhere it can be called from other code as well.
2015-12-22 06:07:04 +09:00
James Benton
e8c1455f54 Add missing include in gx2_event 2015-12-21 18:22:56 +00:00
James Benton
d4d0a4607a Ooopsy - allocate flip threadqueue. 2015-12-21 18:22:23 +00:00
James Benton
db0b0ae1df Flush in GX2DrawDone before sleeping. 2015-12-21 18:21:40 +00:00
James Benton
6a15e53c10 Implement GX2Set{Vertex,Geometry}Texture 2015-12-21 17:53:39 +00:00
James Benton
981aa7a0b7 Explicitly use gsl::as_span in GX2SetShaderModeEx. 2015-12-21 15:19:07 +00:00
James Benton
c16b926d29 Properly track swapCount, flipCount, lastFlip.
Still need to implement the flip event callback, but requires gx2 interrupts.
2015-12-21 15:12:45 +00:00
James Benton
668161684e Actually use mask in SQ_VTX_SEMANTIC_CLEAR for clearing semantics. 2015-12-21 14:52:55 +00:00
James Benton
b84f64cb36 Implement GX2SetStreamOutEnable. 2015-12-21 14:51:05 +00:00
James Benton
665a5f047f Complete GX2SetShaderModeEx. 2015-12-21 14:50:53 +00:00
James Benton
c2c438fa69 Properly set shader loop vars. 2015-12-21 14:19:12 +00:00
James Benton
c6afa7a429 Fix GX2SetVertexShader to properly set ES and Vertex Stride. 2015-12-21 14:18:33 +00:00
James Benton
3c6ae544c1 Add offsets for each GX2VertexShader register. 2015-12-21 14:18:01 +00:00
James Benton
6e96bc4dbb Implement GX2SetGeometryShader. 2015-12-21 14:17:43 +00:00
James Benton
bdfc7e8938 Add gx2_aperture to CMakeLists 2015-12-20 17:38:20 +00:00
James Benton
8cfdb30c36 Fix bad initialisation of pending eop. 2015-12-20 16:53:34 +00:00
James Benton
48d7ed05e8 Stub tiling aperture functions. 2015-12-20 16:53:34 +00:00
James Benton
b03da454a0 Fix copySurface brain fart. 2015-12-20 15:09:38 +00:00
James Benton
dbf9ad360b Half-ass implement LOG_CLAMPED. 2015-12-20 14:58:12 +00:00
James Benton
723e6e0dc2 Fix KCacheBank1 GLSL translation. 2015-12-20 14:56:31 +00:00
James Benton
cdfce6f0e6 Implement uniform blocks in OpenGL driver. 2015-12-20 14:56:15 +00:00
James Benton
687ed941d9 Add lots more OpenGL texture formats. 2015-12-20 14:55:36 +00:00
James Benton
84b04d5c6b Implement GX2CopySurface. 2015-12-20 14:55:21 +00:00
James Benton
4c6ece48c1 Implement GX2 timestamp queries.
Close #124.
2015-12-20 14:55:08 +00:00
James Benton
a4e83abe84 Complete GX2Set{Vertex,Pixel}UniformBlock. 2015-12-20 14:38:11 +00:00
James Benton
2fee90ebc4 Implement GX2InitDepthBufferHiZEnable. 2015-12-20 14:37:34 +00:00
James Benton
fdbdd22dbb Stub AXRmtGetSamples. 2015-12-19 15:38:26 +00:00
James Benton
864117cdba Print LR of calls to unimplemented kernel functions. 2015-12-19 15:08:22 +00:00
James Benton
4479d185e5 Stub some AI DMA functions. 2015-12-19 15:06:48 +00:00
James Benton
8b903d1978 Do not throw exception on unimplemented texture formats. 2015-12-19 14:51:11 +00:00
James Benton
fb4afdc2a5 Fix OSMemoryType enum.
WOW OK FUCK.
2015-12-19 13:44:43 +00:00
James Benton
8b68f7ef84 Implement GX2Set{Min,Max}TessellationLevel.
Stub GX2SetTessellation.
2015-12-18 19:14:11 +00:00
James Benton
fdcebd2b25 Fix command buffer flushing when there is no active buffer. 2015-12-18 19:14:10 +00:00
James Benton
fe14fe448b Implement GX2RCreateBufferUserMemory. 2015-12-18 19:14:10 +00:00
James Benton
56331284a0 Fix user buffer deletion. 2015-12-18 19:14:10 +00:00
Andrew Church
434d5d466e Remove executable bit on source files. 2015-12-19 00:58:11 +09:00
Andrew Church
b2eff31853 Add missing source files to CMake source list. 2015-12-19 00:57:42 +09:00