1Name 2 3 NV_multigpu_context 4 5Name Strings 6 7 WGL_NV_multigpu_context 8 9Contact 10 11 Ralf Biermann (rbiermann 'at' nvidia.com) 12 13Contributors 14 15 Joshua Schnarr, NVIDIA 16 Ingo Esser, NVIDIA 17 Robert Menzel, NVIDIA 18 19Notice 20 21 Copyright (c) 2019 NVIDIA 22 23Status 24 25 Complete. 26 27Version 28 29 Last Modified Date: 2019-05-29 30 Author Revision: 4 31 32Number 33 34 OpenGL Extension #542 35 36Dependencies 37 38 WGL_NV_multigpu_context is written against the 39 WGL_ARB_create_context specification, which is required. 40 41 This extension interacts with NV_gpu_multicast. 42 This extension interacts with WGL_ARB_make_current_read. 43 44Overview 45 46 This extension allows the creation of an OpenGL context in a multi-GPU 47 environment with a specified multi-GPU strategy (known as SLI mode) which 48 takes precedence over process-wide multi-GPU mode settings. 49 50 The multi-GPU mode denotes vendor specific techniques to allow distributed 51 rendering on multiple GPUs, further called AFR (alternate frame rendering) 52 and Multicast (as defined in NV_gpu_multicast). 53 54 OpenGL supports multiple contexts. The semantics of switching contexts 55 is generally left to window system binding APIs such as WGL, GLX and EGL. 56 The extension WGL_NV_multigpu_context allows to specify a preferred 57 multi-GPU rendering mode per context, thus context switching can also 58 switch the current multi-GPU rendering mode. 59 60 The implementation is platform dependent and the actual multi-GPU rendering 61 mode of the created context may vary on different hardware and operation 62 system platforms. 63 64New Procedures and Functions 65 66 None 67 68New Tokens (WGL) 69 70 Accepted as an attribute name in the <*attrib_list> argument to 71 wglCreateContextAttribsARB: 72 73 WGL_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA 74 75 Accepted as an attribute value for WGL_CONTEXT_MULTIGPU_ATTRIB_NV in 76 the <*attrib_list> argument to wglCreateContextAttribsARB: 77 78 WGL_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB 79 WGL_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC 80 WGL_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD 81 WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE 82 83Additions to WGL_ARB_create_context and WGL_ARB_make_current_read 84 85 Add a new paragraph to the description of wglCreateContextAttribsARB, as 86 defined by WGL_ARB_create_context: 87 88 "The attribute name WGL_CONTEXT_MULTIGPU_ATTRIB_NV indicates the 89 preferred multi-GPU rendering mode for the OpenGL context. 90 This specified mode precedes other selected configuration settings." 91 92 Add a new paragraph to the description of wglMakeCurrent and 93 wglMakeContextCurrentARB: 94 95 "With OpenGL on Windows, a thread can only have one current rendering context 96 and a device context can only be used by a single thread at a time. 97 Violating this by using the same device context with multiple rendering 98 contexts does not normally return an error, but can lead to undefined and 99 undesirable behavior. 100 When multigpu context attributes are used, however, wglMakeCurrent and 101 wglMakeContextCurrentARB will return FALSE and set ERROR_INVALID_OPERATION 102 if a HDC passed to the function is already current with a rendering context 103 using an alternate multigpu attribute." 104 105GLX Protocol 106 107 None. 108 109Errors for WGL 110 111 A GL error ERROR_INVALID_PARAMETER is generated when a value for 112 WGL_CONTEXT_MULTIGPU_ATTRIB_NV passed into a wglCreateContextAttribsARB 113 attribute list is not an accepted value. 114 115 A GL error ERROR_NOT_SUPPORTED is generated when an unsupported SLI rendering 116 mode value is passed as value of attribute WGL_CONTEXT_MULTIGPU_ATTRIB_NV in a 117 wglCreateContextAttribsARB attribute list. 118 119 A GL error ERROR_NOT_SUPPORTED is generated when passing a device context HDC 120 to wglMakeCurrent or wglMakeContextCurrentARB if the HDC is already current with 121 a rendering context using a multigpu attribute in a different thread. 122 123New State 124 125 None. 126 127Issues 128 129 1. Is MULTICAST mode supported in a multi-display configuration where displays attached 130 to multiple GPUs are linked together in a desktop configuration spanning multiple GPUs? 131 132 RESOLVED: Not by default. 133 134 A dedicated attribute value WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV has to be 135 specified when a linked multi-GPU display configuration is considered for multicast rendering 136 by the application creating the context. 137 138 139Revision History 140 141 Rev. Date Author Changes 142 ---- ---------- -------- --------------------------------------------- 143 1 2017-02-21 rbiermann Initial draft 144 2 2018-09-17 rbiermann Updated attribute list and spec proposal 145 3 2019-05-08 rbiermann Added multi-display multicast mode 146 4 2019-05-29 rbiermann Added behavior of multithreaded wglMakeCurrent