mesa: only expose glImportMemoryFdEXT if the ext is supported
From the EXT_external_objects_fd spec: "If the GL_EXT_memory_object_fd string is reported, the following commands are added: void ImportMemoryFdEXT(uint memory, uint64 size, enum handleType, int fd);" Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
39a35eb0c1
commit
44cd9aeeec
|
@ -560,6 +560,12 @@ _mesa_ImportMemoryFdEXT(GLuint memory,
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.EXT_memory_object_fd) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glImportMemoryFdEXT(unsupported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (handleType != GL_HANDLE_TYPE_OPAQUE_FD_EXT) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glImportMemoryFdEXT(handleType=%u)",
|
||||
handleType);
|
||||
|
|
Loading…
Reference in New Issue