Skip to content
Snippets Groups Projects
  1. Dec 30, 2019
    • Markus Wick's avatar
      video_core: Block in WaitFence. · cb9dd01f
      Markus Wick authored
      This function is called rarely and blocks quite often for a long time.
      So don't waste power and let the CPU sleep.
      
      This might also increase the performance as the other cores might be allowed to clock higher.
      cb9dd01f
  2. Nov 27, 2019
  3. Nov 25, 2019
  4. Oct 12, 2019
  5. Oct 04, 2019
  6. Sep 22, 2019
  7. Jul 05, 2019
  8. Apr 08, 2019
  9. Mar 24, 2019
    • Lioncash's avatar
      core/core_timing: Make callback parameters consistent · c5d41fd8
      Lioncash authored
      In some cases, our callbacks were using s64 as a parameter, and in other
      cases, they were using an int, which is inconsistent.
      
      To make all callbacks consistent, we can just use an s64 as the type for
      late cycles, given it gets rid of the need to cast internally.
      
      While we're at it, also resolve some signed/unsigned conversions that
      were occurring related to the callback registration.
      c5d41fd8
  10. Mar 07, 2019
  11. Feb 22, 2019
  12. Feb 21, 2019
    • Lioncash's avatar
      service/vi/vi_layer: Convert Layer struct into a class · fd157307
      Lioncash authored
      Like the previous changes made to the Display struct, this prepares the
      Layer struct for changes to its interface. Given Layer will be given
      more invariants in the future, we convert it into a class to better
      signify that.
      fd157307
    • Lioncash's avatar
      service/nvflinger: Move display specifics over to vi_display · fa4dc2cf
      Lioncash authored
      With the display and layer structures relocated to the vi service, we
      can begin giving these a proper interface before beginning to properly
      support the display types.
      
      This converts the display struct into a class and provides it with the
      necessary functions to preserve behavior within the NVFlinger class.
      fa4dc2cf
  13. Feb 19, 2019
    • Lioncash's avatar
      service/nvflinger: Relocate definitions of Layer and Display to the vi service · 8d5d369b
      Lioncash authored
      These are more closely related to the vi service as opposed to the
      intermediary nvflinger.
      
      This also places them in their relevant subfolder, as future changes to
      these will likely result in subclassing to represent various displays
      and services, as they're done within the service itself on hardware.
      
      The reasoning for prefixing the display and layer source files is to
      avoid potential clashing if two files with the same name are compiled
      (e.g. if 'display.cpp/.h' or 'layer.cpp/.h' is added to another service
      at any point), which MSVC will actually warn against. This prevents that
      case from occurring.
      
      This also presently coverts the std::array introduced within
      f45c25aa back to a std::vector to allow
      the forward declaration of the Display type. Forward declaring a type
      within a std::vector is allowed since the introduction of N4510
      (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4510.html) by
      Zhihao Yuan.
      8d5d369b
  14. Feb 16, 2019
    • Lioncash's avatar
      core_timing: Convert core timing into a class · bd983414
      Lioncash authored
      Gets rid of the largest set of mutable global state within the core.
      This also paves a way for eliminating usages of GetInstance() on the
      System class as a follow-up.
      
      Note that no behavioral changes have been made, and this simply extracts
      the functionality into a class. This also has the benefit of making
      dependencies on the core timing functionality explicit within the
      relevant interfaces.
      bd983414
  15. Feb 12, 2019
  16. Feb 05, 2019
  17. Jan 30, 2019
  18. Jan 03, 2019
  19. Nov 29, 2018
  20. Oct 30, 2018
  21. Sep 15, 2018
  22. Sep 11, 2018
    • Lioncash's avatar
      hle/service: Default constructors and destructors in the cpp file where applicable · 6ac955a0
      Lioncash authored
      When a destructor isn't defaulted into a cpp file, it can cause the use
      of forward declarations to seemingly fail to compile for non-obvious
      reasons. It also allows inlining of the construction/destruction logic
      all over the place where a constructor or destructor is invoked, which
      can lead to code bloat. This isn't so much a worry here, given the
      services won't be created and destroyed frequently.
      
      The cause of the above mentioned non-obvious errors can be demonstrated
      as follows:
      
      ------- Demonstrative example, if you know how the described error happens, skip forwards -------
      
      Assume we have the following in the header, which we'll call "thing.h":
      
      \#include <memory>
      
      // Forward declaration. For example purposes, assume the definition
      // of Object is in some header named "object.h"
      class Object;
      
      class Thing {
      public:
          // assume no constructors or destructors are specified here,
          // or the constructors/destructors are defined as:
          //
          // Thing() = default;
          // ~Thing() = default;
          //
      
          // ... Some interface member functions would be defined here
      
      private:
          std::shared_ptr<Object> obj;
      };
      
      If this header is included in a cpp file, (which we'll call "main.cpp"),
      this will result in a compilation error, because even though no
      destructor is specified, the destructor will still need to be generated by
      the compiler because std::shared_ptr's destructor is *not* trivial (in
      other words, it does something other than nothing), as std::shared_ptr's
      destructor needs to do two things:
      
      1. Decrement the shared reference count of the object being pointed to,
         and if the reference count decrements to zero,
      
      2. Free the Object instance's memory (aka deallocate the memory it's
         pointing to).
      
      And so the compiler generates the code for the destructor doing this inside main.cpp.
      
      Now, keep in mind, the Object forward declaration is not a complete type. All it
      does is tell the compiler "a type named Object exists" and allows us to
      use the name in certain situations to avoid a header dependency. So the
      compiler needs to generate destruction code for Object, but the compiler
      doesn't know *how* to destruct it. A forward declaration doesn't tell
      the compiler anything about Object's constructor or destructor. So, the
      compiler will issue an error in this case because it's undefined
      behavior to try and deallocate (or construct) an incomplete type and
      std::shared_ptr and std::unique_ptr make sure this isn't the case
      internally.
      
      Now, if we had defaulted the destructor in "thing.cpp", where we also
      include "object.h", this would never be an issue, as the destructor
      would only have its code generated in one place, and it would be in a
      place where the full class definition of Object would be visible to the
      compiler.
      
      ---------------------- End example ----------------------------
      
      Given these service classes are more than certainly going to change in
      the future, this defaults the constructors and destructors into the
      relevant cpp files to make the construction and destruction of all of
      the services consistent and unlikely to run into cases where forward
      declarations are indirectly causing compilation errors. It also has the
      plus of avoiding the need to rebuild several services if destruction
      logic changes, since it would only be necessary to recompile the single
      cpp file.
      6ac955a0
Loading