Commit graph

5357 commits

Author SHA1 Message Date
bunnei b651578582 Merge pull request #346 from bunnei/misc-gpu-improvements
Misc gpu improvements
2018-04-17 22:17:07 -04:00
bunnei 0a119bf39b Merge pull request #344 from bunnei/shader-decompiler-p2
Shader decompiler changes part 2
2018-04-17 22:10:53 -04:00
bunnei ed447c8786 gl_rasterizer_cache: Add missing LOG statements. 2018-04-17 21:44:36 -04:00
bunnei d4dcd3e720 texture: Add missing formats. 2018-04-17 21:41:36 -04:00
bunnei 848ade06d5 gpu: Add several framebuffer formats to RenderTargetFormat. 2018-04-17 21:40:38 -04:00
bunnei de84b74dd4 maxwell3d: Allow Texture2DNoMipmap as Texture2D. 2018-04-17 21:39:15 -04:00
bunnei 797267eb58 shader_bytecode: Make ctor's constexpr and explicit. 2018-04-17 21:27:07 -04:00
bunnei 4d9c441bef renderer_opengl: Implement BlendEquation and BlendFunc. 2018-04-17 18:11:48 -04:00
bunnei 33a0dddf78 bit_field: Remove is_pod check, add is_trivially_copyable_v. 2018-04-17 18:00:18 -04:00
bunnei 48ab22ff76 gl_shader_decompiler: Fix warnings with MarkAsUsed. 2018-04-17 16:36:44 -04:00
bunnei 7ad31d2667 gl_shader_decompiler: Cleanup logging, updating to NGLOG_*. 2018-04-17 16:36:44 -04:00
bunnei 29ab89054d gl_shader_decompiler: Implement several MUFU subops and abs_d. 2018-04-17 16:36:43 -04:00
bunnei 93388e3c6b gl_shader_decompiler: Fix swizzle in GetRegister. 2018-04-17 16:36:42 -04:00
bunnei c1408040a6 gl_shader_decompiler: Implement FMUL/FADD/FFMA immediate instructions. 2018-04-17 16:36:42 -04:00
bunnei dbf1fb7e61 gl_shader_decompiler: Allow vertex position to be used in fragment shader. 2018-04-17 16:36:40 -04:00
bunnei 7fe43996de gl_shader_decompiler: Implement IPA instruction. 2018-04-17 16:36:39 -04:00
bunnei 05305422e1 gl_shader_decompiler: Add support for TEXS instruction. 2018-04-17 16:36:38 -04:00
bunnei 69f5eadc2b gl_shader_decompiler: Use fragment output color for GPR 0-3. 2018-04-17 15:25:54 -04:00
bunnei fdca99c4fb gl_shader_decompiler: Partially implement MUFU. 2018-04-17 15:25:54 -04:00
bunnei 0f02c41f18 Merge pull request #341 from shinyquagsire23/pfs-hfs-impl
file_sys: Add HFS/PFS helper component
2018-04-17 14:39:20 -04:00
mailwl 59077b7d07 Service/VI: stub SetLayerVisibility, fix GetDisplayResolution output
both SetLayerVisibility() functions used in Lego games, GetDisplayResolution()
fixed according switchbrew.org
2018-04-17 19:42:14 +03:00
bunnei 09122ee37d Merge pull request #343 from Subv/tex_wrap_4
GPU: Implement some wrap modes
2018-04-17 12:25:24 -04:00
shinyquagsire23 5634f49b60 file_sys: Use NGLOG 2018-04-17 09:55:29 -06:00
Hexagon12 4c462c91bd Various service name fixes - part 2 (rebased) (#322)
* Updated ACC with more service names

* Updated SVC with more service names

* Updated set with more service names

* Updated sockets with more service names

* Updated SPL with more service names

* Updated time with more service names

* Updated vi with more service names
2018-04-17 11:37:43 -04:00
Subv d388e8e8f9 MaxwellToGL: Implemented tex wrap mode 1 (Wrap, GL_REPEAT). 2018-04-17 10:17:18 -05:00
Subv b5fdd197b2 MaxwellToGL: Added a TODO and partial implementation of maxwell wrap mode 4 (Clamp, GL_CLAMP).
This clamp mode was removed from OpenGL as of 3.1, we can emulate it by using GL_CLAMP_TO_BORDER to get the border color of the texture, and then manually sampling the edge to mix them in the fragment shader.
2018-04-17 10:16:50 -05:00
bunnei ad8a27a7b3 gl_rendering: Use NGLOG* for changed code. 2018-04-16 21:23:28 -04:00
bunnei 65092bf8d8 gl_rasterizer: Implement indexed vertex mode. 2018-04-16 21:10:15 -04:00
shinyquagsire23 13ab489cb7 file_sys: tweaks 2018-04-16 06:51:59 -06:00
shinyquagsire23 bba0a351e7 file_sys: Add HFS/PFS helper component 2018-04-16 04:36:25 -06:00
bunnei 03ee087c5e Merge pull request #338 from bunnei/unrequire-shared-font
pl_u: Use empty shared font if none is available.
2018-04-15 16:54:36 -04:00
bunnei 2ff824c992 Merge pull request #337 from Subv/used_buffers
GPU: Don't use explicit binding points when uploading the constbuffers to opengl
2018-04-15 16:30:57 -04:00
bunnei f6ba44429e pl_u: Use empty shared font if none is available.
- Makes games work in lieu of shared_font.bin.
2018-04-15 16:15:34 -04:00
Subv ea9f5538c2 GPU: Use the same buffer names in the generated GLSL and the buffer uploading code. 2018-04-15 15:02:50 -05:00
Subv d8fdbefef6 GPU: Don't use explicit binding points when uploading the constbuffers to opengl.
The bindpoints will now be dynamically calculated based on the number of buffers used by the previous shader stage.
2018-04-15 14:14:57 -05:00
bunnei 3a6dc1e0e4 Merge pull request #335 from bunnei/delete-file
fsp_srv: Implement DeleteFile.
2018-04-15 15:13:02 -04:00
bunnei dc852fda3b fsp_srv: Implement DeleteFile.
- Used by Binding of Isaac.
2018-04-15 13:15:18 -04:00
Subv 1a31997264 GPU: Don't use GetPointer when uploading the constbuffer data to the GPU. 2018-04-15 11:18:09 -05:00
Subv ffdc9e716d GPU: Use the buffer hints from the shader decompiler to upload only the necessary const buffers for each shader stage. 2018-04-15 11:15:54 -05:00
bunnei 595d37d69a shaders: Expose hints about used const buffers. 2018-04-15 11:50:10 -04:00
Subv 03cbd8f20f GPU: Upload the entirety of each constbuffer for each shader stage as SSBOs.
We're going to need the shader generator to give us a mapping of the actual used const buffers to properly bind them to the shader.
2018-04-14 23:02:05 -05:00
Subv ea730b69d1 GPU: Allow configuring ssbos in the opengl state manager. 2018-04-14 22:54:23 -05:00
Subv e14e38fe0e GPU: Added a function to determine whether a shader stage is enabled or not. 2018-04-14 22:54:23 -05:00
bunnei 1a1008a642 Merge pull request #332 from bunnei/fix-total-mem-usage
vm_manager: Increase GetTotalMemoryUsage value.
2018-04-14 22:29:19 -04:00
bunnei 3260473ce8 vm_manager: Increase GetTotalMemoryUsage value.
- Gets Binding of Isaac running.
2018-04-14 22:04:10 -04:00
bunnei f23d61a709 Merge pull request #327 from adityaruplaha/fullscreen-fix
Fix the stuck in fullscreen bug
2018-04-14 21:24:36 -04:00
bunnei a2dcd3cbbc Merge pull request #331 from bunnei/fsp-flush
fsp_srv: Implement IFile::Flush.
2018-04-14 21:21:34 -04:00
bunnei 28c0641382 fsp_srv: Implement IFile::Flush. 2018-04-14 19:46:09 -04:00
bunnei 538322ec1f shaders: Add NumTextureSamplers const, remove unused #pragma. 2018-04-14 18:50:06 -04:00
bunnei f48c229f0e shaders: Address PR review feedback. 2018-04-14 16:01:41 -04:00
bunnei 2fcae0000f gl_shader_decompiler: Cleanup log statements. 2018-04-14 16:01:41 -04:00
bunnei 47bf0b0094 shaders: Fix GCC and clang build issues. 2018-04-14 16:01:40 -04:00
bunnei d166a50ded gl_shader_decompiler: Implement negate, abs, etc. and lots of cleanup. 2018-04-14 16:01:40 -04:00
bunnei a859a70da1 shader_bytecode: Add FSETP and KIL to GetInfo. 2018-04-14 16:01:40 -04:00
bunnei 6fe96737a1 shader_bytecode: Add SubOp decoding. 2018-04-14 16:01:40 -04:00
bunnei a5728bdd10 gl_shader_decompiler: Add shader stage hint. 2018-04-14 16:01:39 -04:00
bunnei e3628ec6fd renderer_opengl: Fix Morton copy byteswap, etc. 2018-04-14 16:01:39 -04:00
adityaruplaha 4716115c3d Fix the stuck in fullscreen bug (Original PR: citra-emu/citra#3611) 2018-04-14 16:41:56 +05:30
bunnei 1962aac7a0 gl_shader_manager: Implement SetShaderSamplerBindings. 2018-04-13 23:48:30 -04:00
bunnei 1a3dbd49ef gl_rasterizer: Generate shaders and upload uniforms. 2018-04-13 23:48:29 -04:00
bunnei 8df3222eb3 gl_shader_decompiler: Basic impl. for very simple vertex shaders.
- Tested with Puyo Puyo Tetris and Cave Story+
2018-04-13 23:48:28 -04:00
bunnei f11b2888c9 gl_shader_manager: Cleanup and consolidate uniform handling. 2018-04-13 23:48:28 -04:00
bunnei 7e7f053ea7 maxwell_3d: Make memory_manager public. 2018-04-13 23:48:27 -04:00
bunnei 4e961244a8 maxwell_3d: Fix shader_config decodings. 2018-04-13 23:48:26 -04:00
bunnei 2452d127dc gl_rasterizer: Use shader program manager, remove test shader. 2018-04-13 23:48:26 -04:00
bunnei f9c4e515d8 renderer_opengl: Add gl_shader_manager class. 2018-04-13 23:48:25 -04:00
bunnei 9e32fa6bb2 maxwell_to_gl: Add a few types, etc. 2018-04-13 23:48:24 -04:00
bunnei 7cebff07e4 gl_shader_gen: Add hashable setup/config structs. 2018-04-13 23:48:23 -04:00
bunnei 1aa7a9ae50 gl_shader_util: Add missing includes. 2018-04-13 23:48:23 -04:00
bunnei c30c48e052 common: Port cityhash code from Citra. 2018-04-13 23:48:22 -04:00
bunnei f1915d909e renderer_opengl: Use OGLProgram instead of OGLShader. 2018-04-13 23:48:21 -04:00
bunnei 56ee41ebe8 gl_shader_util: Grab latest upstream. 2018-04-13 23:48:21 -04:00
bunnei 83007952ea gl_resource_manager: Grab latest upstream. 2018-04-13 23:48:20 -04:00
bunnei f0f3990064 gl_shader_decompiler: Add skeleton code from Citra for shader analysis. 2018-04-13 23:48:20 -04:00
bunnei 0b49a74e19 shader_bytecode: Add initial module for shader decoding. 2018-04-13 23:48:19 -04:00
bunnei 7112683376 bit_field: Make all methods constexpr. 2018-04-13 23:48:18 -04:00
bunnei e42bbdddff Merge pull request #323 from Hexagon12/stub-hid
Service/HID: Stubbed out GetPlayerLedPattern
2018-04-13 10:58:03 -04:00
Hexagon12 433ccdebe5 Fixed normal params in GetDisplayResolution 2018-04-13 17:47:01 +03:00
Hexagon12 e6bb2d65f8 Stubbed out GetPlayerLedPattern 2018-04-13 17:05:03 +03:00
bunnei 219e3f4c45 Merge pull request #319 from Hexagon12/service-name-fix
Various service name fixes - part 1
2018-04-13 00:25:32 -04:00
mailwl b439691768 Service/SSL: update service according switchbrew 2018-04-11 19:17:18 +03:00
Hexagon12 8293ccc5ed Various fixes and clang 2018-04-11 14:48:56 +03:00
Hexagon12 6d6064d42e Decimal change 2018-04-10 21:21:00 +03:00
Hexagon12 f171ec8b29 Updated pctl:a with new service names. 2018-04-10 21:03:23 +03:00
Hexagon12 0bd95ef3be Updated nvmemp with new service names. 2018-04-10 20:28:15 +03:00
Hexagon12 2df3594b31 Updated nvdrv with more service names. 2018-04-10 20:26:49 +03:00
Hexagon12 837b8b5b80 Updated pl:u with more service names. 2018-04-10 20:23:21 +03:00
Hexagon12 e05e3c8a08 Updated hid with more service names. 2018-04-10 20:17:22 +03:00
Hexagon12 93b83a11b6 Updated friend:u with more service names. 2018-04-10 20:02:11 +03:00
Hexagon12 83479a3d19 Updated the unknown name 2018-04-10 20:01:33 +03:00
Hexagon12 251c576455 Updated friend:a with more service names. 2018-04-10 20:00:36 +03:00
Hexagon12 f8e0ce2cd0 Updated fsp-srv with more service names. 2018-04-10 19:30:27 +03:00
Hexagon12 82be79db10 Updated CodecCtl with more service names. 2018-04-10 18:58:14 +03:00
Hexagon12 a9239dbed8 Updated audren with more service names. 2018-04-10 18:56:57 +03:00
Hexagon12 95d5bf3aa1 Updated audrec with more service names. 2018-04-10 18:53:33 +03:00
Hexagon12 eff525cab3 Updated audout with more service names. 2018-04-10 18:51:50 +03:00
Hexagon12 ba73f4e0a4 Updated audin with more service names. 2018-04-10 18:47:52 +03:00
Hexagon12 3eab3da04c Updated AOC with more service names. 2018-04-10 18:42:28 +03:00
Hexagon12 22ef1d1cc5 Updated AppletOE with more service names. 2018-04-10 18:41:17 +03:00
Hexagon12 4a594aff08 Updated AppletAE with more service names. 2018-04-10 18:39:46 +03:00
Hexagon12 c823bbde93 Updated AM with more service names. 2018-04-10 18:36:00 +03:00
mailwl a6a6ffed7a Service/ACC: convert to module, add acc:aa, acc:su, acc:u1 services 2018-04-10 10:18:52 +03:00
bunnei 6101a3c9d7 Merge pull request #314 from jroweboy/tegra-progress-3b
GPU: Bind uploaded textures when drawing (Rebased)
2018-04-07 18:46:16 -04:00
bunnei e918570c6d Merge pull request #315 from jroweboy/spelling-fix
Fix spelling of Initialize
2018-04-07 16:49:09 -04:00
James Rowe 92254855e7 Prevent crash from uninitialized telemetry 2018-04-07 07:25:14 -06:00
James Rowe f6ae0f432b Fix spelling of Initialize 2018-04-07 07:23:21 -06:00
James Rowe d8502eb24a Fix clang format issues 2018-04-06 22:00:48 -06:00
Subv cb3ca1d4cf GPU: Assert when finding a texture with a format type other than UNORM. 2018-04-06 20:44:46 -06:00
Subv c63f7aa93b GL: Set up the textures used for each draw call.
Each Maxwell shader stage can have an arbitrary number of textures, but we're limited to a certain number in OpenGL. We try to only use the minimum amount of host textures by not keeping a 1:1 relation between guest texture ids and host texture ids, ie, guest texture id 8 can be host texture id 0 if it's the only texture used in the guest shader program.
This mapping will have to be passed to the shader decompiler so it can rewrite the texture accesses.
2018-04-06 20:44:46 -06:00
Subv 4f1665d365 GL: Bind the textures to the shaders used for drawing. 2018-04-06 20:44:46 -06:00
Subv 8bc63e89e4 GLCache: Specialize the MortonCopy function for the DXT1 texture format.
It will now use the UnswizzleTexture function instead of the MortonCopyPixels128, which doesn't seem to work for textures.
2018-04-06 20:44:46 -06:00
Subv 1e6faaf2b3 GLCache: Implemented GetTextureSurface. 2018-04-06 20:44:45 -06:00
Subv 2a5e90745c GLCache: Support uploading compressed textures to the GPU.
Compressed texture formats like DXT1, DXT2, DXT3, etc will use this to ease the load on the CPU.
2018-04-06 20:44:45 -06:00
Subv 34b212c6a8 GL: Remove remaining references to 3DS-specific pixel formats 2018-04-06 20:44:42 -06:00
Subv 6400a3bb35 RasterizerCache: Remove 3DS-specific pixel formats.
We're only left with RGB8 and DXT1 for now. More will be added as they are needed.
2018-04-06 20:40:24 -06:00
Subv ab6d7991f8 GL: Create the sampler objects when starting up the GL rasterizer. 2018-04-06 20:40:24 -06:00
Subv 232ffe85ad GL: Ported the SamplerInfo struct from citra. 2018-04-06 20:40:24 -06:00
Subv dc26ad9aec GL: Rename PicaTexture to MaxwellTexture. 2018-04-06 20:40:24 -06:00
Subv 3c9cbbca68 GL: Added functions to convert Maxwell tex filters and wrap modes to OpenGL. 2018-04-06 20:40:23 -06:00
Subv d9e067fad6 Textures: Added a helper function to know if a texture is blocklinear or pitch. 2018-04-06 20:40:23 -06:00
bunnei 990ca9b20d Merge pull request #310 from N00byKing/patch-1
Update multiple comments from citra to yuzu
2018-04-06 11:07:28 -04:00
N00byKing 6d5b25c136 core, main.h: Abort on 32Bit ROMs (#309)
* core, main.h: Abort on 32Bit ROMs

* main.cpp: Fix Grammar
2018-04-06 11:06:32 -04:00
James Rowe b957a3647a Update fmtlib to fix msvc warnings
Additionally, when updating fmtlib, there was a change in fmtlib broke
how the old logging macro was overloaded, so this works around that by
just naming the fmtlib macro impl something different
2018-04-05 22:42:09 -06:00
N00byKing 63b5de9c40 rasterizer_interface.h: Update from citra to yuzu 2018-04-04 23:07:58 +02:00
N00byKing 6263f437d7 default_ini.h: Update from citra to yuzu 2018-04-04 23:05:51 +02:00
N00byKing b84397745f gl_rasterizer_cache.cpp: Update from citra to yuzu 2018-04-04 23:05:10 +02:00
N00byKing 3ca8768d3a gl_rasterizer_cache.h: Update from citra to yuzu 2018-04-04 23:04:24 +02:00
N00byKing 2a2af539f3 renderer_opengl.h: Update from citra to yuzu 2018-04-04 23:03:02 +02:00
bunnei e71cfbce72 svc: Stub out SetThreadActivity, GetThreadContext. 2018-04-02 23:51:01 -04:00
bunnei 372b8dae46 audren_u: Stub out GetActiveAudioDeviceName. 2018-04-02 23:51:00 -04:00
bunnei 683de06263 audout_u: Implement GetAudioOutState. 2018-04-02 23:51:00 -04:00
bunnei 659fd3e9f8 nifm: GetResult does not return a data field. 2018-04-02 23:50:59 -04:00
bunnei c800619c1e vi: Implement GetDisplayResolution. 2018-04-02 23:50:59 -04:00
bunnei 1eeef530e5 shared_memory: Remove incorrect 3ds-specific check. 2018-04-02 23:50:58 -04:00
bunnei 3f82cee183 service: Add friend:u interface. 2018-04-02 23:50:57 -04:00
Daniel Lim Wee Soong 145a4c3c2a logging: Change FmtLogMessage to use variadic template instead of FMT_VARIADIC
Due to premature merging of #262 I think the build may be failing right now. Should merge this ASAP to fix it.
2018-04-03 10:31:54 +08:00
bunnei e39ea2fa8e Merge pull request #262 from daniellimws/fmtlib-macros
Logging: Add fmtlib-based macros
2018-04-02 21:19:20 -04:00
bunnei 2b51f19079 Merge pull request #267 from N00byKing/patch-1
Update Dialog from citra to yuzu
2018-04-02 18:33:52 -04:00
bunnei 8eea0f0805 Merge pull request #276 from N00byKing/acctoyuzu
Change Telemetry Names to yuzu and remove links to citra
2018-04-02 18:30:04 -04:00
bunnei 0ce3d76591 Merge pull request #304 from daniellimws/fix-openbsd
Fix build on OpenBSD
2018-04-02 18:27:19 -04:00
N00byKing ba7cd88412 deconstructed_rom_directory.cpp: Fix Typo 2018-04-03 00:20:35 +02:00
Daniel Lim Wee Soong 930a045d42 externals: Update fmt to 4d35f94
Versions prior to this didn't compile on OpenBSD due to unconditional
use of the non-standard strtod_l() function.

The fmt::MemoryWriter API has been removed in the intervening
versions, so replace its use with fmt::memory_buffer and fmt::format_to.

The library also no longer provides the fmt::fmt ALIAS, so define
it in externals/CMakeLists.txt.
2018-04-03 02:49:58 +08:00
Daniel Lim Wee Soong 96cb786cd1 common: fix swap functions on Bitrig and OpenBSD
swap{16,32,64} are defined as macros on the two, but client code
tries to invoke them as Common::swap{16,32,64}, which naturally
doesn't work. This hack redefines the macros as inline functions
in the Common namespace: the bodies of the functions are the
same as the original macros, but relying on OS-specific
implementation details like this is of course brittle.
2018-04-03 02:25:11 +08:00
bunnei bc629f2f9b Merge pull request #297 from bunnei/hid-touch-state
hid: Write empty touch screen state.
2018-04-02 13:05:34 -04:00
bunnei e5491924f7 Merge pull request #296 from bunnei/misc-mem-fsp-fixes
Fix stack region, implement FSP GetSize/SetSize, and some stubs
2018-04-02 13:05:25 -04:00
bunnei 98bd0df9a3 Merge pull request #288 from Subv/macro_interpreter
GPU: Implemented a gpu macro interpreter
2018-04-02 10:04:19 -04:00
Subv 84c9824895 GPU: Use the MacroInterpreter class to execute the GPU macros instead of HLEing them. 2018-04-01 12:07:26 -05:00
Subv 7fe4f9491e GPU: Implemented a gpu macro interpreter.
The Ryujinx macro interpreter and envydis were used as reference.

Macros are programs that are uploaded by the games during boot and can later be called by writing to their method id in a GPU command buffer.
2018-04-01 12:07:26 -05:00
bunnei c7a4327471 hid: Write empty touch screen state. 2018-04-01 00:12:07 -04:00
bunnei 52c5bc4642 hle_ipc, fsp_srv: Cleanup logging. 2018-03-31 23:30:00 -04:00