This file is indexed.

/usr/share/psychtoolbox-3/PsychTests/DatapixxGPUDitherpatternTest.m is in psychtoolbox-3-common 3.0.12.20160126.dfsg1-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
function DatapixxGPUDitherpatternTest(fullscreen)
% DatapixxGPUDitherpatternTest([fullscreen=1])
%
% Low level diagnostic for GPU dithering via Datapixx.
%
% Steps through all 256 grayscale levels and uses
% Datapixx et al. scanline readback to check what
% the GPU actually outputs. Plots it and prints
% the first 10 pixels of the topmost output scanline.
%
% This is meant to facilitate low-level diagnosis
% of GPU dithering bugs if our regular test script
% BitsPlusIdentityClutTest.m reports dithering trouble
% and can't fix the problem automatically.
%
% 'fullscreen' Defaults to 1 for fullscreen windows.
% 0 = Use a windowed window at top of screen for
% display to also diagnose possible compositor
% interference.
%

% History:
% 13-Aug-2015  mk  Wrote it.

PsychDefaultSetup(0);
Datapixx('Open');

if nargin < 1 || isempty(fullscreen)
  fullscreen = 1;
end

screenid = max(Screen('Screens'));

if fullscreen
  rect = [];
else
  rect = [0, 0, Screen('WindowSize', screenid), 90];
end

w = Screen('Openwindow', screenid, 0, rect);
LoadIdentityClut(w);

even = zeros(1,256);
odd  = even;

for i = 0:255
  Screen('FillRect', w, i);
  Screen('Flip', w);
  Datapixx('RegWrRdVideoSync');
  Datapixx('RegWrRdVideoSync');
  Datapixx('RegWrRdVideoSync');
  pixels = Datapixx('GetVideoLine');
  pixels = pixels(1,1:10);
  fprintf('Ref %i: ', i);
  fprintf('%i ', pixels);
  fprintf('\n');
  even(i+1) = pixels(1,1);
  odd(i+1) = pixels(1, 2);
end

Datapixx('Close');
sca;

close all;
plot(0:255, even, 'r', 0:255, odd, 'g');

return;