Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header file refactoring and cleaning #5178

Merged
merged 5 commits into from Jun 25, 2019

Conversation

kukkamario
Copy link
Contributor

@kukkamario kukkamario commented Sep 25, 2018

  • Split Emu/Memory into more logical headers
    • Add vm_locking.h and vm_reservation.h and move relevant functions
      and types to these headers.
    • Change include order and make vm_ptr.h, vm_var.h and vm_ref.h headers
      usable invidually and them including vm.h instead of other way around
    • Because usage of vm::ptr now requires including vm_ptr.h instead of
      vm.h updated multiple #includes
    • Added additional #includes to vm_reservation.h and vm_locking to
      where vm::reservation_* and locking related functions are used
  • Add missing #includes to header files
    • Multiple header files where missing #includes to other headers that
      where used in the header. Correct header was included in correct
      order in source files which caused everything to compile.
    • Added missing #includes so header files correctly include all their
      dependencies and fixes problems with IDEs being unable to parse
      headers correctly due to missing symbols
  • Removed unnecessary includes
    • Manually went through most of the source and header files and tried to find include directives to headers that were not required for compiling that file.
    • Focused most on RSX because it seemed to have most unnecessary includes and large include lists
    • Focused on removing includes that are completely unused by the file
      • Removing includes that are duplicates because of some other required header including the same header is not necessary. They don't affect compile times and don't introduce unnecessary symbols to the compile unit. Also files shouldn't rely on other headers including headers they need.

rpcs3/Emu/RSX/Common/texture_cache.h Outdated Show resolved Hide resolved
rpcs3/Emu/RSX/GL/GLGSRender.h Outdated Show resolved Hide resolved
rpcs3/Emu/RSX/GL/GLProgramBuffer.h Outdated Show resolved Hide resolved
rpcs3/Emu/RSX/GL/GLTextureCache.h Outdated Show resolved Hide resolved
rpcs3/Emu/RSX/GL/GLTextureCache.h Outdated Show resolved Hide resolved
@kukkamario kukkamario force-pushed the feature/header_refactor branch 4 times, most recently from 9ee683c to 9b203a2 Compare September 28, 2018 22:24
@kukkamario kukkamario changed the title WIP: Header file refactoring and cleaning Header file refactoring and cleaning Sep 28, 2018
@kukkamario
Copy link
Contributor Author

Went manually through most of the files to remove most of the unnecessary #includes

Moved enum class texture_dimension_extended from RSXTexture.h to gcm_enums.h because it allowed a couple headers to drop include to RSXTexture.h

Removed 'WIP' tag

@kd-11
Copy link
Contributor

kd-11 commented Oct 3, 2018

RSX/GCM changes are good, but will need review by other developers before merge as it touches well outside my purview.

@AniLeo
Copy link
Member

AniLeo commented Oct 3, 2018

Also needs conflicts to be solved (cellAudio.h) and rebase

@kukkamario
Copy link
Contributor Author

kukkamario commented Oct 3, 2018

Rebased.

Only non-trivial changes outside RSX are Emu/Memory refactoring in the first commit.

@kukkamario kukkamario force-pushed the feature/header_refactor branch 4 times, most recently from 6a90908 to c215f8f Compare October 4, 2018 18:02
Copy link
Contributor

@kd-11 kd-11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSX side of things was resolved and is ok, but this still needs reviews from multiple other contributors.

rpcs3/Emu/CMakeLists.txt Outdated Show resolved Hide resolved
@Zangetsu38
Copy link
Contributor

Need rebase and fix few conflict

@Megamouse
Copy link
Contributor

@kukkamario do you want to try again?
Sorry it wasn't merged.

@kukkamario
Copy link
Contributor Author

kukkamario commented May 6, 2019

I'll try to check, is this still salvageable pull request next week.

I'm busy this week and there are lot of conflicts.

@scribam
Copy link
Contributor

scribam commented Jun 22, 2019

@kukkamario Any update on this?

- Add vm_locking.h and vm_reservation.h and move relevant functions
  and types to these headers.
- Change include order and make vm_ptr.h, vm_var.h and vm_ref.h headers
  usable invidually and them including vm.h instead of other way around
- Because usage of vm::ptr now requires including vm_ptr.h instead of
  vm.h updated multiple #includes
- Added additional #includes to vm_reservation.h and vm_locking to
  where vm::reservation_* and locking related functions are used
@kukkamario kukkamario force-pushed the feature/header_refactor branch 2 times, most recently from 3ff5a92 to 88e1ca0 Compare June 24, 2019 21:22
@kukkamario
Copy link
Contributor Author

Okey... I finally had time to spend full day with updating my development setup and rebasing this.

- Multiple header files where missing #includes to other headers that
  where used in the header. Correct header was included in correct
  order in source files which caused everything to compile.
- Added missing #includes so header files correctly include all their
  dependencies and fixes problems with IDEs being unable to parse
  headers correctly due to missing symbols
- Manually removed lot of unneeded #includes to clean code and reduce
  compilation time
- Reordered some of the #includes to be in more logical order
@Nekotekina Nekotekina merged commit c963c51 into RPCS3:master Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants