GPU registers on iMac

dear mario
i used your custom version of Screen.mex to dump the registers on my iMac (Retina 5K, 27-inch, Late 2014).
see below. Again I see no change in the registers.
Best
Denis

with Native10BitFramebuffer

PTB-ERROR: LUTBypassReg = 0.
PTB-ERROR: GRPHCONReg = a40610e.
PTB-ERROR: mmFMT_BIT_DEPTH_CONTROL = 0.
PTB-ERROR: mmFMT_CLAMP_CNTL = 20000.
PTB-ERROR: mmFMT_CONTROL = 0.
PTB-ERROR: mmFMT_DYNAMIC_EXP_CNTL = 0.
- ColorCal2 connected
PTB-ERROR: LUTBypassReg = 0.
PTB-ERROR: GRPHCONReg = a40610e.
PTB-ERROR: mmFMT_BIT_DEPTH_CONTROL = 0.
PTB-ERROR: mmFMT_CLAMP_CNTL = 20000.
PTB-ERROR: mmFMT_CONTROL = 0.
PTB-ERROR: mmFMT_DYNAMIC_EXP_CNTL = 0.

without Native10BitFramebuffer

PTB-ERROR: LUTBypassReg = 0.
PTB-ERROR: GRPHCONReg = a40610e.
PTB-ERROR: mmFMT_BIT_DEPTH_CONTROL = 0.
PTB-ERROR: mmFMT_CLAMP_CNTL = 20000.
PTB-ERROR: mmFMT_CONTROL = 0.
PTB-ERROR: mmFMT_DYNAMIC_EXP_CNTL = 0.
PTB-ERROR: LUTBypassReg = 0.
PTB-ERROR: GRPHCONReg = a40610e.
PTB-ERROR: mmFMT_BIT_DEPTH_CONTROL = 0.
PTB-ERROR: mmFMT_CLAMP_CNTL = 20000.
PTB-ERROR: mmFMT_CONTROL = 0.
PTB-ERROR: mmFMT_DYNAMIC_EXP_CNTL = 0.

COMPLETE PRINT OUT

>> MeasureLuminancePrecisionPTB-INFO: Connection to Psychtoolbox kernel support driver instance #0 (Revision 1) established.PTB-INFO: Connection to Psychtoolbox kernel support driver instance #1 (Revision 1) established.PTB-INFO: Disconnecting from kernel driver instance #1 for detected Intel GPU for safety reasons. setenv('PSYCH_ALLOW_DANGEROUS', '1') to override.

PTB-INFO: This is Psychtoolbox-3 for Apple OS X, under Matlab 64-Bit (Version 3.0.14 - Build date: May 6 2017).PTB-INFO: Support status on this operating system release: OSX 10.12 minimally supported and tested.PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, withPTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.
PTB-INFO: Trying to enable 16 bpc / 64 bpp half-float framebuffer to approximate requested 10 bpc, 30 bpp integer framebuffer.PTB-INFO: OSX native floating point 16 bit per color framebuffer requested, and the OS claims it is working fine. Good.PTB-INFO: Please note that the effective linear output precision will be *much* lower, e.g., only at most 10 bpc for 16 bpc float.PTB-INFO: Also, only some very limited subset of Apple hardware can actually output 10 bpc precision on a few displays.PTB-INFO: As of the year 2016, only the MacPro 2013, and iMac Retina 5k models from late 2014 and late 2015 are claimedPTB-INFO: by Apple, but *not* verified by us, to support 10 bit output on some supported displays under some conditions!PTB-INFO: Floating point precision framebuffer enabled.PTB-INFO: Real (OS native, queried) color resolution of the GPU framebuffer is 16 bits per RGB color component.

PTB-INFO: OpenGL-Renderer is ATI Technologies Inc. :: AMD Radeon R9 M290X OpenGL Engine :: 2.1 ATI-1.50.38PTB-INFO: Renderer has 2048 MB of VRAM and a maximum 1965 MB of texture memory.PTB-INFO: VBL startline = 1800 , VBL Endline = -1PTB-INFO: Beamposition queries unsupported or defective on this system. Using basic timestamping as fallback.PTB-INFO: Timestamps returned by Screen('Flip') will be therefore less robust and accurate.PTB-INFO: Measured monitor refresh interval from VBLsync = 0.000000 ms [inf Hz]. (0 valid samples taken, stddev=0.000000 ms.)PTB-INFO: Small deviations between reported values are normal and no reason to worry.PTB-INFO: All display tests and calibrations disabled. Assuming a refresh interval of 60.000000 Hz. Timing will be inaccurate!PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1061 ...PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus drawing. Alpha blending should work correctly.PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus post-processing (if any).LoadIdentityClut: Info: Used GPU low-level setup code to configure (hopefully) perfect identity pixel passthrough.Display driver: AMD version 6.0, "Southern Islands"Difference between identity and read-back of default CLUT: mean 0.000000010, sd 0.000000008PTB-WARNING: DrawText: Failed to load external drawtext plugin [dlopen(/Users/Shared/Psychtoolbox/PsychBasic/PsychPlugins/libptbdrawtext_ftgl64.dylib, 10): Library not loaded: /opt/X11/lib/libfreetype.6.dylib Referenced from: /Users/Shared/Psychtoolbox/PsychBasic/PsychPlugins/libptbdrawtext_ftgl64.dylib Reason: Incompatible library version: libptbdrawtext_ftgl64.dylib requires version 19.0.0 or later, but libfreetype.6.dylib provides version 18.0.0]. Retrying under generic name [libptbdrawtext_ftgl64.dylib].PTB-WARNING: DrawText: Failed to load external drawtext plugin 'libptbdrawtext_ftgl64.dylib' [dlopen(libptbdrawtext_ftgl64.dylib, 10): image not found]. Reverting to legacy text renderer.PTB-WARNING: DrawText: Functionality of Screen('DrawText') and Screen('TextBounds') may be limited and text quality may be impaired.PTB-WARNING: DrawText: Type 'help DrawTextPlugin' at the command prompt to receive instructions for troubleshooting.
PTB-ERROR: LUTBypassReg = 0.PTB-ERROR: GRPHCONReg = a40610e.PTB-ERROR: mmFMT_BIT_DEPTH_CONTROL = 0.PTB-ERROR: mmFMT_CLAMP_CNTL = 20000.PTB-ERROR: mmFMT_CONTROL = 0.PTB-ERROR: mmFMT_DYNAMIC_EXP_CNTL = 0.- ColorCal2 connectedPTB-ERROR: LUTBypassReg = 0.PTB-ERROR: GRPHCONReg = a40610e.PTB-ERROR: mmFMT_BIT_DEPTH_CONTROL = 0.PTB-ERROR: mmFMT_CLAMP_CNTL = 20000.PTB-ERROR: mmFMT_CONTROL = 0.PTB-ERROR: mmFMT_DYNAMIC_EXP_CNTL = 0.

INFO: PTB's Screen('Flip', 10) command seems to have missed the requested stimulus presentation deadlineINFO: a total of 2 times out of a total of 7 flips during this session.
INFO: This number is fairly accurate (and indicative of real timing problems in your own code or your system)INFO: if you provided requested stimulus onset times with the 'when' argument of Screen('Flip', window [, when]);INFO: If you called Screen('Flip', window); without the 'when' argument, this count is more of a ''mild'' indicatorINFO: of timing behaviour than a hard reliable measurement. Large numbers may indicate problems and should at leastINFO: deserve your closer attention. Cfe. 'help SyncTrouble', the FAQ section at www.psychtoolbox.org and theINFO: examples in the PDF presentation in PsychDocumentation/Psychtoolbox3-Slides.pdf for more info and timing tips.


WARNING: This session of your experiment was run by you with the setting Screen('Preference', 'SkipSyncTests', 2).WARNING: This means that some internal self-tests and calibrations were skipped. Your stimulus presentation timingWARNING: may have been wrong. This is fine for development and debugging of your experiment, but for running the realWARNING: study, please make sure to set Screen('Preference', 'SkipSyncTests', 0) for maximum accuracy and reliability.min sd 0.81 at 7 bits -0.6000 shift; sd NaN at 11 bits 0.0000 shiftPhotometer took 7.6 s/luminance.
ans =
struct with fields:
luminances: 2 reciprocalOfFraction: 128 vBase: 0.8000 patchWidthPixels: 0 useDithering: [] use10Bits: 1 usePhotometer: 1 useShuffle: 0 removeDaylight: 0 wigglePixelNotCLUT: 1 loadIdentityCLUT: 1 enableCLUTMapping: 0 CLUTMapSize: 4096 useFractionOfScreen: 0 callScreenNullForMario: 1 slowly: 0 ditheringCode: 61696 data: [1×1 struct]
>> MeasureLuminancePrecision

PTB-INFO: This is Psychtoolbox-3 for Apple OS X, under Matlab 64-Bit (Version 3.0.14 - Build date: May 6 2017).PTB-INFO: Support status on this operating system release: OSX 10.12 minimally supported and tested.PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, withPTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.


PTB-INFO: OpenGL-Renderer is ATI Technologies Inc. :: AMD Radeon R9 M290X OpenGL Engine :: 2.1 ATI-1.50.38PTB-INFO: Renderer has 2048 MB of VRAM and a maximum 1965 MB of texture memory.PTB-INFO: VBL startline = 1800 , VBL Endline = -1PTB-INFO: Beamposition queries unsupported or defective on this system. Using basic timestamping as fallback.PTB-INFO: Timestamps returned by Screen('Flip') will be therefore less robust and accurate.PTB-INFO: Measured monitor refresh interval from VBLsync = 0.000000 ms [inf Hz]. (0 valid samples taken, stddev=0.000000 ms.)PTB-INFO: Small deviations between reported values are normal and no reason to worry.PTB-INFO: All display tests and calibrations disabled. Assuming a refresh interval of 60.000000 Hz. Timing will be inaccurate!Display driver: AMD version 6.0, "Southern Islands"Difference between identity and read-back of default CLUT: mean 0.000000010, sd 0.000000008PTB-ERROR: LUTBypassReg = 0.PTB-ERROR: GRPHCONReg = a40610e.PTB-ERROR: mmFMT_BIT_DEPTH_CONTROL = 0.PTB-ERROR: mmFMT_CLAMP_CNTL = 20000.PTB-ERROR: mmFMT_CONTROL = 0.PTB-ERROR: mmFMT_DYNAMIC_EXP_CNTL = 0.PTB-ERROR: LUTBypassReg = 0.PTB-ERROR: GRPHCONReg = a40610e.PTB-ERROR: mmFMT_BIT_DEPTH_CONTROL = 0.PTB-ERROR: mmFMT_CLAMP_CNTL = 20000.PTB-ERROR: mmFMT_CONTROL = 0.PTB-ERROR: mmFMT_DYNAMIC_EXP_CNTL = 0.

WARNING: This session of your experiment was run by you with the setting Screen('Preference', 'SkipSyncTests', 2).WARNING: This means that some internal self-tests and calibrations were skipped. Your stimulus presentation timingWARNING: may have been wrong. This is fine for development and debugging of your experiment, but for running the realWARNING: study, please make sure to set Screen('Preference', 'SkipSyncTests', 0) for maximum accuracy and reliability.min sd 0.81 at 7 bits -0.6000 shift; sd NaN at 11 bits 0.0000 shiftPhotometer took 7.4 s/luminance.
ans =
struct with fields:
luminances: 2 reciprocalOfFraction: 128 vBase: 0.8000 patchWidthPixels: 0 useDithering: [] use10Bits: 0 usePhotometer: 1 useShuffle: 0 removeDaylight: 0 wigglePixelNotCLUT: 1 loadIdentityCLUT: 1 enableCLUTMapping: 0 CLUTMapSize: 4096 useFractionOfScreen: 0 callScreenNullForMario: 1 slowly: 0 ditheringCode: 61696 data: [1×1 struct]
>>
Denis Pelli
Professor of Psychology & Neural Science, New York University +1-646-258-7524 | denis.pelli@... | http://psych.nyu.edu/pelli/ | Skype: denispelli | http://denispelli.com


Denis, thanks for all the testing. So here Apple is using true native 10 bit framebuffers and scanout, presumably driving a native 10 bpc panel, instead of standard 8 bpc framebuffers. They use 10 bit scanout all the time, therefore no switch between standard and deep color mode. No use of hardware dithering at all, and no benefit with their approach.

So what they do in standard mode is rendering with 8 bpc into a 10 bpc framebuffer - setting the two least significant bits to zero. In deep color mode they use almost the same method as on other Macs: Let the application render into a half-float offscreen buffer, then using some proprietary software dithering to convert that into 10 bit native + 1 bit dithered output for simulated 11 bpc. You get 1 extra bit over the 10 bit native, but lose any timing precision and timing control in deep color mode. That's all consistent again with my understanding of the hardware capabilities - that this hardware generation can't do more than 10 bpc output.

It also confirms they can't use the discrete 256 slot 10 bit wide hw lut's, as those only work with 8 bpc framebuffers, but use the non-linear lut's, which allow other input bit depths, but you lose per-slot precise control of what the lut actually represents, so you can only use the gamma tables for gamma calibration, not for any clut animation tricks.

Mystery solved, but unfortunately nothing to be learned from this for new precision boosting tricks in PTB itself. I hoped we could learn some new magic formerly unknown hardware setting to get quite some extra bits out of the Linux HP laptop. One thing i did for current beta is to extend our 'PseudoGray' aka Bitstealing implementation to boost not only 8 bpc framebuffers, but also 10 bpc or 12 bpc framebuffers if only luminance/grayscale images are needed. One can use the 'PseudoGray' task on top of the 10 bit framebuffer task. In theory it could add about 2.8 bpc luminance precision. In practice, being trickery similar to Apples software dithering approach, it depends a lot on the panel/color emission profiles/its calibration etc., and i haven't ever measured the whole range of luminances to see how linear the response actually is. I ran it quickly through your measurement script, and it indeed fitted a 13 bit model for a native 10 bit framebuffer, but measuring the whole range would take half a day - a day and lacking a suitable place to measure in darkness, such a measurement is just not doable for me - the night is too short.

Current PTB beta has its sections about color precision updated accordingly. Current PTB beta will always load an identity gamma table to start with in 10 bpc modes, so the same user code should behave the same on different operating systems / OS versions, and PsychColorCorrection() can be used for more advanced gamma correction, color transformations etc. I guess this also means that PTB's custom 'Dithering' settings won't be needed or make much sense on current OSX, so one thing less to deal with.

thanks,
-mario