Skip to content
Snippets Groups Projects
  1. Mar 15, 2019
  2. Mar 13, 2019
  3. Mar 12, 2019
  4. Mar 11, 2019
    • Lioncash's avatar
      renderer_opengl/gl_global_cache: Replace indexing for assignment with insert_or_assign · 3350c0a7
      Lioncash authored
      The previous code had some minor issues with it, really not a big deal,
      but amending it is basically 'free', so I figured, "why not?".
      
      With the standard container maps, when:
      
      map[key] = thing;
      
      is done, this can cause potentially undesirable behavior in certain
      scenarios. In particular, if there's no value associated with the key,
      then the map constructs a default initialized instance of the value
      type.
      
      In this case, since it's a std::shared_ptr (as a type alias) that is
      the value type, this will construct a std::shared_pointer, and then
      assign over it (with objects that are quite large, or actively heap
      allocate this can be extremely undesirable).
      
      We also make the function take the region by value, as we can avoid a
      copy (and by extension with std::shared_ptr, a copy causes an atomic
      reference count increment), in certain scenarios when ownership isn't a
      concern (i.e. when ReserveGlobalRegion is called with an rvalue
      reference, then no copy at all occurs). So, it's more-or-less a "free"
      gain without many downsides.
      3350c0a7
    • Lioncash's avatar
      renderer_opengl/gl_global_cache: Append missing override specifiers · 1070c020
      Lioncash authored
      Two of the functions here are overridden functions, so we can append
      these specifiers to make it explicit.
      1070c020
    • Lioncash's avatar
      kernel/server_port: Make data members private · aa44eb63
      Lioncash authored
      With this, all kernel objects finally have all of their data members
      behind an interface, making it nicer to reason about interactions with
      other code (as external code no longer has the freedom to totally alter
      internals and potentially messing up invariants).
      aa44eb63
    • ReinUsesLisp's avatar
  5. Mar 10, 2019
  6. Mar 09, 2019
  7. Mar 08, 2019
    • ReinUsesLisp's avatar
      dma_pusher: Store command_list_header by copy · e7ac5a6a
      ReinUsesLisp authored
      Instead of holding a reference that will get invalidated by
      dma_pushbuffer.pop(), hold it as a copy. This doesn't have any
      performance cost since CommandListHeader is 8 bytes long.
      e7ac5a6a
    • Lioncash's avatar
      kernel/hle_ipc: Convert std::shared_ptr IPC header instances to std::optional · fbb82e61
      Lioncash authored
      There's no real need to use a shared lifetime here, since we don't
      actually expose them to anything else. This is also kind of an
      unnecessary use of the heap given the objects themselves are so small;
      small enough, in fact that changing over to optionals actually reduces
      the overall size of the HLERequestContext struct (818 bytes to 808
      bytes).
      fbb82e61
    • Lioncash's avatar
      kernel: Make the address arbiter instance per-process · 8e510d5a
      Lioncash authored
      Now that we have the address arbiter extracted to its own class, we can
      fix an innaccuracy with the kernel. Said inaccuracy being that there
      isn't only one address arbiter. Each process instance contains its own
      AddressArbiter instance in the actual kernel.
      
      This fixes that and gets rid of another long-standing issue that could
      arise when attempting to create more than one process.
      8e510d5a
    • Lioncash's avatar
      kernel/svc: Move address arbiter signaling behind a unified API function · b7f331af
      Lioncash authored
      Similar to how WaitForAddress was isolated to its own function, we can
      also move the necessary conditional checking into the address arbiter
      class itself, allowing us to hide the implementation details of it from
      public use.
      b7f331af
    • Lioncash's avatar
      kernel/svc: Move address arbiter waiting behind a unified API function · 0209de12
      Lioncash authored
      Rather than let the service call itself work out which function is the
      proper one to call, we can make that a behavior of the arbiter itself,
      so we don't need to directly expose those implementation details.
      0209de12
  8. Mar 07, 2019
Loading