* renderer_gl: Make rasterizer normal class member
* It doesn't need to be heap allocated anymore
* gl_rasterizer: Remove default_texture
* It's unused
* gl_rasterizer: General cleanup
* gl_rasterizer: Lower case lambdas
* Match style with review comments from vulkan backend
* rasterizer_cache: Prevent memory leak
* Since the switch from shared_ptr these surfaces were no longer being destroyed properly. Use our garbage collector for that purpose to destroy it safely for both backends
* rasterizer_cache: Make temp copy of old surface
* The custom surface would override the memory region of the old region resulting in garbage data, this ensures the custom surface is constructed correctly
* citra_qt: Manually create dialog tabs
* Allows for custom constructors which is very useful. While at it, global state is now eliminated from configuration
* citra_qt: Eliminate global system usage
* core: Remove global system usage in memory and HIO
* citra_qt: Use qOverload
* tests: Run clang format
* gl_texture_runtime: Fix surface scaling
* Move mii to own namespace and add checksummed mii data
* Fix compile issues
* Make mii classes trivial and add cast operator
* Fix Android side
* Add new line at the end of files.
* Make miidata a struct and crc16 a u32_be as per switch code.
* Apply suggestions
* Change back crc to u16 and set padding to 0.
* rasterizer_cache: Sentence surfaces
* gl_texture_runtime: Remove runtime side allocation cache
* rasterizer_cache: Adjust surface scale during reinterpreration
* Fixes pixelated outlines. Also allows to remove the d24s8 specific hack and is more generic in general
* rasterizer_cache: Remove Expand flag
* Begone!
* rasterizer_cache: Cache framebuffers with surface id
* rasterizer_cache: Sentence texture cubes
* renderer_opengl: Move texture mailbox to separate file
* Makes renderer_opengl cleaner overall and allows to report removal threshold from runtime instead of hardcoding. Vulkan requires this
* rasterizer_cache: Dont flush cache on layout change
* rasterizer_cache: Overhaul framebuffer management
* video_core: Remove duplicate
* rasterizer_cache: Sentence custom surfaces
* Vulkan cannot destroy images immediately so this ensures we use our garbage collector for that purpose
* service/gsp: Implement saving of framebuffers in SaveVramSysArea.
* Address review comments.
* service/apt: Separate capture info and capture buffer info.
The former is used with the RequestForSysApplet message and GetCaptureInfo.
The latter is used with SendCaptureBufferInfo and ReceiveCaptureBufferInfo.
* service/apt: Add and implement more service commands.
* service/apt: Implement power button.
* Address review comments and fix GetApplicationRunningMode bug.
* kernel: Properly clean up process threads on exit.
* kernel: Track process-owned memory and free on destruction.
* apt: Implement DoApplicationJump via home menu when available.
* kernel: Move TLS allocation management to owning process.
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value.
This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
This simplifies the logging system.
This also fixes some lost messages on startup.
The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation.
With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
* dumping/ffmpeg_backend: Add FPS filter
So that the recorded video can be at 60FPS (which is supported by most encoders) while still maintaining correct speed.
* dumping/ffmpeg_backend: Add HW context support
Required for some HW acceled encoders. Not tested as my devices don't seem to require this.
* CMake: Copy avfilter dll for MSVC
* CMakeLists: Require FFmpeg 4.0
* ffmpeg: Fix dumper compile error on MSVC.
* ffmpeg: Address review comments.
---------
Co-authored-by: zhupengfei <zhupf321@gmail.com>
* Add a loading screen for the preloading textures
*The PreloadTextures() function is called from the EmuThread to prevent citra to freezing
*Add a the preloading textures loadingscreen in loading_screen.cpp
*Add custom_tex_manager.reset() in core.cpp to release ram memory after exiting a game
* Add custom textures loading in EmuThread
* Remove useless variable
* Revert "Add custom textures loading in EmuThread"
This reverts commit 45ed46fa09.
* Moved include from bootmanager.h to bootmanager.cpp
* tests: add Sanity test for SplitFilename83
fix test
fix test
* disable `C4715:not all control paths return a value` for nihstro includes
nihstro: no warn
* Chore: Enable warnings as errors on msvc + fix warnings
fixes
some more warnings
clang-format
* more fixes
* Externals: Add target_compile_options `/W0` nihstro-headers and ...
Revert "disable `C4715:not all control paths return a value` for nihstro includes"
This reverts commit 606d79b55d.
* src\citra\config.cpp: ReadSetting: simplify type casting
* settings.cpp: Get*Name: remove superflous logs
* Use IPC:MakeHeader instead of hardcoded values for IPC command tables.
* Use u32 instead of unsigned int in MakeHeader function
Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>
* Fix clang format
---------
Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>
* common: Add thread pool from yuzu
* Is really useful for asynchronous operations like shader compilation and custom textures, will be used in following PRs
* core: Improve ImageInterface
* Provide a default implementation so frontends don't have to duplicate code registering the lodepng version
* Add a dds version too which we will use in the next commit
* rasterizer_cache: Rewrite custom textures
* There's just too much to talk about here, look at the PR description for more details
* rasterizer_cache: Implement basic pack configuration file
* custom_tex_manager: Flip dumped textures
* custom_tex_manager: Optimize custom texture hashing
* If no convertions are needed then we can hash the decoded data directly removing the needed for duplicate decode
* custom_tex_manager: Implement asynchronous texture loading
* The file loading and decoding is offloaded into worker threads, while the upload itself still occurs in the main thread to avoid having to manage shared contexts
* Address review comments
* custom_tex_manager: Introduce custom material support
* video_core: Move custom textures to separate directory
* Also split the files to make the code cleaner
* gl_texture_runtime: Generate mipmaps for material
* custom_tex_manager: Prevent memory overflow when preloading
* externals: Add dds-ktx as submodule
* string_util: Return vector from SplitString
* No code benefits from passing it as an argument
* custom_textures: Use json config file
* gl_rasterizer: Only bind material for unit 0
* Address review comments
Some versions of clang 14 (macOS+android) don't implement
`string_view(It first, It last)`, so let's use
`string_view(const CharT*, size_type)` instead.
Also remove unused header leftover from old code that uses std::string.
* citra_qt: Check if renderer is null
* core: Fix dynarmic use-after-free error
* bootmanager: Add current context check in DoneCurrent
* Loading a save state would destroy the frame dumper class, which contains a shared context. That context would call DoneCurrent without checking if it was actually bound or not, resulting in crashes when calling opengl functions
* externals: Correct glad readme
* common: Log renderer debug setting
* citra: Make lambda lower case
* Consistency with review comments on the PR
* video_core: Kill more global state
* GetResolutionScaleFactor would be called somewhere in the renderer constructor chain but it relies on the yet unitialized g_renderer, resulting in crashes when the resolution scale is set to auto. Rather than adding a workaround, let's kill this global state to fix this for good
Since the HIO request is basically treated like a syscall, we need to
stop emulation while waiting for the GDB client to reply with the
result. This ensures any memory queries etc. that GDB makes to fulfill
the HIO request are accessing memory as it was at the time of the
request, instead of afterwards.
This also does kind of a hacky way of sending HIO requests, since we
don't have a direct way of signaling a request should be sent like the
Rosalina implementation.
To improve this, it could probably do some kind of signal sending which
the main run loop handles instead of GDBStub::HandlePacket();
* externals: Update dynarmic
* settings: Introduce GraphicsAPI enum
* For now it's OpenGL only but will be expanded upon later
* citra_qt: Introduce backend agnostic context management
* Mostly a direct port from yuzu
* core: Simplify context acquire
* settings: Add option to create debug contexts
* renderer_opengl: Abstract initialization to Driver
* This commit also updates glad and adds some useful extensions which we will use in part 2
* Rasterizer construction is moved to the specific renderer instead of RendererBase.
Software rendering has been disable to achieve this but will be brought back in the next commit.
* video_core: Remove Init/Shutdown methods from renderer
* The constructor and destructor can do the same job
* In addition move opengl function loading to Qt since SDL already does this. Also remove ErrorVideoCore which is never reached
* citra_qt: Decouple software renderer from opengl part 1
* citra: Decouple software renderer from opengl part 2
* android: Decouple software renderer from opengl part 3
* swrasterizer: Decouple software renderer from opengl part 4
* This commit simply enforces the renderer naming conventions in the software renderer
* video_core: Move RendererBase to VideoCore
* video_core: De-globalize screenshot state
* video_core: Pass system to the renderers
* video_core: Commonize shader uniform data
* video_core: Abstract backend agnostic rasterizer operations
* bootmanager: Remove references to OpenGL for macOS
OpenGL macOS headers definitions clash heavily with each other
* citra_qt: Proper title for api settings
* video_core: Reduce boost usage
* bootmanager: Fix hide mouse option
Remove event handlers from RenderWidget for events that are
already handled by the parent GRenderWindow.
Also enable mouse tracking on the RenderWidget.
* android: Remove software from graphics api list
* code: Address review comments
* citra: Port per-game settings read
* Having to update the default value for all backends is a pain so lets centralize it
* android: Rename to OpenGLES
---------
Co-authored-by: MerryMage <MerryMage@users.noreply.github.com>
Co-authored-by: Vitor Kiguchi <vitor-kiguchi@hotmail.com>