Commit graph

9115 commits

Author SHA1 Message Date
Pengfei Zhu
77ffe37c46
Merge pull request #5247 from lioncash/copy3
swrasterizer/proctex: Take regs by const reference
2020-04-24 22:07:03 +08:00
Vitor Kiguchi
e6b4052b04 MSVC: set SDL_VER to 2.0.12 2020-04-23 00:07:10 -03:00
Ben
39463f1f6d
ArmInterface: return ref instead of copy for GetTimer (#5227)
* ArmInterface: return ref instead of copy for GetTimer

* ArmInterface: add const ref GetTimer

* ArmInterface: return raw pointer instead of shared_ptr in GetTimer

* remove more unnecessary shared_ptr usage

* Fix save states

* fix unit tests
2020-04-22 07:44:58 +02:00
xperia64
3a1601a534 Change audio_frame_ticks with length explanation 2020-04-21 23:40:34 -04:00
xperia64
38c3c9c74b
Add sample rate field to AAC decoder (#5195)
* Add sample rate field to AAC decoder

* Fix TODO comment

* Remove unneeded conversion
2020-04-21 20:34:50 -05:00
Mat M
8b43dff849
gl_shader_gen: Convert file-scope std::string into a std::string_view (#5263)
Same behavior, no heap allocations at program start up
2020-04-21 20:31:58 -05:00
Marshall Mohror
db5b8b9c88
video_core: reduce string allocations in shader decompiler (#5261)
* video_core: reduce string allocations in shader decompiler

* use append for indentation instead of resize

Co-authored-by: Mat M. <mathew1800@gmail.com>
2020-04-20 22:08:58 -05:00
Mat M
b82d4315fe
custom_tex_cache: Remove reliance on the global system instance (#5252)
Removes direct usages of Core::System::GetInstance() and instead passes
the direct necessities through the interface.
2020-04-20 21:50:16 -05:00
Hamish Milne
6783289909 CR actions 2020-04-20 16:30:49 +01:00
Hamish Milne
55c9162d02 Clean up the Callback (don't store a shared_ptr to parent) 2020-04-20 16:29:50 +01:00
Hamish Milne
d5a962cb81
Fix savestates compatibility (#5256)
* Fix savestates compatibility
2020-04-20 16:21:37 +02:00
Sebastian Valle
3597921ec5
Merge pull request #5235 from lioncash/move
ipc_helpers: Make PushStaticBuffer take std::vector by value
2020-04-19 21:51:52 -05:00
Sebastian Valle
bcc80d0871
Merge pull request #5243 from lioncash/move2
geometry_pipeline: std::move vertex handler in SetVertexHandler()
2020-04-19 21:48:48 -05:00
Sebastian Valle
1469ad339c
Merge pull request #5244 from lioncash/move3
gl_shader_manager: std::move std::string where applicable
2020-04-19 21:48:15 -05:00
Sebastian Valle
acf18ce4dd
Merge pull request #5245 from lioncash/guard
video_core: Add missing header guards
2020-04-19 21:47:45 -05:00
Sebastian Valle
df92b37bbf
Merge pull request #5248 from lioncash/view
post_processing_opengl: Make use of std::string_view with GetPostProcessingShaderCode()
2020-04-19 21:46:48 -05:00
Ben
0f72dd6d85
Merge pull request #5250 from lioncash/build
core/memory: Fix #5246
2020-04-19 19:39:32 +02:00
Ben
ca722f1bb1
Merge pull request #5242 from lioncash/noexcept
gl_resource_manager: Make use of noexcept on move assignment and move constructors
2020-04-19 16:56:24 +02:00
Ben
362956a69b
Merge pull request #5240 from lioncash/primitive
primitive_assembly: Minor changes
2020-04-19 16:55:56 +02:00
Ben
1856752b61
Merge pull request #5203 from Subv/apt_title_allowed
Services/APT: Implemented the IsTitleAllowed function.
2020-04-19 16:50:47 +02:00
Ben
08dddbac4c
Merge pull request #5239 from lioncash/fwd
video_core: Amend misplaced forward declarations
2020-04-19 12:12:22 +02:00
Ben
182aa1e39d
Merge pull request #5238 from lioncash/return
kernel/shared_page: Silence missing return warning in GetInitTime()
2020-04-19 11:31:45 +02:00
Mat M
8014c67faa
service: Resolve trivially avoidable copies (#5237)
* am/am: Avoid redundant copy in GetProgramInfoFromCia()

We can just use a reference to the title metadata. Avoids copying
several data entries and std::vector instances that don't need to be
copied.

* hle/service: Avoid redundant copying of std::string

GetUserPath() returns the path as a reference, so we can make use of
said reference to avoid making copies.
2020-04-19 09:24:37 +02:00
Mat M
e54b640e0b
nwm/nwm_uds: Avoid copying all elements in channel_data map where applicable (#5236)
By using a reference here, we avoid copying every single element in the
map, each of which contains a std::share_ptr and std::deque containing
std::vectors.
2020-04-19 07:57:57 +02:00
Lioncash
99eedced4a core/memory: Fix #5246
We can simplify the overload sent to be less confusing (and
error-prone), while also unbreaking 32-bit builds.
2020-04-19 01:56:03 -04:00
Lioncash
623cc926ed post_processing_opengl: Make use of std::string_view with GetPostProcessingShaderCode()
Same behavior, but doesn't result in an allocating copy of the passed in
string. Particularly given the string is only compared against other
existing strings.
2020-04-18 22:27:44 -04:00
Lioncash
e2533e8edb swrasterizer/proctex: Take regs and state by const reference
Avoids unnecessarily copying 512 bytes and 3584 bytes upon every
invocation.
2020-04-18 22:16:05 -04:00
Lioncash
82b55b763c swrasterizer/proctex: Make CombineAndMap() internally linked
This isn't used outside of this source file, so it can be marked
internally linked.
2020-04-18 22:09:36 -04:00
Lioncash
7a3d4d7642 video_core: Add missing header guards
Ensures errors related to multiple inclusions never happen.
2020-04-18 22:06:37 -04:00
Lioncash
c72d9b806b gl_shader_manager: std::move std::string where applicable
Prevents unnecessary copies from occurring. In the case of ShaderCache,
we can just remove the parameter, given it's unused.
2020-04-18 21:40:21 -04:00
Lioncash
12d4c835db geometry_pipeline: std::move vertex handler in SetVertexHandler()
std::function is allowed to internally allocate, so this prevents
potential reallocations from occurring, should that case ever happen.
2020-04-18 21:26:47 -04:00
Lioncash
12279b22cc gl_resource_manager: Make use of noexcept on move assignment and move constructors
Several standard constructors generally check if objects can be moved in
a non-throwing manner (usually via std::move_if_noexcept) to preserve
its exception guarantees. This means that if these were used with
certain containers any reallocations internally would cause resource
churn, as copies would be necessary instead of moves.

This way, if they're every used in that manner, the right behavior is
always performed.
2020-04-18 21:12:03 -04:00
Pengfei Zhu
b96b7ab3f6
Merge pull request #5232 from lioncash/sign
core/memory: Resolve sign conversion in serialize()
2020-04-19 08:45:44 +08:00
Lioncash
2cefd16850 primitive_assembly: Mark constructor explicit
Prevents any implicit constructions from occurring, given the
constructor isn't a converting constructor.
2020-04-18 20:42:39 -04:00
Lioncash
59bb84b86c primitive_assembly: Take triangle_handler by reference
Avoids copying the std::function when we don't need to. Particularly
given the std::function isn't actually stored anywhere, so there's no
need to move it.
2020-04-18 20:40:45 -04:00
Lioncash
e38e79e27e primitive_assembly: Make use of std::array where applicable
Same behavior, minus any potential implicit array to pointer decay.
2020-04-18 20:39:07 -04:00
Lioncash
dd2a86bed1 video_core: Amend misplaced forward declarations
ShaderProgramManager was placed within the wrong namespace. Backend
simply isn't necessary, so it can be removed.
2020-04-18 20:12:22 -04:00
Lioncash
f7ad004fb0 kernel/shared_page: Silence missing return warning in GetInitTime()
We can use UNREACHABLE_MSG to indicate that this path isn't intended to
be reached, as it would indicate a wrong enum value.
2020-04-18 19:48:54 -04:00
Lioncash
7eabcdf1c3 apt/applet_manager: std::move parameter in GlanceParameter()
Same behavior, minus a redundant copy.
2020-04-18 19:22:03 -04:00
Lioncash
a6e37b48e9 ipc_helpers: Make PushStaticBuffer take std::vector by value
Allows interfaces to move the vector into the calls, avoiding any
reallocations.

Many existing call sites already std::move into the parameter, expecting
a move to occur. Only a few remain where this wasn't already
being done, which we can convert over.
2020-04-18 19:17:11 -04:00
Lioncash
8b22c80ba2 core/memory: Resolve sign conversion in serialize()
auto i = 0 deduces to an int, which was being compared with a size_t
within the loop condition.
2020-04-18 18:50:40 -04:00
Hamish Milne
397bd1bb73
Fix MIC_U serialization and timing (#5223)
* Fix MIC_U serialization and timing

* Better sample rate conversion

* Actually should be every 15 samples

* Reduce rounding errors
2020-04-18 20:52:56 +02:00
Sebastian Valle
75c9784239
Services/APT: Implemented the GetCaptureInfo function. (#5194)
This one is similar to the ReceiveCaptureBufferInfo function except it doesn't clear the capture buffer, according to 3dbrew.

This function is used by the Home Menu
2020-04-18 20:48:09 +02:00
Merry
c8a503b10f
CMakeLists: Only compile A32 frontend for dynarmic (#5229) 2020-04-18 20:45:07 +02:00
Hamish Milne
c5a3bf9728 Fix clang format 2020-04-18 15:14:01 +01:00
Hamish Milne
1fb3c9f08c Fix Address Arbiter serialization 2020-04-18 15:10:54 +01:00
B3n30
922a5f738a fix typo; updated comment about apples bad driver 2020-04-18 15:55:19 +02:00
B3n30
1e54f27cde Add flag to disable seperable shaders for osx Intel GPUs. Default is false 2020-04-18 13:37:58 +02:00
Hamish Milne
79a0cbbba8
Update dynarmic (#5214)
* Update dynarmic

* Really update the submodule
2020-04-18 08:52:15 +02:00
Subv
07f49e588e Services/APT: Implemented the IsTitleAllowed function.
The Home Menu uses this to determine whether it is allowed to launch an app (call StartApplication)

This is a no-op for us, we allow any and all titles to be launched. The official APT module holds a list of some forbidden titles like some versions of IronFall and Flipnote Studio 3D.
2020-04-18 00:26:08 -05:00