all repos — mgba @ ccdbcf6f0b45727bff078f5473e21a397bd01b1d

mGBA Game Boy Advance Emulator

Tools: Allow using threaded renderer in perf.py
Vicki Pfau vi@endrift.com
Thu, 02 Jan 2020 18:38:11 -0800
commit

ccdbcf6f0b45727bff078f5473e21a397bd01b1d

parent

3552750768616043ab308d7e11c4a358094cfb79

2 files changed, 14 insertions(+), 3 deletions(-)

jump to
M CHANGESCHANGES

@@ -116,6 +116,7 @@ - Debugger: Separate aliases from main commands

- Debugger: Print break-/watchpoint ID when breaking in CLI - SDL: Use controller GUID instead of name - SM83: Rename LR35902 to SM83 + - Tools: Allow using threaded renderer in perf.py 0.8 beta 1: (2019-10-20) - Initial beta for 0.8
M tools/perf.pytools/perf.py

@@ -28,8 +28,10 @@

def run(self, cwd): args = [os.path.join(os.getcwd(), self.EXECUTABLE), '-P'] args.extend(self.get_args()) - if self.renderer != 'software': + if not self.renderer: args.append('-N') + elif self.renderer == 'threaded-software': + args.append('-T') args.append(self.rom) env = {} if 'LD_LIBRARY_PATH' in os.environ:

@@ -91,8 +93,10 @@ server_command = [os.path.join(os.getcwd(), PerfTest.EXECUTABLE)]

server_command.extend(['--', '-PD', '0']) if hasattr(test, "frames"): server_command.extend(['-F', str(test.frames)]) - if test.renderer != "software": + if not test.renderer: server_command.append('-N') + elif test.renderer == 'threaded-software': + server_command.append('-T') subprocess.check_call(server_command) time.sleep(4) self.socket = socket.create_connection(self.address, timeout=1000)

@@ -170,13 +174,19 @@ parser = argparse.ArgumentParser()

parser.add_argument('-w', '--wall-time', type=float, default=0, metavar='TIME', help='wall-clock time') parser.add_argument('-g', '--game-frames', type=int, default=0, metavar='FRAMES', help='game-clock frames') parser.add_argument('-N', '--disable-renderer', action='store_const', const=True, help='disable video rendering') + parser.add_argument('-T', '--threaded-renderer', action='store_const', const=True, help='threaded video rendering') parser.add_argument('-s', '--server', metavar='ADDRESS', help='run on server') parser.add_argument('-S', '--server-command', metavar='COMMAND', help='command to launch server') parser.add_argument('-o', '--out', metavar='FILE', help='output file path') parser.add_argument('directory', help='directory containing ROM files') args = parser.parse_args() - s = Suite(args.directory, wall=args.wall_time, game=args.game_frames, renderer=None if args.disable_renderer else 'software') + renderer = 'software' + if args.disable_renderer: + renderer = None + elif args.threaded_renderer: + renderer = 'threaded-software' + s = Suite(args.directory, wall=args.wall_time, game=args.game_frames, renderer=renderer) if args.server: if args.server_command: server = PerfServer(args.server, args.server_command)