Project
Loading...
Searching...
No Matches
GPUDisplayFrontendX11.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15// Now the other headers
19#include "GPULogging.h"
20#include <cstdio>
21#include <cstdlib>
22#include <cstring>
23#include <stdexcept>
24
25#include <unistd.h>
26#include <X11/Xatom.h>
27#include <X11/Xresource.h>
28
29#ifdef GPUCA_BUILD_EVENT_DISPLAY_VULKAN
30#include <vulkan/vulkan.h>
31#include <vulkan/vulkan_xlib.h>
32#endif
33
34typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int32_t*);
35
36using namespace o2::gpu;
37
43
44int32_t GPUDisplayFrontendX11::GetKey(int32_t key)
45{
46 if (key == 65453) {
47 return ('-');
48 }
49 if (key == 65451) {
50 return ('+');
51 }
52 if (key == 65505 || key == 65506) {
53 return (KEY_SHIFT);
54 }
55 if (key == 65513 || key == 65511) {
56 return (KEY_ALT);
57 }
58 if (key == 65027) {
59 return (KEY_RALT);
60 }
61 if (key == 65507) {
62 return (KEY_CTRL);
63 }
64 if (key == 65508) {
65 return (KEY_RCTRL);
66 }
67 if (key == 65362) {
68 return (KEY_UP);
69 }
70 if (key == 65364) {
71 return (KEY_DOWN);
72 }
73 if (key == 65361) {
74 return (KEY_LEFT);
75 }
76 if (key == 65363) {
77 return (KEY_RIGHT);
78 }
79 if (key == 65365) {
80 return (KEY_PAGEUP);
81 }
82 if (key == 65366) {
83 return (KEY_PAGEDOWN);
84 }
85 if (key == 65307) {
86 return (KEY_ESCAPE);
87 }
88 if (key == 65293) {
89 return (KEY_ENTER);
90 }
91 if (key == 65367) {
92 return (KEY_END);
93 }
94 if (key == 65360) {
95 return (KEY_HOME);
96 }
97 if (key == 65379) {
98 return (KEY_INSERT);
99 }
100 if (key == 65288) {
101 return (KEY_BACKSPACE);
102 }
103 if (key == 65535) {
104 return (KEY_DELETE);
105 }
106 if (key == 65470) {
107 return (KEY_F1);
108 }
109 if (key == 65471) {
110 return (KEY_F2);
111 }
112 if (key == 65472) {
113 return (KEY_F3);
114 }
115 if (key == 65473) {
116 return (KEY_F4);
117 }
118 if (key == 65474) {
119 return (KEY_F5);
120 }
121 if (key == 65475) {
122 return (KEY_F6);
123 }
124 if (key == 65476) {
125 return (KEY_F7);
126 }
127 if (key == 65477) {
128 return (KEY_F8);
129 }
130 if (key == 65478) {
131 return (KEY_F9);
132 }
133 if (key == 65479) {
134 return (KEY_F10);
135 }
136 if (key == 65480) {
137 return (KEY_F11);
138 }
139 if (key == 65481) {
140 return (KEY_F12);
141 }
142 if (key == 32) {
143 return (KEY_SPACE);
144 }
145 if (key > 255) {
146 return (0);
147 }
148 return 0;
149}
150
151void GPUDisplayFrontendX11::GetKey(XEvent& event, int32_t& keyOut, int32_t& keyPressOut)
152{
153 if (event.xkey.keycode == 49) { // Key left of 1: console key (^), independent of the layout
154 keyOut = keyPressOut = '^';
155 return;
156 }
157 char tmpString[9];
158 KeySym sym;
159 if (XLookupString(&event.xkey, tmpString, 8, &sym, nullptr) == 0) {
160 tmpString[0] = 0;
161 }
162 int32_t specialKey = GetKey(sym);
163 int32_t localeKey = (uint8_t)tmpString[0];
164 // GPUInfo("Key: keycode %d -> sym %d (%c) key %d (%c) special %d (%c)", (int32_t)event.xkey.keycode, (int32_t)sym, (char)sym, (int32_t)localeKey, (char)localeKey, (int32_t)specialKey, (char)specialKey);
165
166 if (specialKey) {
167 keyOut = keyPressOut = specialKey;
168 } else {
169 keyOut = keyPressOut = localeKey;
170 if (keyPressOut >= 'a' && keyPressOut <= 'z') {
171 keyPressOut += 'A' - 'a';
172 }
173 }
174}
175
176int32_t GPUDisplayFrontendX11::FrontendMain()
177{
178 XSetWindowAttributes windowAttributes;
179 XVisualInfo* visualInfo = nullptr;
180 XEvent event;
181 Colormap colorMap;
182 GLXContext glxContext = nullptr;
183 int32_t errorBase;
184 int32_t eventBase;
185
186 // Open a connection to the X server
187 mXDisplay = XOpenDisplay(nullptr);
188
189 if (mXDisplay == nullptr) {
190 GPUError("could not open display");
191 return (-1);
192 }
193
194 XrmInitialize();
195 if (const char* resources = XResourceManagerString(mXDisplay)) {
196 XrmDatabase db = XrmGetStringDatabase(resources);
197 char* type = nullptr;
198 XrmValue value;
199 if (db && XrmGetResource(db, "Xft.dpi", "Xft.Dpi", &type, &value) && value.addr && atof(value.addr) > 0) {
200 mScale = atof(value.addr) / 96.;
201 }
202 if (db) {
203 XrmDestroyDatabase(db);
204 }
205 }
206
207 // Make sure OpenGL's GLX extension supported
208 if (!glXQueryExtension(mXDisplay, &errorBase, &eventBase)) {
209 GPUError("X server has no OpenGL GLX extension");
210 return (-1);
211 }
212
213 const char* glxExt = glXQueryExtensionsString(mXDisplay, DefaultScreen(mXDisplay));
214 if (strstr(glxExt, "GLX_EXT_swap_control") == nullptr) {
215 if (backend()->backendType() == GPUDisplayBackend::TYPE_OPENGL) {
216 GPUError("GLX_EXT_swap_control not available, cannot change VSync");
217 }
218 vsync_supported = false;
219 } else {
220 vsync_supported = true;
221 }
222
223 // Require MSAA, double buffering, and Depth buffer
224 int32_t attribs[] = {GLX_X_RENDERABLE, True, GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_X_VISUAL_TYPE, GLX_TRUE_COLOR, GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, GLX_ALPHA_SIZE, 8, GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, 8, GLX_DOUBLEBUFFER, True,
225 // GLX_SAMPLE_BUFFERS , 1, //Disable MSAA here, we do it by rendering to offscreenbuffer
226 // GLX_SAMPLES , MSAA_SAMPLES,
227 None};
228
229 GLXFBConfig fbconfig = nullptr;
230 int32_t fbcount;
231 GLXFBConfig* fbc = glXChooseFBConfig(mXDisplay, DefaultScreen(mXDisplay), attribs, &fbcount);
232 if (fbc == nullptr || fbcount == 0) {
233 GPUError("Failed to get MSAA GLXFBConfig");
234 return (-1);
235 }
236 fbconfig = fbc[0];
237 XFree(fbc);
238 visualInfo = glXGetVisualFromFBConfig(mXDisplay, fbconfig);
239
240 if (visualInfo == nullptr) {
241 GPUError("no RGB visual with depth buffer");
242 return (-1);
243 }
244
245 if (backend()->backendType() == GPUDisplayBackend::TYPE_OPENGL) {
246 // Create an OpenGL rendering context
247 glXCreateContextAttribsARBProc glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB((const GLubyte*)"glXCreateContextAttribsARB");
248 if (glXCreateContextAttribsARB) {
249 int32_t context_attribs[] = {
250 GLX_CONTEXT_MAJOR_VERSION_ARB, GL_MIN_VERSION_MAJOR,
251 GLX_CONTEXT_MINOR_VERSION_ARB, GL_MIN_VERSION_MINOR,
252 GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
253 None};
254 glxContext = glXCreateContextAttribsARB(mXDisplay, fbconfig, nullptr, GL_TRUE, context_attribs);
255 } else {
256 glxContext = glXCreateContext(mXDisplay, visualInfo, nullptr, GL_TRUE);
257 }
258 if (glxContext == nullptr) {
259 GPUError("could not create rendering context");
260 return (-1);
261 }
262 }
263
264 Window win = RootWindow(mXDisplay, visualInfo->screen);
265 colorMap = XCreateColormap(mXDisplay, win, visualInfo->visual, AllocNone);
266 windowAttributes.colormap = colorMap;
267 windowAttributes.border_pixel = 0;
268 windowAttributes.event_mask = ExposureMask | VisibilityChangeMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask | SubstructureNotifyMask | FocusChangeMask | PropertyChangeMask;
269
270 // Create an X window with the selected visual
271 mWindow = XCreateWindow(mXDisplay, win, 50, 50, INIT_WIDTH * mScale, INIT_HEIGHT * mScale, // Position / Width and height of window
272 0, visualInfo->depth, InputOutput, visualInfo->visual, CWBorderPixel | CWColormap | CWEventMask, &windowAttributes);
273 XSetStandardProperties(mXDisplay, mWindow, DISPLAY_WINDOW_NAME, DISPLAY_WINDOW_NAME, None, nullptr, 0, nullptr);
274 XSizeHints sizeHints{};
275 sizeHints.flags = PMinSize;
276 sizeHints.min_width = MIN_WIDTH * mScale;
277 sizeHints.min_height = MIN_HEIGHT * mScale;
278 XSetWMNormalHints(mXDisplay, mWindow, &sizeHints);
279 if (backend()->backendType() == GPUDisplayBackend::TYPE_OPENGL) {
280 glXMakeCurrent(mXDisplay, mWindow, glxContext);
281 }
282 XMapWindow(mXDisplay, mWindow);
283
284 XEvent mapEvent; // Maximize only after the window manager placed the window (on the active monitor), so that it restores to this position when un-maximized
285 XPeekIfEvent(mXDisplay, &mapEvent, [](Display*, XEvent* ev, XPointer window) -> Bool { return ev->type == MapNotify && ev->xmap.window == *(Window*)window; }, (XPointer)&mWindow);
287
288 // Receive signal when window closed
289 Atom WM_DELETE_WINDOW = XInternAtom(mXDisplay, "WM_DELETE_WINDOW", False);
290 XSetWMProtocols(mXDisplay, mWindow, &WM_DELETE_WINDOW, 1);
291
292 if (mBackend->ExtInit()) {
293 fprintf(stderr, "Error initializing backend\n");
294 return (-1);
295 }
296
297 XMapWindow(mXDisplay, mWindow);
298 XFlush(mXDisplay);
299
300 // Enable vsync
301 if (backend()->backendType() == GPUDisplayBackend::TYPE_OPENGL && vsync_supported) {
302 mGlXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)glXGetProcAddressARB((const GLubyte*)"glXSwapIntervalEXT");
303 if (mGlXSwapIntervalEXT == nullptr) {
304 GPUError("Cannot enable vsync");
305 return (-1);
306 }
307 mGlXSwapIntervalEXT(mXDisplay, glXGetCurrentDrawable(), vsyncEnabled());
308 }
309
310 if (InitDisplay()) {
311 return (1);
312 }
313
314 while (1) {
315 do {
316 if (getDisplayControl() == 2) {
317 break;
318 }
319 if (!XPending(mXDisplay)) {
320 event.type = Expose;
321 } else {
322 XNextEvent(mXDisplay, &event);
323 }
324 switch (event.type) {
325 case ButtonPress: {
326 if (event.xbutton.button == 4) {
327 mMouseWheel += 100;
328 } else if (event.xbutton.button == 5) {
329 mMouseWheel -= 100;
330 } else {
331 if (event.xbutton.button == 1) {
332 mMouseDn = true;
333 } else if (event.xbutton.button == 2) {
334 mMouseDnM = true;
335 } else {
336 mMouseDnR = true;
337 }
338 mMouseDnX = event.xmotion.x;
339 mMouseDnY = event.xmotion.y;
340 }
341 break;
342 }
343
344 case ButtonRelease: {
345 if (event.xbutton.button != 4 && event.xbutton.button != 5) {
346 if (event.xbutton.button == 1) {
347 mMouseDn = false;
348 } else if (event.xbutton.button == 2) {
349 mMouseDnM = false;
350 } else {
351 mMouseDnR = false;
352 }
353 }
354 break;
355 }
356
357 case KeyPress: {
358 int32_t handleKey = 0, keyPress = 0;
359 GetKey(event, handleKey, keyPress);
360 mKeys[keyPress] = keyPress == KEY_SHIFT || !consoleShown(); // Held keys only without console, SHIFT also with it (scrolling)
361 HandleKey(handleKey);
362 break;
363 }
364
365 case KeyRelease: {
366 int32_t handleKey = 0, keyPress = 0;
367 GetKey(event, handleKey, keyPress);
368 mKeys[keyPress] = false;
369 break;
370 }
371
372 case MotionNotify: {
373 mMouseMvX = event.xmotion.x;
374 mMouseMvY = event.xmotion.y;
375 break;
376 }
377
378 case FocusOut: {
379 focusLost();
380 break;
381 }
382
383 case PropertyNotify: {
384 if (event.xproperty.atom == XInternAtom(mXDisplay, "_NET_WM_STATE", False)) {
385 updateWindowState();
386 }
387 break;
388 }
389
390 case Expose: {
391 break;
392 }
393
394 case ConfigureNotify: {
395 ResizeScene(event.xconfigure.width, event.xconfigure.height);
396 break;
397 }
398
399 case ClientMessage: {
400 if (event.xclient.message_type == XInternAtom(mXDisplay, "_NET_WM_STATE", False)) {
401 XFlush(mXDisplay);
402 } else {
404 }
405 break;
406 }
407 }
408 } while (XPending(mXDisplay)); // Loop to compress events
409 if (getDisplayControl() == 2) {
410 break;
411 }
412
414 if (backend()->backendType() == GPUDisplayBackend::TYPE_OPENGL) {
415 glXSwapBuffers(mXDisplay, mWindow);
416 }
418 }
419
420 ExitDisplay();
421 if (backend()->backendType() == GPUDisplayBackend::TYPE_OPENGL) {
422 glXDestroyContext(mXDisplay, glxContext);
423 }
424 XFree(visualInfo);
425 XDestroyWindow(mXDisplay, mWindow);
426 XCloseDisplay(mXDisplay);
427
428 {
429 std::lock_guard lock(mExitStateMutex);
430 mDisplayRunning = false;
431 mDisplayStoppedCV.notify_all();
432 }
433
434 return (0);
435}
436
437void GPUDisplayFrontendX11::updateWindowState()
438{
439 Atom type;
441 unsigned long nItems, bytesAfter;
442 unsigned char* data = nullptr;
443 if (XGetWindowProperty(mXDisplay, mWindow, XInternAtom(mXDisplay, "_NET_WM_STATE", False), 0, 1024, False, XA_ATOM, &type, &format, &nItems, &bytesAfter, &data) != Success || data == nullptr) {
444 return;
445 }
446 const Atom fullScreen = XInternAtom(mXDisplay, "_NET_WM_STATE_FULLSCREEN", False), maxHorz = XInternAtom(mXDisplay, "_NET_WM_STATE_MAXIMIZED_HORZ", False), maxVert = XInternAtom(mXDisplay, "_NET_WM_STATE_MAXIMIZED_VERT", False);
447 bool isFullScreen = false, isMaxHorz = false, isMaxVert = false;
448 for (unsigned long i = 0; i < nItems; i++) {
449 const Atom a = ((Atom*)data)[i];
450 isFullScreen |= a == fullScreen;
451 isMaxHorz |= a == maxHorz;
452 isMaxVert |= a == maxVert;
453 }
454 XFree(data);
455 setWindowState(isFullScreen, isMaxHorz && isMaxVert);
456}
457
459{
460 XEvent xev;
461 memset(&xev, 0, sizeof(xev));
462 xev.type = ClientMessage;
463 xev.xclient.window = mWindow;
464 xev.xclient.message_type = XInternAtom(mXDisplay, "_NET_WM_STATE", False);
465 xev.xclient.format = 32;
466 xev.xclient.data.l[0] = set ? 1 : 0; // _NET_WM_STATE_ADD / _NET_WM_STATE_REMOVE
467 xev.xclient.data.l[1] = XInternAtom(mXDisplay, "_NET_WM_STATE_FULLSCREEN", False);
468 xev.xclient.data.l[2] = 0;
469 XSendEvent(mXDisplay, DefaultRootWindow(mXDisplay), False, SubstructureNotifyMask, &xev);
470}
471
473{
474 XEvent xev;
475 memset(&xev, 0, sizeof(xev));
476 xev.type = ClientMessage;
477 xev.xclient.window = mWindow;
478 xev.xclient.message_type = XInternAtom(mXDisplay, "_NET_WM_STATE", False);
479 xev.xclient.format = 32;
480 xev.xclient.data.l[0] = set ? 1 : 0; // _NET_WM_STATE_ADD / _NET_WM_STATE_REMOVE
481 xev.xclient.data.l[1] = XInternAtom(mXDisplay, "_NET_WM_STATE_MAXIMIZED_HORZ", False);
482 xev.xclient.data.l[2] = XInternAtom(mXDisplay, "_NET_WM_STATE_MAXIMIZED_VERT", False);
483 XSendEvent(mXDisplay, DefaultRootWindow(mXDisplay), False, SubstructureNotifyMask, &xev);
484}
485
487{
488 if (backend()->backendType() == GPUDisplayBackend::TYPE_OPENGL && vsync_supported) {
489 mGlXSwapIntervalEXT(mXDisplay, glXGetCurrentDrawable(), (int32_t)enable);
490 }
491}
492
494{
495 Window root_return;
496 int32_t x_return, y_return;
497 uint32_t width_return, height_return, border_width_return, depth_return;
498 if (XGetGeometry(mXDisplay, mWindow, &root_return, &x_return, &y_return, &width_return, &height_return, &border_width_return, &depth_return) == 0) {
499 throw std::runtime_error("Cannot query X11 window geometry");
500 }
501 width = width_return;
502 height = height_return;
503}
504
506{
507#ifdef GPUCA_BUILD_EVENT_DISPLAY_VULKAN
508 VkXlibSurfaceCreateInfoKHR info{};
509 info.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR;
510 info.flags = 0;
511 info.dpy = mXDisplay;
512 info.window = mWindow;
513 return vkCreateXlibSurfaceKHR(*(VkInstance*)instance, &info, nullptr, (VkSurfaceKHR*)surface) != VK_SUCCESS;
514#else
515 return 1;
516#endif
517}
518
520{
521 static const char* exts[] = {"VK_KHR_surface", "VK_KHR_xlib_surface"};
522 p = exts;
523 return 2;
524}
unsigned int uint32_t
int32_t i
GLXContext(* glXCreateContextAttribsARBProc)(Display *, GLXFBConfig, GLXContext, Bool, const int32_t *)
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t
const Acts::Surface * surface
StringRef key
void getSize(int32_t &width, int32_t &height) override
int32_t getVulkanSurface(void *instance, void *surface) override
uint32_t getReqVulkanExtensions(const char **&p) override
void SetVSync(bool enable) override
int32_t getDisplayControl() const override
void setDisplayControl(int32_t v) override
int32_t HandleUpdatesAndDrawGLScene(bool suspended=false)
void ResizeScene(int32_t width, int32_t height)
std::condition_variable mDisplayStoppedCV
static constexpr const char * DISPLAY_WINDOW_NAME
static constexpr int32_t INIT_WIDTH
static constexpr int32_t GL_MIN_VERSION_MAJOR
void setWindowState(bool fullScreen, bool maximized)
static constexpr int32_t GL_MIN_VERSION_MINOR
int32_t InitDisplay(bool initFailure=false)
static constexpr int32_t MIN_WIDTH
static constexpr int32_t INIT_HEIGHT
static constexpr int32_t MIN_HEIGHT
std::atomic< bool > mDisplayRunning
struct _cl_event * event
Definition glcorearb.h:2982
#define GL_TRUE
Definition glcorearb.h:95
GLint GLsizei GLsizei height
Definition glcorearb.h:270
GLint GLsizei width
Definition glcorearb.h:270
GLsizei const GLfloat * value
Definition glcorearb.h:819
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
GLint GLint GLsizei GLint GLenum format
Definition glcorearb.h:275
Marks an empty item in the context.