mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-18 03:43:03 +00:00
tests: add gem_tiled_swapping
Also add a drmtest_exchange_int helper, might come handy at other places. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -333,6 +333,16 @@ void drmtest_stop_signal_helper(void)
|
||||
}
|
||||
|
||||
/* other helpers */
|
||||
void drmtest_exchange_int(void *array, unsigned i, unsigned j)
|
||||
{
|
||||
int *int_arr, tmp;
|
||||
int_arr = array;
|
||||
|
||||
tmp = int_arr[i];
|
||||
int_arr[i] = int_arr[j];
|
||||
int_arr[j] = tmp;
|
||||
}
|
||||
|
||||
void drmtest_permute_array(void *array, unsigned size,
|
||||
void (*exchange_func)(void *array,
|
||||
unsigned i,
|
||||
|
||||
@@ -55,6 +55,7 @@ uint64_t gem_mappable_aperture_size(void);
|
||||
/* generally useful helpers */
|
||||
void drmtest_fork_signal_helper(void);
|
||||
void drmtest_stop_signal_helper(void);
|
||||
void drmtest_exchange_int(void *array, unsigned i, unsigned j);
|
||||
void drmtest_permute_array(void *array, unsigned size,
|
||||
void (*exchange_func)(void *array,
|
||||
unsigned i,
|
||||
|
||||
Reference in New Issue
Block a user