|
Packit Service |
9e77c8 |
/*
|
|
Packit Service |
9e77c8 |
* Copyright (c) 2016, NVIDIA CORPORATION.
|
|
Packit Service |
9e77c8 |
*
|
|
Packit Service |
9e77c8 |
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
Packit Service |
9e77c8 |
* copy of this software and/or associated documentation files (the
|
|
Packit Service |
9e77c8 |
* "Materials"), to deal in the Materials without restriction, including
|
|
Packit Service |
9e77c8 |
* without limitation the rights to use, copy, modify, merge, publish,
|
|
Packit Service |
9e77c8 |
* distribute, sublicense, and/or sell copies of the Materials, and to
|
|
Packit Service |
9e77c8 |
* permit persons to whom the Materials are furnished to do so, subject to
|
|
Packit Service |
9e77c8 |
* the following conditions:
|
|
Packit Service |
9e77c8 |
*
|
|
Packit Service |
9e77c8 |
* The above copyright notice and this permission notice shall be included
|
|
Packit Service |
9e77c8 |
* unaltered in all copies or substantial portions of the Materials.
|
|
Packit Service |
9e77c8 |
* Any additions, deletions, or changes to the original source files
|
|
Packit Service |
9e77c8 |
* must be clearly indicated in accompanying documentation.
|
|
Packit Service |
9e77c8 |
*
|
|
Packit Service |
9e77c8 |
* If only executable code is distributed, then the accompanying
|
|
Packit Service |
9e77c8 |
* documentation must state that "this software is based in part on the
|
|
Packit Service |
9e77c8 |
* work of the Khronos Group."
|
|
Packit Service |
9e77c8 |
*
|
|
Packit Service |
9e77c8 |
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
Packit Service |
9e77c8 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
Packit Service |
9e77c8 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
Packit Service |
9e77c8 |
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
Packit Service |
9e77c8 |
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
Packit Service |
9e77c8 |
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
Packit Service |
9e77c8 |
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
|
Packit Service |
9e77c8 |
*/
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
#ifndef EGL_TEST_UTILS_H
|
|
Packit Service |
9e77c8 |
#define EGL_TEST_UTILS_H
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
#include <EGL/egl.h>
|
|
Packit Service |
9e77c8 |
#include <EGL/eglext.h>
|
|
Packit Service |
9e77c8 |
#include "dummy/EGL_dummy.h"
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
/**
|
|
Packit Service |
9e77c8 |
* The number of dummy vendor libraries.
|
|
Packit Service |
9e77c8 |
*/
|
|
Packit Service |
9e77c8 |
#define DUMMY_VENDOR_COUNT 2
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
/**
|
|
Packit Service |
9e77c8 |
* The expected number of devices that should be returned from
|
|
Packit Service |
9e77c8 |
* eglQueryDevicesEXT().
|
|
Packit Service |
9e77c8 |
*/
|
|
Packit Service |
9e77c8 |
#define DUMMY_TOTAL_DEVICE_COUNT (DUMMY_VENDOR_COUNT * DUMMY_EGL_DEVICE_COUNT)
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
extern const char *DUMMY_VENDOR_NAMES[DUMMY_VENDOR_COUNT];
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
extern PFNEGLQUERYDEVICESEXTPROC ptr_eglQueryDevicesEXT;
|
|
Packit Service |
9e77c8 |
extern PFNEGLDEBUGMESSAGECONTROLKHRPROC ptr_eglDebugMessageControlKHR;
|
|
Packit Service |
9e77c8 |
extern PFNEGLQUERYDEBUGKHRPROC ptr_eglQueryDebugKHR;
|
|
Packit Service |
9e77c8 |
extern PFNEGLLABELOBJECTKHRPROC ptr_eglLabelObjectKHR;
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
extern pfn_eglTestDispatchDisplay ptr_eglTestDispatchDisplay;
|
|
Packit Service |
9e77c8 |
extern pfn_eglTestDispatchDevice ptr_eglTestDispatchDevice;
|
|
Packit Service |
9e77c8 |
extern pfn_eglTestDispatchCurrent ptr_eglTestDispatchCurrent;
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
/**
|
|
Packit Service |
9e77c8 |
* Loads an EGL extension function with eglGetProcAddress. If it fails, then it
|
|
Packit Service |
9e77c8 |
* calls abort().
|
|
Packit Service |
9e77c8 |
*/
|
|
Packit Service |
9e77c8 |
__eglMustCastToProperFunctionPointerType loadEGLFunction(const char *name);
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
/**
|
|
Packit Service |
9e77c8 |
* Loads all of the EGL extension functions that the dummy vendor library
|
|
Packit Service |
9e77c8 |
* supports.
|
|
Packit Service |
9e77c8 |
*/
|
|
Packit Service |
9e77c8 |
void loadEGLExtensions(void);
|
|
Packit Service |
9e77c8 |
|
|
Packit Service |
9e77c8 |
#endif // EGL_TEST_UTILS_H
|