CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
92 lines
2.8 KiB
C
92 lines
2.8 KiB
C
/*
|
|
* Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef GL_INTEROP_H_
|
|
#define GL_INTEROP_H_
|
|
|
|
#define GL_RESOURCE_ATTACH_TEXTURE_AMD 0x12a000
|
|
#define GL_RESOURCE_ATTACH_FRAMEBUFFER_AMD 0x12a001
|
|
#define GL_RESOURCE_ATTACH_RENDERBUFFER_AMD 0x12a002
|
|
#define GL_RESOURCE_ATTACH_VERTEXBUFFER_AMD 0x12a003
|
|
|
|
#ifndef GLuintp
|
|
typedef uintptr_t GLuintp;
|
|
#endif
|
|
|
|
#ifndef GLlonglong
|
|
typedef long long GLlonglong;
|
|
#endif
|
|
|
|
typedef struct GLResourceRec {
|
|
GLenum type;
|
|
GLuint name;
|
|
GLuint flags;
|
|
GLuintp mbResHandle;
|
|
GLuint level; ///< Start level to attach
|
|
GLuint numLevels; ///< Number of levels to attach (can be set to GL_TEXTURE_ALL_LEVELS_AMD)
|
|
GLuint layer; ///< Start layer to attach
|
|
GLuint numLayers; ///< Number of layers to attach (can be set to GL_TEXTURE_ALL_LAYERS_AMD)
|
|
} GLResource;
|
|
|
|
typedef struct GLResourceDimRec {
|
|
GLuint width;
|
|
GLuint height;
|
|
GLuint depth;
|
|
} GLResourceDim;
|
|
#define GLRDATA_MAX_LAYERS 8192
|
|
#define GL_RESOURCE_DATA_VERSION 7
|
|
typedef struct GLResourceDataRec {
|
|
GLuint size;
|
|
GLuint version;
|
|
GLuint surfaceSize; ///< Size of the base surface.
|
|
GLuint pad;
|
|
GLuintp offset; ///< Offset pointing to the sub resource's surface.
|
|
GLuintp mbResHandle;
|
|
GLuint format;
|
|
GLuint flags;
|
|
GLuint tilingMode;
|
|
GLuint swizzles[GLRDATA_MAX_LAYERS];
|
|
GLResourceDim paddedDimensions;
|
|
GLResourceDim rawDimensions;
|
|
GLlonglong cardAddr; ///< Address of the base surface (add offset to get the actual address of
|
|
///< the sub surface)
|
|
GLlonglong p2pAddr;
|
|
GLlonglong mc_size;
|
|
GLuint cpuAccess;
|
|
GLuintp handle;
|
|
GLuint perSurfTileInfo;
|
|
GLuint objectAttribType;
|
|
GLuint sharedBufferID;
|
|
GLuint levels;
|
|
GLuint swizzlesMip[GLRDATA_MAX_LAYERS];
|
|
GLuint textureSRDSize;
|
|
GLuint samplerSRDSize;
|
|
GLuint textureSRD[8];
|
|
GLuint samplerSRD[8];
|
|
GLboolean isDoppDesktopTexture;
|
|
GLboolean isDoppPresentTexture;
|
|
GLuint isTilingRotated;
|
|
GLuint vidpnSourceId;
|
|
GLboolean isDisplayable;
|
|
|
|
} GLResourceData;
|
|
|
|
#ifdef _WIN32
|
|
typedef BOOL(WINAPI* PFNWGLBEGINCLINTEROPAMD)(HGLRC hglrc, GLuint flags);
|
|
typedef BOOL(WINAPI* PFNWGLENDCLINTEROPAMD)(HGLRC hglrc, GLuint flags);
|
|
typedef BOOL(WINAPI* PFNWGLRESOURCEATTACHAMD)(HGLRC hglrc, GLvoid* resource, GLvoid* pResourceData);
|
|
typedef BOOL(WINAPI* PFNWGLRESOURCEDETACHAMD)(HGLRC hglrc, GLvoid* resource);
|
|
typedef BOOL(WINAPI* PFNWGLGETCONTEXTGPUINFOAMD)(HGLRC hglrc, LUID* adapterLUID,
|
|
UINT* chainBitmask);
|
|
typedef BOOL(WINAPI* PFNWGLMULTIRESOURCEACQUIREAMD)(HGLRC hglrc, GLvoid** resource,
|
|
GLuint numResources);
|
|
typedef BOOL(WINAPI* PFNWGLMULTIRESOURCERELEASEAMD)(HGLRC hglrc, GLvoid** resource,
|
|
GLuint numResources);
|
|
|
|
#endif /* _WIN32 */
|
|
|
|
#endif /* GL_INTEROP_H_*/
|