justingardner / mgl

A suite of mex/m files for displaying psychophysics stimuli
http://justingardner.net/mgl
Other
18 stars 22 forks source link

Commands batches and timing #95

Closed benjamin-heasly closed 8 months ago

benjamin-heasly commented 9 months ago

This branch represents a bunch (!) of recent work, including:

For an overview of the design changes, please see the new Metal App readme.

To run some existing tests, see the new timestamps, and compare timing of normal vs batched commands, you can try these:

mglTestRenderPipeline('runTests=1', 'batchMode=0')
mglTestRenderPipeline('runTests=1', 'batchMode=1')
mglTestRenderPipeline('runTests=2', 'batchMode=0')
mglTestRenderPipeline('runTests=2', 'batchMode=1')
mglTestRenderPipeline('runTests=3', 'batchMode=0')
mglTestRenderPipeline('runTests=3', 'batchMode=1')
mglTestRenderPipeline('runTests=4', 'batchMode=0')
mglTestRenderPipeline('runTests=4', 'batchMode=1')
mglTestRenderPipeline('runTests=5', 'batchMode=0')
mglTestRenderPipeline('runTests=5', 'batchMode=1')
benjamin-heasly commented 9 months ago

Today I also added a command to sample GPU and CPU times together, and Matlab code to use these samples to convert GPU timestamps to CPU time.

The tests with mglTestRenderPipeline should still work the same as above.