- wrapper = _get_build_path('glxtrace.so')
- env['LD_PRELOAD'] = wrapper
-
- env['TRACE_FILE'] = self.trace_file
+ apitrace = _get_build_program('apitrace')
+ cmd = [
+ apitrace, 'trace',
+ '--api', self.api_map[self.api],
+ '--output', self.trace_file,
+ '--'
+ ] + cmd