[-]
[+]
|
Changed |
_service:tar_git:libhybris.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/mer-hybris/libhybris.git</param>
<param name="branch">master</param>
- <param name="revision">0.0.5.44</param>
+ <param name="revision">0.0.5.48</param>
<param name="token"></param>
<param name="debian"></param>
<param name="dumb"></param>
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/native_handle.c
^
|
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "NativeHandle"
-
-#include <android-config.h>
-#include <stdint.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <cutils/native_handle.h>
-
-native_handle_t* native_handle_create(int numFds, int numInts)
-{
- native_handle_t* h = malloc(
- sizeof(native_handle_t) + sizeof(int)*(numFds+numInts));
-
- h->version = sizeof(native_handle_t);
- h->numFds = numFds;
- h->numInts = numInts;
- return h;
-}
-
-int native_handle_delete(native_handle_t* h)
-{
- if (h) {
- if (h->version != sizeof(native_handle_t))
- return -EINVAL;
- free(h);
- }
- return 0;
-}
-
-int native_handle_close(const native_handle_t* h)
-{
- if (h->version != sizeof(native_handle_t))
- return -EINVAL;
-
- const int numFds = h->numFds;
- int i;
- for (i=0 ; i<numFds ; i++) {
- close(h->data[i]);
- }
- return 0;
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/nativewindowbase.cpp
^
|
@@ -1,428 +0,0 @@
-
-#ifndef ANDROID_BUILD
-#include <android-config.h>
-#include "logging.h"
-#else
-#define TRACE(message, ...)
-#endif
-
-#include <string.h>
-#include <system/window.h>
-#include <system/graphics.h>
-#include <hardware/gralloc.h>
-#include "support.h"
-#include <stdarg.h>
-
-#if ANDROID_VERSION_MAJOR>=4 && ANDROID_VERSION_MINOR>=2 || ANDROID_VERSION_MAJOR>=5
-extern "C" {
-#include <sync/sync.h>
-}
-#endif
-
-#ifdef ANDROID_BUILD
-#define TRACE(...)
-#define HYBRIS_TRACE_BEGIN(...)
-#define HYBRIS_TRACE_END(...)
-#endif
-
-#include "nativewindowbase.h"
-
-BaseNativeWindowBuffer::BaseNativeWindowBuffer()
-{
- TRACE("%p", this);
-
- // done in ANativeWindowBuffer::ANativeWindowBuffer
- // common.magic = ANDROID_NATIVE_WINDOW_MAGIC;
- // common.version = sizeof(ANativeWindow);
- // memset(common.reserved, 0, sizeof(window->native.common.reserved));
-
- ANativeWindowBuffer::common.decRef = _decRef;
- ANativeWindowBuffer::common.incRef = _incRef;
- ANativeWindowBuffer::width = 0;
- ANativeWindowBuffer::height = 0;
- ANativeWindowBuffer::stride = 0;
- ANativeWindowBuffer::format = 0;
- ANativeWindowBuffer::usage = 0;
- ANativeWindowBuffer::handle = 0;
-
- refcount = 0;
-}
-
-
-BaseNativeWindowBuffer::~BaseNativeWindowBuffer()
-{
- TRACE("%p", this);
-
- ANativeWindowBuffer::common.decRef = NULL;
- ANativeWindowBuffer::common.incRef = NULL;
- refcount = 0;
-}
-
-
-void BaseNativeWindowBuffer::_decRef(struct android_native_base_t* base)
-{
- ANativeWindowBuffer* self = container_of(base, ANativeWindowBuffer, common);
- BaseNativeWindowBuffer* bnwb = static_cast<BaseNativeWindowBuffer*>(self) ;
-
- TRACE("%p refcount = %i",bnwb, bnwb->refcount - 1);
-
- if (__sync_fetch_and_sub(&bnwb->refcount,1) == 1)
- {
- delete bnwb;
- }
-}
-
-
-
-void BaseNativeWindowBuffer::_incRef(struct android_native_base_t* base)
-{
- ANativeWindowBuffer* self = container_of(base, ANativeWindowBuffer, common);
- BaseNativeWindowBuffer* bnwb= static_cast<BaseNativeWindowBuffer*>(self) ;
-
- TRACE("%p refcount = %i", bnwb, bnwb->refcount + 1);
- __sync_fetch_and_add(&bnwb->refcount,1);
-}
-
-ANativeWindowBuffer* BaseNativeWindowBuffer::getNativeBuffer() const
-{
- return static_cast<ANativeWindowBuffer*>(const_cast<BaseNativeWindowBuffer*>(this));
-}
-
-BaseNativeWindow::BaseNativeWindow()
-{
- TRACE("this=%p or A %p", this, (ANativeWindow*)this);
- // done in ANativeWindow
- // common.magic = ANDROID_NATIVE_WINDOW_MAGIC;
- // common.version = sizeof(ANativeWindow);
- // memset(common.reserved, 0, sizeof(window->native.common.reserved));
- ANativeWindow::common.decRef = _decRef;
- ANativeWindow::common.incRef = _incRef;
-
- const_cast<uint32_t&>(ANativeWindow::flags) = 0;
- const_cast<float&>(ANativeWindow::xdpi) = 0;
- const_cast<float&>(ANativeWindow::ydpi) = 0;
- const_cast<int&>(ANativeWindow::minSwapInterval) = 0;
- const_cast<int&>(ANativeWindow::maxSwapInterval) = 0;
-
- ANativeWindow::setSwapInterval = _setSwapInterval;
-
-#if ANDROID_VERSION_MAJOR>=4 && ANDROID_VERSION_MINOR>=2 || ANDROID_VERSION_MAJOR>=5
- ANativeWindow::lockBuffer_DEPRECATED = &_lockBuffer_DEPRECATED;
- ANativeWindow::dequeueBuffer_DEPRECATED = &_dequeueBuffer_DEPRECATED;
- ANativeWindow::queueBuffer_DEPRECATED = &_queueBuffer_DEPRECATED;
- ANativeWindow::cancelBuffer_DEPRECATED = &_cancelBuffer_DEPRECATED;
- ANativeWindow::queueBuffer = &_queueBuffer;
- ANativeWindow::dequeueBuffer = &_dequeueBuffer;
- ANativeWindow::cancelBuffer = &_cancelBuffer;
-#else
- ANativeWindow::lockBuffer = &_lockBuffer_DEPRECATED;
- ANativeWindow::dequeueBuffer = &_dequeueBuffer_DEPRECATED;
- ANativeWindow::queueBuffer = &_queueBuffer_DEPRECATED;
- ANativeWindow::cancelBuffer = &_cancelBuffer_DEPRECATED;
-#endif
- ANativeWindow::query = &_query;
- ANativeWindow::perform = &_perform;
-
- refcount = 0;
-}
-
-BaseNativeWindow::~BaseNativeWindow()
-{
- TRACE("");
- ANativeWindow::common.decRef = NULL;
- ANativeWindow::common.incRef = NULL;
- refcount = 0;
-}
-
-void BaseNativeWindow::_decRef(struct android_native_base_t* base)
-{
- ANativeWindow* self = container_of(base, ANativeWindow, common);
- BaseNativeWindow* bnw = static_cast<BaseNativeWindow*>(self);
-
- TRACE("%p refcount = %i", bnw, bnw->refcount - 1);
-
- if (__sync_fetch_and_sub(&bnw->refcount,1) == 1)
- {
- delete bnw;
- }
-}
-
-void BaseNativeWindow::_incRef(struct android_native_base_t* base)
-{
- ANativeWindow* self = container_of(base, ANativeWindow, common);
- BaseNativeWindow* bnw = static_cast<BaseNativeWindow*>(self);
-
- TRACE("%p refcount = %i", bnw, bnw->refcount + 1);
-
-
- __sync_fetch_and_add(&bnw->refcount,1);
-}
-
-int BaseNativeWindow::_setSwapInterval(struct ANativeWindow* window, int interval)
-{
- return static_cast<BaseNativeWindow*>(window)->setSwapInterval(interval);
-}
-
-int BaseNativeWindow::_dequeueBuffer_DEPRECATED(ANativeWindow* window, ANativeWindowBuffer** buffer)
-{
- BaseNativeWindowBuffer* temp = static_cast<BaseNativeWindowBuffer*>(*buffer);
- int fenceFd = -1;
- int ret = static_cast<BaseNativeWindow*>(window)->dequeueBuffer(&temp, &fenceFd);
-
- *buffer = static_cast<ANativeWindowBuffer*>(temp);
-
-#if ANDROID_VERSION_MAJOR>=4 && ANDROID_VERSION_MINOR>=2 || ANDROID_VERSION_MAJOR>=5
- if (fenceFd >= 0)
- {
- sync_wait(fenceFd, -1);
- close(fenceFd);
- }
-#endif
-
- return ret;
-}
-
-int BaseNativeWindow::_dequeueBuffer(struct ANativeWindow *window, ANativeWindowBuffer **buffer, int *fenceFd)
-{
- BaseNativeWindowBuffer *nativeBuffer = static_cast<BaseNativeWindowBuffer*>(*buffer);
- int ret = static_cast<BaseNativeWindow*>(window)->dequeueBuffer(&nativeBuffer, fenceFd);
- *buffer = static_cast<ANativeWindowBuffer*>(nativeBuffer);
- return ret;
-}
-
-int BaseNativeWindow::_queueBuffer_DEPRECATED(struct ANativeWindow* window, ANativeWindowBuffer* buffer)
-{
- BaseNativeWindow *nativeWindow = static_cast<BaseNativeWindow*>(window);
- BaseNativeWindowBuffer *nativeBuffer = static_cast<BaseNativeWindowBuffer*>(buffer);
-
- return nativeWindow->queueBuffer(nativeBuffer, -1);
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/nativewindowbase.h
^
|
@@ -1,99 +0,0 @@
-#ifndef NATIVEWINDOWBASE_H
-#define NATIVEWINDOWBASE_H
-
-/* for ICS window.h */
-#include <string.h>
-#include <system/window.h>
-#include <EGL/egl.h>
-#include "support.h"
-#include <stdarg.h>
-#include <assert.h>
-
-#ifdef DEBUG
-#include <stdio.h>
-#endif
-
-#define NO_ERROR 0L
-#define BAD_VALUE -1
-
-/**
- * @brief A Class to do common ANativeBuffer initialization and thunk c-style
- * callbacks into C++ method calls.
- **/
-class BaseNativeWindowBuffer : public ANativeWindowBuffer
-{
-protected:
- BaseNativeWindowBuffer();
- virtual ~BaseNativeWindowBuffer() ;
-
-public:
- /* When passing the buffer to EGL functions it's required to pass always the native
- * buffer. This method takes care about proper casting. */
- ANativeWindowBuffer* getNativeBuffer() const;
-
-private:
- unsigned int refcount;
- static void _decRef(struct android_native_base_t* base);
- static void _incRef(struct android_native_base_t* base);
-};
-
-/**
- * @brief A Class to do common ANativeWindow initialization and thunk c-style
- * callbacks into C++ method calls.
- **/
-class BaseNativeWindow : public ANativeWindow
-{
-public:
- operator EGLNativeWindowType()
- {
- EGLNativeWindowType ret = reinterpret_cast<EGLNativeWindowType>(static_cast<ANativeWindow *>(this));
- return ret;
- }
-
-protected:
- BaseNativeWindow();
- virtual ~BaseNativeWindow();
-
- // does this require more magic?
- unsigned int refcount;
- static void _decRef(struct android_native_base_t* base);
- static void _incRef(struct android_native_base_t* base);
-
- // these have to be implemented in the concrete implementation, eg. FBDEV or offscreen window
- virtual int setSwapInterval(int interval) = 0;
-
- virtual int dequeueBuffer(BaseNativeWindowBuffer **buffer, int *fenceFd) = 0;
- virtual int queueBuffer(BaseNativeWindowBuffer *buffer, int fenceFd) = 0;
- virtual int cancelBuffer(BaseNativeWindowBuffer *buffer, int fenceFd) = 0;
- virtual int lockBuffer(BaseNativeWindowBuffer *buffer) = 0; // DEPRECATED
-
- virtual unsigned int type() const = 0;
- virtual unsigned int width() const = 0;
- virtual unsigned int height() const = 0;
- virtual unsigned int format() const = 0;
- virtual unsigned int defaultWidth() const = 0;
- virtual unsigned int defaultHeight() const = 0;
- virtual unsigned int queueLength() const = 0;
- virtual unsigned int transformHint() const = 0;
- virtual unsigned int getUsage() const = 0;
- //perform interfaces
- virtual int setBuffersFormat(int format) = 0;
- virtual int setBuffersDimensions(int width, int height) = 0;
- virtual int setUsage(int usage) = 0;
- virtual int setBufferCount(int cnt) = 0;
-private:
- static int _setSwapInterval(struct ANativeWindow* window, int interval);
- static int _dequeueBuffer_DEPRECATED(ANativeWindow* window, ANativeWindowBuffer** buffer);
- static const char *_native_window_operation(int what);
- static const char *_native_query_operation(int what);
- static int _lockBuffer_DEPRECATED(struct ANativeWindow* window, ANativeWindowBuffer* buffer);
- static int _queueBuffer_DEPRECATED(struct ANativeWindow* window, ANativeWindowBuffer* buffer);
- static int _query(const struct ANativeWindow* window, int what, int* value);
- static int _perform(struct ANativeWindow* window, int operation, ... );
- static int _cancelBuffer_DEPRECATED(struct ANativeWindow* window, ANativeWindowBuffer* buffer);
- static int _queueBuffer(struct ANativeWindow *window, ANativeWindowBuffer *buffer, int fenceFd);
- static int _dequeueBuffer(struct ANativeWindow *window, ANativeWindowBuffer **buffer, int *fenceFd);
- static int _cancelBuffer(struct ANativeWindow *window, ANativeWindowBuffer *buffer, int fenceFd);
-};
-
-#endif
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/server_wlegl.cpp
^
|
@@ -1,198 +0,0 @@
-/*
- * Copyright © 2012 Collabora, Ltd.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of the copyright holders not be used in
- * advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The copyright holders make
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <android-config.h>
-#include <cstring>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-extern "C" {
-#include <cutils/native_handle.h>
-}
-
-#include "logging.h"
-
-#include <wayland-server.h>
-#include "wayland-android-server-protocol.h"
-#include "server_wlegl_private.h"
-#include "server_wlegl_handle.h"
-#include "server_wlegl_buffer.h"
-
-#include <hybris/gralloc/gralloc.h>
-
-static inline server_wlegl *
-server_wlegl_from(struct wl_resource *resource)
-{
- return reinterpret_cast<server_wlegl *>(wl_resource_get_user_data(resource));
-}
-
-static void
-server_wlegl_create_handle(struct wl_client *client,
- struct wl_resource *resource,
- uint32_t id,
- int32_t num_fds,
- struct wl_array *ints)
-{
- server_wlegl_handle *handle;
-
- if (num_fds < 0) {
- wl_resource_post_error(resource,
- ANDROID_WLEGL_ERROR_BAD_VALUE,
- "num_fds is negative: %d", num_fds);
- return;
- }
-
- handle = server_wlegl_handle_create(id);
- wl_array_copy(&handle->ints, ints);
- handle->num_fds = num_fds;
- wl_client_add_resource(client, &handle->resource);
-}
-
-static void
-server_wlegl_create_buffer(struct wl_client *client,
- struct wl_resource *resource,
- uint32_t id,
- int32_t width,
- int32_t height,
- int32_t stride,
- int32_t format,
- int32_t usage,
- struct wl_resource *hnd)
-{
- server_wlegl *wlegl = server_wlegl_from(resource);
- server_wlegl_handle *handle = server_wlegl_handle_from(hnd);
- server_wlegl_buffer *buffer;
- buffer_handle_t native;
-
- if (width < 1 || height < 1) {
- wl_resource_post_error(resource,
- ANDROID_WLEGL_ERROR_BAD_VALUE,
- "bad width (%d) or height (%d)",
- width, height);
- return;
- }
-
- native = server_wlegl_handle_to_native(handle);
- if (!native) {
- wl_resource_post_error(resource,
- ANDROID_WLEGL_ERROR_BAD_HANDLE,
- "fd count mismatch");
- return;
- }
-
- buffer = server_wlegl_buffer_create(client, id, width, height, stride,
- format, usage, native, wlegl);
- if (!buffer) {
- native_handle_close((native_handle_t *)native);
- native_handle_delete((native_handle_t *)native);
- wl_resource_post_error(resource,
- ANDROID_WLEGL_ERROR_BAD_HANDLE,
- "invalid native handle");
- return;
- }
-}
-
-static void
-server_wlegl_get_server_buffer_handle(wl_client *client, wl_resource *res, uint32_t id, int32_t width, int32_t height, int32_t format, int32_t usage)
-{
- if (width == 0 || height == 0) {
- wl_resource_post_error(res, 0, "invalid buffer size: %u,%u\n", width, height);
- return;
- }
-
- server_wlegl *wlegl = server_wlegl_from(res);
-
- wl_resource *resource = wl_resource_create(client, &android_wlegl_server_buffer_handle_interface, wl_resource_get_version(res), id);
-
- buffer_handle_t _handle;
- int _stride;
-
- usage |= GRALLOC_USAGE_HW_COMPOSER;
-
- int r = hybris_gralloc_allocate(width, height, format, usage, &_handle, (uint32_t*)&_stride);
- if (r) {
- HYBRIS_ERROR_LOG(SERVER_WLEGL, "failed to allocate buffer\n");
- }
- server_wlegl_buffer *buffer = server_wlegl_buffer_create_server(client, width, height, _stride, format, usage, _handle, wlegl);
-
- struct wl_array ints;
- int *ints_data;
- wl_array_init(&ints);
- ints_data = (int*) wl_array_add(&ints, _handle->numInts * sizeof(int));
- memcpy(ints_data, _handle->data + _handle->numFds, _handle->numInts * sizeof(int));
-
- android_wlegl_server_buffer_handle_send_buffer_ints(resource, &ints);
- wl_array_release(&ints);
-
- for (int i = 0; i < _handle->numFds; i++) {
- android_wlegl_server_buffer_handle_send_buffer_fd(resource, _handle->data[i]);
- }
-
- android_wlegl_server_buffer_handle_send_buffer(resource, buffer->resource, format, _stride);
- wl_resource_destroy(resource);
-}
-
-static const struct android_wlegl_interface server_wlegl_impl = {
- server_wlegl_create_handle,
- server_wlegl_create_buffer,
- server_wlegl_get_server_buffer_handle,
-};
-
-static void
-server_wlegl_bind(struct wl_client *client, void *data,
- uint32_t version, uint32_t id)
-{
- server_wlegl *wlegl = reinterpret_cast<server_wlegl *>(data);
- struct wl_resource *resource;
-
- resource = wl_resource_create(client, &android_wlegl_interface, version, id);
- wl_resource_set_implementation(resource, &server_wlegl_impl, wlegl, 0);
-}
-
-server_wlegl *
-server_wlegl_create(struct wl_display *display)
-{
- struct server_wlegl *wlegl;
-
- wlegl = new server_wlegl;
-
- wlegl->display = display;
- wlegl->global = wl_global_create(display, &android_wlegl_interface, 2,
- wlegl, server_wlegl_bind);
-
- return wlegl;
-}
-
-void
-server_wlegl_destroy(server_wlegl *wlegl)
-{
- /* FIXME: server_wlegl_buffer objects may exist */
-
- /* FIXME: remove global_ */
-
- /* Better to leak than expose dtor segfaults, the server
- * supposedly exits soon after. */
- //LOGW("server_wlegl object leaked on UnbindWaylandDisplayWL");
- /* delete wlegl; */
-}
-
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/server_wlegl.h
^
|
@@ -1,45 +0,0 @@
-/*
- * Copyright © 2012 Collabora, Ltd.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of the copyright holders not be used in
- * advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The copyright holders make
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef SERVER_WLEGL_H
-#define SERVER_WLEGL_H
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <system/window.h>
-
-extern "C" {
-
-struct wl_display;
-struct wl_buffer;
-
-}
-
-struct server_wlegl;
-
-server_wlegl *
-server_wlegl_create(struct wl_display *wldpy);
-
-void
-server_wlegl_destroy(server_wlegl *wlegl);
-
-#endif /* SERVER_WLEGL_H */
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/server_wlegl_buffer.cpp
^
|
@@ -1,108 +0,0 @@
-/*
- * Copyright © 2012 Collabora, Ltd.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of the copyright holders not be used in
- * advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The copyright holders make
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <android-config.h>
-#include <cstring>
-#include <cassert>
-
-#include "server_wlegl_buffer.h"
-#include "server_wlegl_private.h"
-
-#include <hybris/gralloc/gralloc.h>
-
-static void
-destroy(struct wl_client *client, struct wl_resource *resource)
-{
- wl_resource_destroy(resource);
-}
-
-static const struct wl_buffer_interface server_wlegl_buffer_impl = {
- destroy
-};
-
-server_wlegl_buffer *
-server_wlegl_buffer_from(struct wl_resource *buffer)
-{
- return static_cast<server_wlegl_buffer *>(wl_resource_get_user_data(buffer));
-}
-
-static void
-server_wlegl_buffer_dtor(struct wl_resource *resource)
-{
- server_wlegl_buffer *buffer = server_wlegl_buffer_from(resource);
- buffer->buf->common.decRef(&buffer->buf->common);
- delete buffer;
-}
-
-server_wlegl_buffer *
-server_wlegl_buffer_create(wl_client *client,
- uint32_t id,
- int32_t width,
- int32_t height,
- int32_t stride,
- int32_t format,
- int32_t usage,
- buffer_handle_t handle,
- server_wlegl *wlegl)
-{
- server_wlegl_buffer *buffer = new server_wlegl_buffer;
- int ret;
-
- buffer->wlegl = wlegl;
- buffer->resource = wl_resource_create(client, &wl_buffer_interface, 1, id);
- wl_resource_set_implementation(buffer->resource, &server_wlegl_buffer_impl, buffer, server_wlegl_buffer_dtor);
-
- ret = hybris_gralloc_retain(handle);
- if (ret) {
- delete buffer;
- return NULL;
- }
-
- buffer->buf = new RemoteWindowBuffer(
- width, height, stride, format, usage, handle);
- buffer->buf->common.incRef(&buffer->buf->common);
- return buffer;
-}
-
-server_wlegl_buffer *
-server_wlegl_buffer_create_server(wl_client *client,
- int32_t width,
- int32_t height,
- int32_t stride,
- int32_t format,
- int32_t usage,
- buffer_handle_t handle,
- server_wlegl *wlegl)
-{
- server_wlegl_buffer *buffer = new server_wlegl_buffer;
-
- buffer->wlegl = wlegl;
- buffer->resource = wl_resource_create(client, &wl_buffer_interface, 1, 0);
- wl_resource_set_implementation(buffer->resource, &server_wlegl_buffer_impl, buffer, server_wlegl_buffer_dtor);
-
- buffer->buf = new RemoteWindowBuffer(
- width, height, stride, format, usage, handle);
- buffer->buf->setAllocated(true);
- buffer->buf->common.incRef(&buffer->buf->common);
- return buffer;
-}
-
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/support.h
^
|
@@ -1,17 +0,0 @@
-#ifndef SUPPORT_H_
-#define SUPPORT_H_
-
-#include <stddef.h>
-
-/**
- * container_of - cast a member of a structure out to the containing structure
- * @ptr: the pointer to the member.
- * @type: the type of the container struct this is embedded in.
- * @member: the name of the member within the struct.
- *
- */
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-
-#endif
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/wayland-egl-priv.h
^
|
@@ -1,42 +0,0 @@
-#ifndef _WAYLAND_EGL_PRIV_H
-#define _WAYLAND_EGL_PRIV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* GCC visibility */
-#if defined(__GNUC__) && __GNUC__ >= 4
-#define WL_EGL_EXPORT __attribute__ ((visibility("default")))
-#else
-#define WL_EGL_EXPORT
-#endif
-
-#include <wayland-client.h>
-
-#define WL_EGL_WINDOW_VERSION 3
-
-struct wl_egl_window {
- const intptr_t version;
-
- int width;
- int height;
- int dx;
- int dy;
-
- int attached_width;
- int attached_height;
-
- void *driver_private;
- void (*resize_callback)(struct wl_egl_window *, void *);
- void (*destroy_window_callback)(void *);
-
- struct wl_surface *surface;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/wayland-egl.c
^
|
@@ -1,63 +0,0 @@
-#include <android-config.h>
-#include <stdlib.h>
-
-#include <wayland-client.h>
-#include <wayland-egl.h>
-#include "wayland-egl-priv.h"
-
-WL_EGL_EXPORT void
-wl_egl_window_resize(struct wl_egl_window *egl_window,
- int width, int height,
- int dx, int dy)
-{
- egl_window->width = width;
- egl_window->height = height;
- egl_window->dx = dx;
- egl_window->dy = dy;
-
- if (egl_window->resize_callback)
- egl_window->resize_callback(egl_window, NULL);
-}
-
-WL_EGL_EXPORT struct wl_egl_window *
-wl_egl_window_create(struct wl_surface *surface,
- int width, int height)
-{
- struct wl_egl_window *egl_window;
-
- egl_window = malloc(sizeof *egl_window);
- if (!egl_window)
- return NULL;
-
- intptr_t *version = (intptr_t *)&egl_window->version;
- *version = WL_EGL_WINDOW_VERSION;
- egl_window->surface = surface;
- egl_window->resize_callback = NULL;
- egl_window->destroy_window_callback = NULL;
- wl_egl_window_resize(egl_window, width, height, 0, 0);
- egl_window->attached_width = 0;
- egl_window->attached_height = 0;
- egl_window->driver_private = 0;
-
- return egl_window;
-
-}
-
-WL_EGL_EXPORT void
-wl_egl_window_destroy(struct wl_egl_window *egl_window)
-{
- if (egl_window->destroy_window_callback)
- egl_window->destroy_window_callback(egl_window->driver_private);
- free(egl_window);
-}
-
-WL_EGL_EXPORT void
-wl_egl_window_get_attached_size(struct wl_egl_window *egl_window,
- int *width, int *height)
-{
- if (width)
- *width = egl_window->attached_width;
- if (height)
- *height = egl_window->attached_height;
-}
-
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/egl/platforms/common/wayland-egl.pc.in
^
|
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=${prefix}
-libdir=@libdir@
-includedir=@includedir@
-
-Name: wayland-egl
-Description: libhybris wayland-egl library
-Version: @VERSION@
-Libs: -L${libdir} -lwayland-egl
-Cflags: -I${includedir}
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/CL/cl.hpp
^
|
@@ -1,8075 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- ******************************************************************************/
-
-/*! \file
- *
- * \brief C++ bindings for OpenCL 1.0 (rev 48), OpenCL 1.1 (rev 33) and
- * OpenCL 1.2 (rev 15)
- * \author Benedict R. Gaster, Laurent Morichetti and Lee Howes
- *
- * Additions and fixes from:
- * Brian Cole, March 3rd 2010 and April 2012
- * Matt Gruenke, April 2012.
- * Bruce Merry, February 2013.
- * Tom Deakin and Simon McIntosh-Smith, July 2013
- *
- * \version 1.2.9
- * \date December 2015
- *
- * Optional extension support
- *
- * cl
- * cl_ext_device_fission
- * #define USE_CL_DEVICE_FISSION
- */
-
-/*! \mainpage
- * \section intro Introduction
- * For many large applications C++ is the language of choice and so it seems
- * reasonable to define C++ bindings for OpenCL.
- *
- *
- * The interface is contained with a single C++ header file \em cl.hpp and all
- * definitions are contained within the namespace \em cl. There is no additional
- * requirement to include \em cl.h and to use either the C++ or original C
- * bindings it is enough to simply include \em cl.hpp.
- *
- * The bindings themselves are lightweight and correspond closely to the
- * underlying C API. Using the C++ bindings introduces no additional execution
- * overhead.
- *
- * For detail documentation on the bindings see:
- *
- * The OpenCL C++ Wrapper API 1.2 (revision 09)
- * http://www.khronos.org/registry/cl/specs/opencl-cplusplus-1.2.pdf
- *
- * \section example Example
- *
- * The following example shows a general use case for the C++
- * bindings, including support for the optional exception feature and
- * also the supplied vector and string classes, see following sections for
- * decriptions of these features.
- *
- * \code
- * #define __CL_ENABLE_EXCEPTIONS
- *
- * #if defined(__APPLE__) || defined(__MACOSX)
- * #include <OpenCL/cl.hpp>
- * #else
- * #include <CL/cl.hpp>
- * #endif
- * #include <cstdio>
- * #include <cstdlib>
- * #include <iostream>
- *
- * const char * helloStr = "__kernel void "
- * "hello(void) "
- * "{ "
- * " "
- * "} ";
- *
- * int
- * main(void)
- * {
- * cl_int err = CL_SUCCESS;
- * try {
- *
- * std::vector<cl::Platform> platforms;
- * cl::Platform::get(&platforms);
- * if (platforms.size() == 0) {
- * std::cout << "Platform size 0\n";
- * return -1;
- * }
- *
- * cl_context_properties properties[] =
- * { CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[0])(), 0};
- * cl::Context context(CL_DEVICE_TYPE_CPU, properties);
- *
- * std::vector<cl::Device> devices = context.getInfo<CL_CONTEXT_DEVICES>();
- *
- * cl::Program::Sources source(1,
- * std::make_pair(helloStr,strlen(helloStr)));
- * cl::Program program_ = cl::Program(context, source);
- * program_.build(devices);
- *
- * cl::Kernel kernel(program_, "hello", &err);
- *
- * cl::Event event;
- * cl::CommandQueue queue(context, devices[0], 0, &err);
- * queue.enqueueNDRangeKernel(
- * kernel,
- * cl::NullRange,
- * cl::NDRange(4,4),
- * cl::NullRange,
- * NULL,
- * &event);
- *
- * event.wait();
- * }
- * catch (cl::Error err) {
- * std::cerr
- * << "ERROR: "
- * << err.what()
- * << "("
- * << err.err()
- * << ")"
- * << std::endl;
- * }
- *
- * return EXIT_SUCCESS;
- * }
- *
- * \endcode
- *
- */
-#ifndef CL_HPP_
-#define CL_HPP_
-
-#ifdef _WIN32
-
-#include <malloc.h>
-
-#if defined(USE_DX_INTEROP)
-#include <CL/cl_d3d10.h>
-#include <CL/cl_dx9_media_sharing.h>
-#endif
-#endif // _WIN32
-
-#if defined(_MSC_VER)
-#include <intrin.h>
-#endif // _MSC_VER
-
-//
-#if defined(USE_CL_DEVICE_FISSION)
-#include <CL/cl_ext.h>
-#endif
-
-#if defined(__APPLE__) || defined(__MACOSX)
-#include <OpenCL/opencl.h>
-#else
-#include <CL/opencl.h>
-#endif // !__APPLE__
-
-#if (_MSC_VER >= 1700) || (__cplusplus >= 201103L)
-#define CL_HPP_RVALUE_REFERENCES_SUPPORTED
-#define CL_HPP_CPP11_ATOMICS_SUPPORTED
-#include <atomic>
-#endif
-
-#if (__cplusplus >= 201103L)
-#define CL_HPP_NOEXCEPT noexcept
-#else
-#define CL_HPP_NOEXCEPT
-#endif
-
-
-// To avoid accidentally taking ownership of core OpenCL types
-// such as cl_kernel constructors are made explicit
-// under OpenCL 1.2
-#if defined(CL_VERSION_1_2) && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
-#define __CL_EXPLICIT_CONSTRUCTORS explicit
-#else // #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
-#define __CL_EXPLICIT_CONSTRUCTORS
-#endif // #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
-
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/CL/cl2.hpp
^
|
@@ -1,9678 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2016 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- ******************************************************************************/
-
-/*! \file
- *
- * \brief C++ bindings for OpenCL 1.0 (rev 48), OpenCL 1.1 (rev 33),
- * OpenCL 1.2 (rev 15) and OpenCL 2.0 (rev 29)
- * \author Lee Howes and Bruce Merry
- *
- * Derived from the OpenCL 1.x C++ bindings written by
- * Benedict R. Gaster, Laurent Morichetti and Lee Howes
- * With additions and fixes from:
- * Brian Cole, March 3rd 2010 and April 2012
- * Matt Gruenke, April 2012.
- * Bruce Merry, February 2013.
- * Tom Deakin and Simon McIntosh-Smith, July 2013
- * James Price, 2015-
- *
- * \version 2.0.10
- * \date 2016-07-20
- *
- * Optional extension support
- *
- * cl_ext_device_fission
- * #define CL_HPP_USE_CL_DEVICE_FISSION
- * cl_khr_d3d10_sharing
- * #define CL_HPP_USE_DX_INTEROP
- * cl_khr_sub_groups
- * #define CL_HPP_USE_CL_SUB_GROUPS_KHR
- * cl_khr_image2d_from_buffer
- * #define CL_HPP_USE_CL_IMAGE2D_FROM_BUFFER_KHR
- *
- * Doxygen documentation for this header is available here:
- *
- * http://khronosgroup.github.io/OpenCL-CLHPP/
- *
- * The latest version of this header can be found on the GitHub releases page:
- *
- * https://github.com/KhronosGroup/OpenCL-CLHPP/releases
- *
- * Bugs and patches can be submitted to the GitHub repository:
- *
- * https://github.com/KhronosGroup/OpenCL-CLHPP
- */
-
-/*! \mainpage
- * \section intro Introduction
- * For many large applications C++ is the language of choice and so it seems
- * reasonable to define C++ bindings for OpenCL.
- *
- * The interface is contained with a single C++ header file \em cl2.hpp and all
- * definitions are contained within the namespace \em cl. There is no additional
- * requirement to include \em cl.h and to use either the C++ or original C
- * bindings; it is enough to simply include \em cl2.hpp.
- *
- * The bindings themselves are lightweight and correspond closely to the
- * underlying C API. Using the C++ bindings introduces no additional execution
- * overhead.
- *
- * There are numerous compatibility, portability and memory management
- * fixes in the new header as well as additional OpenCL 2.0 features.
- * As a result the header is not directly backward compatible and for this
- * reason we release it as cl2.hpp rather than a new version of cl.hpp.
- *
- *
- * \section compatibility Compatibility
- * Due to the evolution of the underlying OpenCL API the 2.0 C++ bindings
- * include an updated approach to defining supported feature versions
- * and the range of valid underlying OpenCL runtime versions supported.
- *
- * The combination of preprocessor macros CL_HPP_TARGET_OPENCL_VERSION and
- * CL_HPP_MINIMUM_OPENCL_VERSION control this range. These are three digit
- * decimal values representing OpenCL runime versions. The default for
- * the target is 200, representing OpenCL 2.0 and the minimum is also
- * defined as 200. These settings would use 2.0 API calls only.
- * If backward compatibility with a 1.2 runtime is required, the minimum
- * version may be set to 120.
- *
- * Note that this is a compile-time setting, and so affects linking against
- * a particular SDK version rather than the versioning of the loaded runtime.
- *
- * The earlier versions of the header included basic vector and string
- * classes based loosely on STL versions. These were difficult to
- * maintain and very rarely used. For the 2.0 header we now assume
- * the presence of the standard library unless requested otherwise.
- * We use std::array, std::vector, std::shared_ptr and std::string
- * throughout to safely manage memory and reduce the chance of a
- * recurrance of earlier memory management bugs.
- *
- * These classes are used through typedefs in the cl namespace:
- * cl::array, cl::vector, cl::pointer and cl::string.
- * In addition cl::allocate_pointer forwards to std::allocate_shared
- * by default.
- * In all cases these standard library classes can be replaced with
- * custom interface-compatible versions using the CL_HPP_NO_STD_ARRAY,
- * CL_HPP_NO_STD_VECTOR, CL_HPP_NO_STD_UNIQUE_PTR and
- * CL_HPP_NO_STD_STRING macros.
- *
- * The OpenCL 1.x versions of the C++ bindings included a size_t wrapper
- * class to interface with kernel enqueue. This caused unpleasant interactions
- * with the standard size_t declaration and led to namespacing bugs.
- * In the 2.0 version we have replaced this with a std::array-based interface.
- * However, the old behaviour can be regained for backward compatibility
- * using the CL_HPP_ENABLE_SIZE_T_COMPATIBILITY macro.
- *
- * Finally, the program construction interface used a clumsy vector-of-pairs
- * design in the earlier versions. We have replaced that with a cleaner
- * vector-of-vectors and vector-of-strings design. However, for backward
- * compatibility old behaviour can be regained with the
- * CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY macro.
- *
- * In OpenCL 2.0 OpenCL C is not entirely backward compatibility with
- * earlier versions. As a result a flag must be passed to the OpenCL C
- * compiled to request OpenCL 2.0 compilation of kernels with 1.2 as
- * the default in the absence of the flag.
- * In some cases the C++ bindings automatically compile code for ease.
- * For those cases the compilation defaults to OpenCL C 2.0.
- * If this is not wanted, the CL_HPP_CL_1_2_DEFAULT_BUILD macro may
- * be specified to assume 1.2 compilation.
- * If more fine-grained decisions on a per-kernel bases are required
- * then explicit build operations that take the flag should be used.
- *
- *
- * \section parameterization Parameters
- * This header may be parameterized by a set of preprocessor macros.
- *
- * - CL_HPP_TARGET_OPENCL_VERSION
- *
- * Defines the target OpenCL runtime version to build the header
- * against. Defaults to 200, representing OpenCL 2.0.
- *
- * - CL_HPP_NO_STD_STRING
- *
- * Do not use the standard library string class. cl::string is not
- * defined and may be defined by the user before cl2.hpp is
- * included.
- *
- * - CL_HPP_NO_STD_VECTOR
- *
- * Do not use the standard library vector class. cl::vector is not
- * defined and may be defined by the user before cl2.hpp is
- * included.
- *
- * - CL_HPP_NO_STD_ARRAY
- *
- * Do not use the standard library array class. cl::array is not
- * defined and may be defined by the user before cl2.hpp is
- * included.
- *
- * - CL_HPP_NO_STD_UNIQUE_PTR
- *
- * Do not use the standard library unique_ptr class. cl::pointer and
- * the cl::allocate_pointer functions are not defined and may be
- * defined by the user before cl2.hpp is included.
- *
- * - CL_HPP_ENABLE_DEVICE_FISSION
- *
- * Enables device fission for OpenCL 1.2 platforms.
- *
- * - CL_HPP_ENABLE_EXCEPTIONS
- *
- * Enable exceptions for use in the C++ bindings header. This is the
- * preferred error handling mechanism but is not required.
- *
- * - CL_HPP_ENABLE_SIZE_T_COMPATIBILITY
- *
- * Backward compatibility option to support cl.hpp-style size_t
- * class. Replaces the updated std::array derived version and
- * removal of size_t from the namespace. Note that in this case the
- * new size_t class is placed in the cl::compatibility namespace and
- * thus requires an additional using declaration for direct backward
- * compatibility.
- *
- * - CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/GL/gl_mangle.h
^
|
@@ -1,2311 +0,0 @@
-#if 0
-#define GL_MANGLE_C1 "DO NOT EDIT!!! - TO REGENERATE from gl.h, EXECUTE THIS FILE IN SHELL (/bin/sh) and save the output"
-#define GL_MANGLE_C2 "This file is used to create GL function protypes and aliases for the function names"
- files="gl.h glext.h"
-#define GL_MANGLE_C3 "get regeneration header - copy everything in this file above the 'REGENERATE_TO_END' line"
- awk '!done; /^\/\*REGENERATE_TO_END/ {done=1}' $0
- echo ""
-#define GL_MANGLE_C4 get aliases
- grep '^GLAPI' $files | sed -e 's/.*ENTRY gl\([^( ]*\).*$/#define gl\1 MANGLE(\1)/' | sort | uniq
- echo ""
- echo "#endif /* GL_MANGLE_H */"
- exit
-#endif /* REGENERATION */
-
-/*
- * If you compile Mesa with USE_MGL_NAMESPACE defined then you can link
- * your application both with OpenGL and Mesa. The Mesa functions will
- * be redefined so they are prefixed with "mgl" instead of "gl".
- * Mgl contributed by Randy Frank (rfrank@rsinc.com)
- * Regneration code contributed by Ray Tice (rayt@ma.ultra.net)
- */
-
-#ifndef GL_MANGLE_H
-#define GL_MANGLE_H
-
-#ifndef MANGLE
-#define MANGLE(x) mgl##x
-#endif /*MANGLE*/
-
-/*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */
-
-#define glAccum MANGLE(Accum)
-#define glActiveProgramEXT MANGLE(ActiveProgramEXT)
-#define glActiveShaderProgram MANGLE(ActiveShaderProgram)
-#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
-#define glActiveTextureARB MANGLE(ActiveTextureARB)
-#define glActiveTexture MANGLE(ActiveTexture)
-#define glActiveVaryingNV MANGLE(ActiveVaryingNV)
-#define glAlphaFragmentOp1ATI MANGLE(AlphaFragmentOp1ATI)
-#define glAlphaFragmentOp2ATI MANGLE(AlphaFragmentOp2ATI)
-#define glAlphaFragmentOp3ATI MANGLE(AlphaFragmentOp3ATI)
-#define glAlphaFunc MANGLE(AlphaFunc)
-#define glApplyTextureEXT MANGLE(ApplyTextureEXT)
-#define glAreProgramsResidentNV MANGLE(AreProgramsResidentNV)
-#define glAreTexturesResidentEXT MANGLE(AreTexturesResidentEXT)
-#define glAreTexturesResident MANGLE(AreTexturesResident)
-#define glArrayElementEXT MANGLE(ArrayElementEXT)
-#define glArrayElement MANGLE(ArrayElement)
-#define glArrayObjectATI MANGLE(ArrayObjectATI)
-#define glAsyncMarkerSGIX MANGLE(AsyncMarkerSGIX)
-#define glAttachObjectARB MANGLE(AttachObjectARB)
-#define glAttachShader MANGLE(AttachShader)
-#define glBeginConditionalRender MANGLE(BeginConditionalRender)
-#define glBeginConditionalRenderNV MANGLE(BeginConditionalRenderNV)
-#define glBeginFragmentShaderATI MANGLE(BeginFragmentShaderATI)
-#define glBegin MANGLE(Begin)
-#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
-#define glBeginPerfMonitorAMD MANGLE(BeginPerfMonitorAMD)
-#define glBeginQueryARB MANGLE(BeginQueryARB)
-#define glBeginQueryIndexed MANGLE(BeginQueryIndexed)
-#define glBeginQuery MANGLE(BeginQuery)
-#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT)
-#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
-#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
-#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
-#define glBeginVideoCaptureNV MANGLE(BeginVideoCaptureNV)
-#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
-#define glBindAttribLocation MANGLE(BindAttribLocation)
-#define glBindBufferARB MANGLE(BindBufferARB)
-#define glBindBufferBaseEXT MANGLE(BindBufferBaseEXT)
-#define glBindBufferBase MANGLE(BindBufferBase)
-#define glBindBufferBaseNV MANGLE(BindBufferBaseNV)
-#define glBindBuffer MANGLE(BindBuffer)
-#define glBindBufferOffsetEXT MANGLE(BindBufferOffsetEXT)
-#define glBindBufferOffsetNV MANGLE(BindBufferOffsetNV)
-#define glBindBufferRangeEXT MANGLE(BindBufferRangeEXT)
-#define glBindBufferRange MANGLE(BindBufferRange)
-#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
-#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
-#define glBindFragDataLocationIndexed MANGLE(BindFragDataLocationIndexed)
-#define glBindFragDataLocation MANGLE(BindFragDataLocation)
-#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
-#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
-#define glBindFramebuffer MANGLE(BindFramebuffer)
-#define glBindImageTextureEXT MANGLE(BindImageTextureEXT)
-#define glBindLightParameterEXT MANGLE(BindLightParameterEXT)
-#define glBindMaterialParameterEXT MANGLE(BindMaterialParameterEXT)
-#define glBindMultiTextureEXT MANGLE(BindMultiTextureEXT)
-#define glBindParameterEXT MANGLE(BindParameterEXT)
-#define glBindProgramARB MANGLE(BindProgramARB)
-#define glBindProgramNV MANGLE(BindProgramNV)
-#define glBindProgramPipeline MANGLE(BindProgramPipeline)
-#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT)
-#define glBindRenderbuffer MANGLE(BindRenderbuffer)
-#define glBindSampler MANGLE(BindSampler)
-#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT)
-#define glBindTextureEXT MANGLE(BindTextureEXT)
-#define glBindTexture MANGLE(BindTexture)
-#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT)
-#define glBindTransformFeedback MANGLE(BindTransformFeedback)
-#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV)
-#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
-#define glBindVertexArray MANGLE(BindVertexArray)
-#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT)
-#define glBindVideoCaptureStreamBufferNV MANGLE(BindVideoCaptureStreamBufferNV)
-#define glBindVideoCaptureStreamTextureNV MANGLE(BindVideoCaptureStreamTextureNV)
-#define glBinormal3bEXT MANGLE(Binormal3bEXT)
-#define glBinormal3bvEXT MANGLE(Binormal3bvEXT)
-#define glBinormal3dEXT MANGLE(Binormal3dEXT)
-#define glBinormal3dvEXT MANGLE(Binormal3dvEXT)
-#define glBinormal3fEXT MANGLE(Binormal3fEXT)
-#define glBinormal3fvEXT MANGLE(Binormal3fvEXT)
-#define glBinormal3iEXT MANGLE(Binormal3iEXT)
-#define glBinormal3ivEXT MANGLE(Binormal3ivEXT)
-#define glBinormal3sEXT MANGLE(Binormal3sEXT)
-#define glBinormal3svEXT MANGLE(Binormal3svEXT)
-#define glBinormalPointerEXT MANGLE(BinormalPointerEXT)
-#define glBitmap MANGLE(Bitmap)
-#define glBlendColorEXT MANGLE(BlendColorEXT)
-#define glBlendColor MANGLE(BlendColor)
-#define glBlendEquationEXT MANGLE(BlendEquationEXT)
-#define glBlendEquationiARB MANGLE(BlendEquationiARB)
-#define glBlendEquationi MANGLE(BlendEquationi)
-#define glBlendEquationIndexedAMD MANGLE(BlendEquationIndexedAMD)
-#define glBlendEquation MANGLE(BlendEquation)
-#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI)
-#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT)
-#define glBlendEquationSeparateiARB MANGLE(BlendEquationSeparateiARB)
-#define glBlendEquationSeparatei MANGLE(BlendEquationSeparatei)
-#define glBlendEquationSeparateIndexedAMD MANGLE(BlendEquationSeparateIndexedAMD)
-#define glBlendEquationSeparate MANGLE(BlendEquationSeparate)
-#define glBlendFunciARB MANGLE(BlendFunciARB)
-#define glBlendFunci MANGLE(BlendFunci)
-#define glBlendFuncIndexedAMD MANGLE(BlendFuncIndexedAMD)
-#define glBlendFunc MANGLE(BlendFunc)
-#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
-#define glBlendFuncSeparateiARB MANGLE(BlendFuncSeparateiARB)
-#define glBlendFuncSeparatei MANGLE(BlendFuncSeparatei)
-#define glBlendFuncSeparateIndexedAMD MANGLE(BlendFuncSeparateIndexedAMD)
-#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
-#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
-#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
-#define glBlitFramebuffer MANGLE(BlitFramebuffer)
-#define glBufferAddressRangeNV MANGLE(BufferAddressRangeNV)
-#define glBufferDataARB MANGLE(BufferDataARB)
-#define glBufferData MANGLE(BufferData)
-#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
-#define glBufferSubDataARB MANGLE(BufferSubDataARB)
-#define glBufferSubData MANGLE(BufferSubData)
-#define glCallList MANGLE(CallList)
-#define glCallLists MANGLE(CallLists)
-#define glCheckFramebufferStatusEXT MANGLE(CheckFramebufferStatusEXT)
-#define glCheckFramebufferStatus MANGLE(CheckFramebufferStatus)
-#define glCheckNamedFramebufferStatusEXT MANGLE(CheckNamedFramebufferStatusEXT)
-#define glClampColorARB MANGLE(ClampColorARB)
-#define glClampColor MANGLE(ClampColor)
-#define glClearAccum MANGLE(ClearAccum)
-#define glClearBufferfi MANGLE(ClearBufferfi)
-#define glClearBufferfv MANGLE(ClearBufferfv)
-#define glClearBufferiv MANGLE(ClearBufferiv)
-#define glClearBufferuiv MANGLE(ClearBufferuiv)
-#define glClearColorIiEXT MANGLE(ClearColorIiEXT)
-#define glClearColorIuiEXT MANGLE(ClearColorIuiEXT)
-#define glClearColor MANGLE(ClearColor)
-#define glClearDebugLogMESA MANGLE(ClearDebugLogMESA)
-#define glClearDepthdNV MANGLE(ClearDepthdNV)
-#define glClearDepthf MANGLE(ClearDepthf)
-#define glClearDepth MANGLE(ClearDepth)
-#define glClearIndex MANGLE(ClearIndex)
-#define glClear MANGLE(Clear)
-#define glClearStencil MANGLE(ClearStencil)
-#define glClientActiveTextureARB MANGLE(ClientActiveTextureARB)
-#define glClientActiveTexture MANGLE(ClientActiveTexture)
-#define glClientActiveVertexStreamATI MANGLE(ClientActiveVertexStreamATI)
-#define glClientAttribDefaultEXT MANGLE(ClientAttribDefaultEXT)
-#define glClientWaitSync MANGLE(ClientWaitSync)
-#define glClipPlane MANGLE(ClipPlane)
-#define glColor3b MANGLE(Color3b)
-#define glColor3bv MANGLE(Color3bv)
-#define glColor3d MANGLE(Color3d)
-#define glColor3dv MANGLE(Color3dv)
-#define glColor3f MANGLE(Color3f)
-#define glColor3fVertex3fSUN MANGLE(Color3fVertex3fSUN)
-#define glColor3fVertex3fvSUN MANGLE(Color3fVertex3fvSUN)
-#define glColor3fv MANGLE(Color3fv)
-#define glColor3hNV MANGLE(Color3hNV)
-#define glColor3hvNV MANGLE(Color3hvNV)
-#define glColor3i MANGLE(Color3i)
-#define glColor3iv MANGLE(Color3iv)
-#define glColor3s MANGLE(Color3s)
-#define glColor3sv MANGLE(Color3sv)
-#define glColor3ub MANGLE(Color3ub)
-#define glColor3ubv MANGLE(Color3ubv)
-#define glColor3ui MANGLE(Color3ui)
-#define glColor3uiv MANGLE(Color3uiv)
-#define glColor3us MANGLE(Color3us)
-#define glColor3usv MANGLE(Color3usv)
-#define glColor4b MANGLE(Color4b)
-#define glColor4bv MANGLE(Color4bv)
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/GL/glx_mangle.h
^
|
@@ -1,82 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef GLX_MANGLE_H
-#define GLX_MANGLE_H
-
-#define glXChooseVisual mglXChooseVisual
-#define glXCreateContext mglXCreateContext
-#define glXDestroyContext mglXDestroyContext
-#define glXMakeCurrent mglXMakeCurrent
-#define glXCopyContext mglXCopyContext
-#define glXSwapBuffers mglXSwapBuffers
-#define glXCreateGLXPixmap mglXCreateGLXPixmap
-#define glXDestroyGLXPixmap mglXDestroyGLXPixmap
-#define glXQueryExtension mglXQueryExtension
-#define glXQueryVersion mglXQueryVersion
-#define glXIsDirect mglXIsDirect
-#define glXGetConfig mglXGetConfig
-#define glXGetCurrentContext mglXGetCurrentContext
-#define glXGetCurrentDrawable mglXGetCurrentDrawable
-#define glXWaitGL mglXWaitGL
-#define glXWaitX mglXWaitX
-#define glXUseXFont mglXUseXFont
-#define glXQueryExtensionsString mglXQueryExtensionsString
-#define glXQueryServerString mglXQueryServerString
-#define glXGetClientString mglXGetClientString
-#define glXCreateGLXPixmapMESA mglXCreateGLXPixmapMESA
-#define glXReleaseBuffersMESA mglXReleaseBuffersMESA
-#define glXCopySubBufferMESA mglXCopySubBufferMESA
-#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
-#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
-
-/* GLX 1.2 */
-#define glXGetCurrentDisplay mglXGetCurrentDisplay
-
-/* GLX 1.3 */
-#define glXChooseFBConfig mglXChooseFBConfig
-#define glXGetFBConfigAttrib mglXGetFBConfigAttrib
-#define glXGetFBConfigs mglXGetFBConfigs
-#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig
-#define glXCreateWindow mglXCreateWindow
-#define glXDestroyWindow mglXDestroyWindow
-#define glXCreatePixmap mglXCreatePixmap
-#define glXDestroyPixmap mglXDestroyPixmap
-#define glXCreatePbuffer mglXCreatePbuffer
-#define glXDestroyPbuffer mglXDestroyPbuffer
-#define glXQueryDrawable mglXQueryDrawable
-#define glXCreateNewContext mglXCreateNewContext
-#define glXMakeContextCurrent mglXMakeContextCurrent
-#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable
-#define glXQueryContext mglXQueryContext
-#define glXSelectEvent mglXSelectEvent
-#define glXGetSelectedEvent mglXGetSelectedEvent
-
-/* GLX 1.4 */
-#define glXGetProcAddress mglXGetProcAddress
-#define glXGetProcAddressARB mglXGetProcAddressARB
-
-
-#endif
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/GL/internal/sarea.h
^
|
@@ -1,92 +0,0 @@
-/**
- * \file sarea.h
- * SAREA definitions.
- *
- * \author Kevin E. Martin <kevin@precisioninsight.com>
- * \author Jens Owen <jens@tungstengraphics.com>
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- */
-
-/*
- * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef _SAREA_H_
-#define _SAREA_H_
-
-#include "xf86drm.h"
-
-/* SAREA area needs to be at least a page */
-#if defined(__alpha__)
-#define SAREA_MAX 0x2000
-#elif defined(__ia64__)
-#define SAREA_MAX 0x10000 /* 64kB */
-#else
-/* Intel 830M driver needs at least 8k SAREA */
-#define SAREA_MAX 0x2000
-#endif
-
-#define SAREA_MAX_DRAWABLES 256
-
-#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
-
-/**
- * SAREA per drawable information.
- *
- * \sa _XF86DRISAREA.
- */
-typedef struct _XF86DRISAREADrawable {
- unsigned int stamp;
- unsigned int flags;
-} XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr;
-
-/**
- * SAREA frame information.
- *
- * \sa _XF86DRISAREA.
- */
-typedef struct _XF86DRISAREAFrame {
- unsigned int x;
- unsigned int y;
- unsigned int width;
- unsigned int height;
- unsigned int fullscreen;
-} XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr;
-
-/**
- * SAREA definition.
- */
-typedef struct _XF86DRISAREA {
- /** first thing is always the DRM locking structure */
- drmLock lock;
- /** \todo Use readers/writer lock for drawable_lock */
- drmLock drawable_lock;
- XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
- XF86DRISAREAFrameRec frame;
- drm_context_t dummy_context;
-} XF86DRISAREARec, *XF86DRISAREAPtr;
-
-#endif
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/GL/vms_x_fix.h
^
|
@@ -1,1224 +0,0 @@
-/***************************************************************************
- * *
- * Author : Jouk Jansen (joukj@hrem.nano.tudelft.nl) *
- * *
- * Last revision : 31 August 2006 *
- * *
- * Repair definitions of Runtime library functions when compiling with *
- * /name=(as_is) on OpenVMS *
- * *
- ***************************************************************************/
-
-#ifndef VMS_X_FIX
-#define VMS_X_FIX
-
-#define decw$_select DECW$_SELECT
-#define DtSaverGetWindows DTSAVERGETWINDOWS
-#define MrmFetchWidget MRMFETCHWIDGET
-#define MrmInitialize MRMINITIALIZE
-#define MrmOpenHierarchy MRMOPENHIERARCHY
-#define MrmRegisterNames MRMREGISTERNAMES
-#define XAddExtension XADDEXTENSION
-#define XAddHosts XADDHOSTS
-#define XAllocClassHint XALLOCCLASSHINT
-#define XAllocColor XALLOCCOLOR
-#define XAllocColorCells XALLOCCOLORCELLS
-#define XAllocIconSize XALLOCICONSIZE
-#define XAllocNamedColor XALLOCNAMEDCOLOR
-#define XAllocSizeHints XALLOCSIZEHINTS
-#define XAllocStandardColormap XALLOCSTANDARDCOLORMAP
-#define XAllocWMHints XALLOCWMHINTS
-#define XAllowEvents XALLOWEVENTS
-#define XAutoRepeatOff XAUTOREPEATOFF
-#define XAutoRepeatOn XAUTOREPEATON
-#define XBaseFontNameListOfFontSet XBASEFONTNAMELISTOFFONTSET
-#define XBell XBELL
-#define XBitmapPad XBITMAPPAD
-#define XBlackPixel XBLACKPIXEL
-#define XBlackPixelOfScreen XBLACKPIXELOFSCREEN
-#define XCellsOfScreen XCELLSOFSCREEN
-#define XChangeActivePointerGrab XCHANGEACTIVEPOINTERGRAB
-#define XChangeGC XCHANGEGC
-#define XChangeKeyboardControl XCHANGEKEYBOARDCONTROL
-#define XChangePointerControl XCHANGEPOINTERCONTROL
-#define XChangeProperty XCHANGEPROPERTY
-#define XChangeWindowAttributes XCHANGEWINDOWATTRIBUTES
-#define XCheckIfEvent XCHECKIFEVENT
-#define XCheckMaskEvent XCHECKMASKEVENT
-#define XCheckTypedEvent XCHECKTYPEDEVENT
-#define XCheckTypedWindowEvent XCHECKTYPEDWINDOWEVENT
-#define XCheckWindowEvent XCHECKWINDOWEVENT
-#define XClearArea XCLEARAREA
-#define XClearWindow XCLEARWINDOW
-#define XClipBox XCLIPBOX
-#define XCloseDisplay XCLOSEDISPLAY
-#define XCloseIM XCLOSEIM
-#define XConfigureWindow XCONFIGUREWINDOW
-#define XConvertSelection XCONVERTSELECTION
-#define XCopyArea XCOPYAREA
-#define XCopyColormapAndFree XCOPYCOLORMAPANDFREE
-#define XCopyGC XCOPYGC
-#define XCopyPlane XCOPYPLANE
-#define XCreateBitmapFromData XCREATEBITMAPFROMDATA
-#define XCreateColormap XCREATECOLORMAP
-#define XCreateFontCursor XCREATEFONTCURSOR
-#define XCreateFontSet XCREATEFONTSET
-#define XCreateGC XCREATEGC
-#define XCreateGlyphCursor XCREATEGLYPHCURSOR
-#define XCreateIC XCREATEIC
-#define XCreateImage XCREATEIMAGE
-#define XCreatePixmap XCREATEPIXMAP
-#define XCreatePixmapCursor XCREATEPIXMAPCURSOR
-#define XCreatePixmapFromBitmapData XCREATEPIXMAPFROMBITMAPDATA
-#define XCreateRegion XCREATEREGION
-#define XCreateSimpleWindow XCREATESIMPLEWINDOW
-#define XCreateWindow XCREATEWINDOW
-#define XDefaultColormap XDEFAULTCOLORMAP
-#define XDefaultColormapOfScreen XDEFAULTCOLORMAPOFSCREEN
-#define XDefaultDepth XDEFAULTDEPTH
-#define XDefaultDepthOfScreen XDEFAULTDEPTHOFSCREEN
-#define XDefaultGC XDEFAULTGC
-#define XDefaultRootWindow XDEFAULTROOTWINDOW
-#define XDefaultScreen XDEFAULTSCREEN
-#define XDefaultScreenOfDisplay XDEFAULTSCREENOFDISPLAY
-#define XDefaultVisual XDEFAULTVISUAL
-#define XDefaultVisualOfScreen XDEFAULTVISUALOFSCREEN
-#define XDefineCursor XDEFINECURSOR
-#define XDeleteContext XDELETECONTEXT
-#define XDeleteProperty XDELETEPROPERTY
-#define XDestroyIC XDESTROYIC
-#define XDestroyRegion XDESTROYREGION
-#define XDestroySubwindows XDESTROYSUBWINDOWS
-#define XDestroyWindow XDESTROYWINDOW
-#define XDisableAccessControl XDISABLEACCESSCONTROL
-#define XDisplayCells XDISPLAYCELLS
-#define XDisplayHeight XDISPLAYHEIGHT
-#define XDisplayKeycodes XDISPLAYKEYCODES
-#define XDisplayName XDISPLAYNAME
-#define XDisplayOfIM XDISPLAYOFIM
-#define XDisplayOfScreen XDISPLAYOFSCREEN
-#define XDisplayString XDISPLAYSTRING
-#define XDisplayWidth XDISPLAYWIDTH
-#define XDoesBackingStore XDOESBACKINGSTORE
-#define XDrawArc XDRAWARC
-#define XDrawArcs XDRAWARCS
-#define XDrawImageString XDRAWIMAGESTRING
-#define XDrawImageString16 XDRAWIMAGESTRING16
-#define XDrawLine XDRAWLINE
-#define XDrawLines XDRAWLINES
-#define XDrawPoint XDRAWPOINT
-#define XDrawPoints XDRAWPOINTS
-#define XDrawRectangle XDRAWRECTANGLE
-#define XDrawRectangles XDRAWRECTANGLES
-#define XDrawSegments XDRAWSEGMENTS
-#define XDrawString XDRAWSTRING
-#define XDrawString16 XDRAWSTRING16
-#define XDrawText XDRAWTEXT
-#define XDrawText16 XDRAWTEXT16
-#define XESetCloseDisplay XESETCLOSEDISPLAY
-#define XEmptyRegion XEMPTYREGION
-#define XEnableAccessControl XENABLEACCESSCONTROL
-#define XEqualRegion XEQUALREGION
-#define XEventsQueued XEVENTSQUEUED
-#define XExtendedMaxRequestSize XEXTENDEDMAXREQUESTSIZE
-#define XExtentsOfFontSet XEXTENTSOFFONTSET
-#define XFetchBuffer XFETCHBUFFER
-#define XFetchBytes XFETCHBYTES
-#define XFetchName XFETCHNAME
-#define XFillArc XFILLARC
-#define XFillArcs XFILLARCS
-#define XFillPolygon XFILLPOLYGON
-#define XFillRectangle XFILLRECTANGLE
-#define XFillRectangles XFILLRECTANGLES
-#define XFilterEvent XFILTEREVENT
-#define XFindContext XFINDCONTEXT
-#define XFlush XFLUSH
-#define XFontsOfFontSet XFONTSOFFONTSET
-#define XForceScreenSaver XFORCESCREENSAVER
-#define XFree XFREE
-#define XFreeColormap XFREECOLORMAP
-#define XFreeColors XFREECOLORS
-#define XFreeCursor XFREECURSOR
-#define XFreeDeviceList XFREEDEVICELIST
-#define XFreeDeviceState XFREEDEVICESTATE
-#define XFreeFont XFREEFONT
-#define XFreeFontInfo XFREEFONTINFO
-#define XFreeFontNames XFREEFONTNAMES
-#define XFreeFontSet XFREEFONTSET
-#define XFreeGC XFREEGC
-#define XFreeModifiermap XFREEMODIFIERMAP
-#define XFreePixmap XFREEPIXMAP
-#define XFreeStringList XFREESTRINGLIST
-#define XGContextFromGC XGCONTEXTFROMGC
-#define XGeometry XGEOMETRY
-#define XGetAtomName XGETATOMNAME
-#define XGetClassHint XGETCLASSHINT
-#define XGetCommand XGETCOMMAND
-#define XGetDefault XGETDEFAULT
-#define XGetErrorDatabaseText XGETERRORDATABASETEXT
-#define XGetErrorText XGETERRORTEXT
-#define XGetExtensionVersion XGETEXTENSIONVERSION
-#define XGetFontProperty XGETFONTPROPERTY
-#define XGetGCValues XGETGCVALUES
-#define XGetGeometry XGETGEOMETRY
-#define XGetICValues XGETICVALUES
-#define XGetIMValues XGETIMVALUES
-#define XGetIconName XGETICONNAME
-#define XGetIconSizes XGETICONSIZES
-#define XGetImage XGETIMAGE
-#define XGetInputFocus XGETINPUTFOCUS
-#define XGetKeyboardControl XGETKEYBOARDCONTROL
-#define XGetKeyboardMapping XGETKEYBOARDMAPPING
-#define XGetModifierMapping XGETMODIFIERMAPPING
-#define XGetMotionEvents XGETMOTIONEVENTS
-#define XGetNormalHints XGETNORMALHINTS
-#define XGetPointerControl XGETPOINTERCONTROL
-#define XGetPointerMapping XGETPOINTERMAPPING
-#define XGetRGBColormaps XGETRGBCOLORMAPS
-#define XGetScreenSaver XGETSCREENSAVER
-#define XGetSelectionOwner XGETSELECTIONOWNER
-#define XGetStandardColormap XGETSTANDARDCOLORMAP
-#define XGetSubImage XGETSUBIMAGE
-#define XGetTextProperty XGETTEXTPROPERTY
-#define XGetVisualInfo XGETVISUALINFO
-#define XGetWMColormapWindows XGETWMCOLORMAPWINDOWS
-#define XGetWMHints XGETWMHINTS
-#define XGetWMIconName XGETWMICONNAME
-#define XGetWMName XGETWMNAME
-#define XGetWMNormalHints XGETWMNORMALHINTS
-#define XGetWindowAttributes XGETWINDOWATTRIBUTES
-#define XGetWindowProperty XGETWINDOWPROPERTY
-#define XGrabButton XGRABBUTTON
-#define XGrabKeyboard XGRABKEYBOARD
-#define XGrabPointer XGRABPOINTER
-#define XGrabServer XGRABSERVER
-#define XHeightMMOfScreen XHEIGHTMMOFSCREEN
-#define XHeightOfScreen XHEIGHTOFSCREEN
-#define XIconifyWindow XICONIFYWINDOW
-#define XIfEvent XIFEVENT
-#define XInitExtension XINITEXTENSION
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/GL/wmesa.h
^
|
@@ -1,141 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 3.0
- * Copyright (C) 1995-1998 Brian Paul
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-
-/*
- * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us)
- * Updated by Li Wei (liwei@aiar.xjtu.edu.cn)
- *
- *
- ***************************************************************
- * WMesa *
- * version 2.3 *
- * *
- * By *
- * Li Wei *
- * Institute of Artificial Intelligence & Robotics *
- * Xi'an Jiaotong University *
- * Email: liwei@aiar.xjtu.edu.cn *
- * Web page: http://sun.aiar.xjtu.edu.cn *
- * *
- * July 7th, 1997 *
- ***************************************************************
- */
-
-
-#ifndef WMESA_H
-#define WMESA_H
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#include "GL/gl.h"
-
-#if defined(_MSV_VER) && !defined(__GNUC__)
-# pragma warning (disable:4273)
-# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
-# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
-# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
-# pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
-# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
-# pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
-# if (MESA_WARNQUIET>1)
-# pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
-# endif
-#endif
-
-/*
- * This is the WMesa context 'handle':
- */
-typedef struct wmesa_context *WMesaContext;
-
-
-
-/*
- * Create a new WMesaContext for rendering into a window. You must
- * have already created the window of correct visual type and with an
- * appropriate colormap.
- *
- * Input:
- * hDC - Windows device or memory context
- * Pal - Palette to use
- * rgb_flag - GL_TRUE = RGB mode,
- * GL_FALSE = color index mode
- * db_flag - GL_TRUE = double-buffered,
- * GL_FALSE = single buffered
- * alpha_flag - GL_TRUE = create software alpha buffer,
- * GL_FALSE = no software alpha buffer
- *
- * Note: Indexed mode requires double buffering under Windows.
- *
- * Return: a WMesa_context or NULL if error.
- */
-extern WMesaContext WMesaCreateContext(HDC hDC,HPALETTE* pPal,
- GLboolean rgb_flag,
- GLboolean db_flag,
- GLboolean alpha_flag);
-
-
-/*
- * Destroy a rendering context as returned by WMesaCreateContext()
- */
-extern void WMesaDestroyContext( WMesaContext ctx );
-
-
-
-/*
- * Make the specified context the current one.
- */
-extern void WMesaMakeCurrent( WMesaContext ctx, HDC hdc );
-
-
-/*
- * Return a handle to the current context.
- */
-extern WMesaContext WMesaGetCurrentContext( void );
-
-
-/*
- * Swap the front and back buffers for the current context. No action
- * taken if the context is not double buffered.
- */
-extern void WMesaSwapBuffers(HDC hdc);
-
-
-/*
- * In indexed color mode we need to know when the palette changes.
- */
-extern void WMesaPaletteChange(HPALETTE Pal);
-
-extern void WMesaMove(void);
-
-void WMesaShareLists(WMesaContext ctx_to_share, WMesaContext ctx);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
-
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/GLES3/gl3ext.h
^
|
@@ -1,24 +0,0 @@
-#ifndef __gl3ext_h_
-#define __gl3ext_h_
-
-/* $Revision: 17809 $ on $Date:: 2012-05-14 08:03:36 -0700 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* OpenGL ES 3 Extensions
- *
- * After an OES extension's interactions with OpenGl ES 3.0 have been documented,
- * its tokens and function definitions should be added to this file in a manner
- * that does not conflict with gl2ext.h or gl3.h.
- *
- * Tokens and function definitions for extensions that have become standard
- * features in OpenGL ES 3.0 will not be added to this file.
- *
- * Applications using OpenGL-ES-2-only extensions should include gl2ext.h
- */
-
-#endif /* __gl3ext_h_ */
-
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/VG/openvg.h
^
|
@@ -1,746 +0,0 @@
-/* $Revision: 9203 $ on $Date:: 2009-10-07 02:21:52 -0700 #$ */
-
-/*------------------------------------------------------------------------
- *
- * OpenVG 1.1 Reference Implementation
- * -------------------------------------
- *
- * Copyright (c) 2008 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and /or associated documentation files
- * (the "Materials "), to deal in the Materials without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Materials,
- * and to permit persons to whom the Materials are furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
- * THE USE OR OTHER DEALINGS IN THE MATERIALS.
- *
- *//**
- * \file
- * \brief OpenVG 1.1 API.
- *//*-------------------------------------------------------------------*/
-
-#ifndef _OPENVG_H
-#define _OPENVG_H
-
-#include <VG/vgplatform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define OPENVG_VERSION_1_0 1
-#define OPENVG_VERSION_1_0_1 1
-#define OPENVG_VERSION_1_1 2
-
-#ifndef VG_MAXSHORT
-#define VG_MAXSHORT 0x7FFF
-#endif
-
-#ifndef VG_MAXINT
-#define VG_MAXINT 0x7FFFFFFF
-#endif
-
-#ifndef VG_MAX_ENUM
-#define VG_MAX_ENUM 0x7FFFFFFF
-#endif
-
-typedef VGuint VGHandle;
-
-typedef VGHandle VGPath;
-typedef VGHandle VGImage;
-typedef VGHandle VGMaskLayer;
-typedef VGHandle VGFont;
-typedef VGHandle VGPaint;
-
-#define VG_INVALID_HANDLE ((VGHandle)0)
-
-typedef enum {
- VG_FALSE = 0,
- VG_TRUE = 1,
-
- VG_BOOLEAN_FORCE_SIZE = VG_MAX_ENUM
-} VGboolean;
-
-typedef enum {
- VG_NO_ERROR = 0,
- VG_BAD_HANDLE_ERROR = 0x1000,
- VG_ILLEGAL_ARGUMENT_ERROR = 0x1001,
- VG_OUT_OF_MEMORY_ERROR = 0x1002,
- VG_PATH_CAPABILITY_ERROR = 0x1003,
- VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004,
- VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005,
- VG_IMAGE_IN_USE_ERROR = 0x1006,
- VG_NO_CONTEXT_ERROR = 0x1007,
-
- VG_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
-} VGErrorCode;
-
-typedef enum {
- /* Mode settings */
- VG_MATRIX_MODE = 0x1100,
- VG_FILL_RULE = 0x1101,
- VG_IMAGE_QUALITY = 0x1102,
- VG_RENDERING_QUALITY = 0x1103,
- VG_BLEND_MODE = 0x1104,
- VG_IMAGE_MODE = 0x1105,
-
- /* Scissoring rectangles */
- VG_SCISSOR_RECTS = 0x1106,
-
- /* Color Transformation */
- VG_COLOR_TRANSFORM = 0x1170,
- VG_COLOR_TRANSFORM_VALUES = 0x1171,
-
- /* Stroke parameters */
- VG_STROKE_LINE_WIDTH = 0x1110,
- VG_STROKE_CAP_STYLE = 0x1111,
- VG_STROKE_JOIN_STYLE = 0x1112,
- VG_STROKE_MITER_LIMIT = 0x1113,
- VG_STROKE_DASH_PATTERN = 0x1114,
- VG_STROKE_DASH_PHASE = 0x1115,
- VG_STROKE_DASH_PHASE_RESET = 0x1116,
-
- /* Edge fill color for VG_TILE_FILL tiling mode */
- VG_TILE_FILL_COLOR = 0x1120,
-
- /* Color for vgClear */
- VG_CLEAR_COLOR = 0x1121,
-
- /* Glyph origin */
- VG_GLYPH_ORIGIN = 0x1122,
-
- /* Enable/disable alpha masking and scissoring */
- VG_MASKING = 0x1130,
- VG_SCISSORING = 0x1131,
-
- /* Pixel layout information */
- VG_PIXEL_LAYOUT = 0x1140,
- VG_SCREEN_LAYOUT = 0x1141,
-
- /* Source format selection for image filters */
- VG_FILTER_FORMAT_LINEAR = 0x1150,
- VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151,
-
- /* Destination write enable mask for image filters */
- VG_FILTER_CHANNEL_MASK = 0x1152,
-
- /* Implementation limits (read-only) */
- VG_MAX_SCISSOR_RECTS = 0x1160,
- VG_MAX_DASH_COUNT = 0x1161,
- VG_MAX_KERNEL_SIZE = 0x1162,
- VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163,
- VG_MAX_COLOR_RAMP_STOPS = 0x1164,
- VG_MAX_IMAGE_WIDTH = 0x1165,
- VG_MAX_IMAGE_HEIGHT = 0x1166,
- VG_MAX_IMAGE_PIXELS = 0x1167,
- VG_MAX_IMAGE_BYTES = 0x1168,
- VG_MAX_FLOAT = 0x1169,
- VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A,
-
- VG_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
-} VGParamType;
-
-typedef enum {
- VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200,
- VG_RENDERING_QUALITY_FASTER = 0x1201,
- VG_RENDERING_QUALITY_BETTER = 0x1202, /* Default */
-
- VG_RENDERING_QUALITY_FORCE_SIZE = VG_MAX_ENUM
-} VGRenderingQuality;
-
-typedef enum {
- VG_PIXEL_LAYOUT_UNKNOWN = 0x1300,
- VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301,
- VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302,
- VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303,
- VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304,
-
- VG_PIXEL_LAYOUT_FORCE_SIZE = VG_MAX_ENUM
-} VGPixelLayout;
-
-typedef enum {
- VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400,
- VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401,
- VG_MATRIX_FILL_PAINT_TO_USER = 0x1402,
- VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403,
- VG_MATRIX_GLYPH_USER_TO_SURFACE = 0x1404,
-
- VG_MATRIX_MODE_FORCE_SIZE = VG_MAX_ENUM
-} VGMatrixMode;
-
-typedef enum {
- VG_CLEAR_MASK = 0x1500,
- VG_FILL_MASK = 0x1501,
- VG_SET_MASK = 0x1502,
- VG_UNION_MASK = 0x1503,
- VG_INTERSECT_MASK = 0x1504,
- VG_SUBTRACT_MASK = 0x1505,
-
- VG_MASK_OPERATION_FORCE_SIZE = VG_MAX_ENUM
-} VGMaskOperation;
-
-#define VG_PATH_FORMAT_STANDARD 0
-
-typedef enum {
- VG_PATH_DATATYPE_S_8 = 0,
- VG_PATH_DATATYPE_S_16 = 1,
- VG_PATH_DATATYPE_S_32 = 2,
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/VG/vgext.h
^
|
@@ -1,233 +0,0 @@
-/* $Revision: 6810 $ on $Date:: 2008-10-29 07:31:37 -0700 #$ */
-
-/*------------------------------------------------------------------------
- *
- * VG extensions Reference Implementation
- * -------------------------------------
- *
- * Copyright (c) 2008 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and /or associated documentation files
- * (the "Materials "), to deal in the Materials without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Materials,
- * and to permit persons to whom the Materials are furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
- * THE USE OR OTHER DEALINGS IN THE MATERIALS.
- *
- *//**
- * \file
- * \brief VG extensions
- *//*-------------------------------------------------------------------*/
-
-
-
-#ifndef _VGEXT_H
-#define _VGEXT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <VG/openvg.h>
-#include <VG/vgu.h>
-
-#ifndef VG_API_ENTRYP
-# define VG_API_ENTRYP VG_API_ENTRY*
-#endif
-
-#ifndef VGU_API_ENTRYP
-# define VGU_API_ENTRYP VGU_API_ENTRY*
-#endif
-
-/*-------------------------------------------------------------------------------
- * KHR extensions
- *------------------------------------------------------------------------------*/
-
-typedef enum {
-
-#ifndef VG_KHR_iterative_average_blur
- VG_MAX_AVERAGE_BLUR_DIMENSION_KHR = 0x116B,
- VG_AVERAGE_BLUR_DIMENSION_RESOLUTION_KHR = 0x116C,
- VG_MAX_AVERAGE_BLUR_ITERATIONS_KHR = 0x116D,
-#endif
-
- VG_PARAM_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
-} VGParamTypeKHR;
-
-#ifndef VG_KHR_EGL_image
-#define VG_KHR_EGL_image 1
-/* VGEGLImageKHR is an opaque handle to an EGLImage */
-typedef void* VGeglImageKHR;
-
-#ifdef VG_VGEXT_PROTOTYPES
-VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image);
-#endif
-typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR image);
-
-#endif
-
-
-#ifndef VG_KHR_iterative_average_blur
-#define VG_KHR_iterative_average_blur 1
-
-#ifdef VG_VGEXT_PROTOTYPES
-VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
-#endif
-typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
-
-#endif
-
-
-#ifndef VG_KHR_advanced_blending
-#define VG_KHR_advanced_blending 1
-
-typedef enum {
- VG_BLEND_OVERLAY_KHR = 0x2010,
- VG_BLEND_HARDLIGHT_KHR = 0x2011,
- VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012,
- VG_BLEND_SOFTLIGHT_KHR = 0x2013,
- VG_BLEND_COLORDODGE_KHR = 0x2014,
- VG_BLEND_COLORBURN_KHR = 0x2015,
- VG_BLEND_DIFFERENCE_KHR = 0x2016,
- VG_BLEND_SUBTRACT_KHR = 0x2017,
- VG_BLEND_INVERT_KHR = 0x2018,
- VG_BLEND_EXCLUSION_KHR = 0x2019,
- VG_BLEND_LINEARDODGE_KHR = 0x201a,
- VG_BLEND_LINEARBURN_KHR = 0x201b,
- VG_BLEND_VIVIDLIGHT_KHR = 0x201c,
- VG_BLEND_LINEARLIGHT_KHR = 0x201d,
- VG_BLEND_PINLIGHT_KHR = 0x201e,
- VG_BLEND_HARDMIX_KHR = 0x201f,
- VG_BLEND_CLEAR_KHR = 0x2020,
- VG_BLEND_DST_KHR = 0x2021,
- VG_BLEND_SRC_OUT_KHR = 0x2022,
- VG_BLEND_DST_OUT_KHR = 0x2023,
- VG_BLEND_SRC_ATOP_KHR = 0x2024,
- VG_BLEND_DST_ATOP_KHR = 0x2025,
- VG_BLEND_XOR_KHR = 0x2026,
-
- VG_BLEND_MODE_KHR_FORCE_SIZE= VG_MAX_ENUM
-} VGBlendModeKHR;
-#endif
-
-#ifndef VG_KHR_parametric_filter
-#define VG_KHR_parametric_filter 1
-
-typedef enum {
- VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0),
- VG_PF_KNOCKOUT_FLAG_KHR = (1 << 1),
- VG_PF_OUTER_FLAG_KHR = (1 << 2),
- VG_PF_INNER_FLAG_KHR = (1 << 3),
-
- VG_PF_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
-} VGPfTypeKHR;
-
-typedef enum {
- VGU_IMAGE_IN_USE_ERROR = 0xF010,
-
- VGU_ERROR_CODE_KHR_FORCE_SIZE = VG_MAX_ENUM
-} VGUErrorCodeKHR;
-
-#ifdef VG_VGEXT_PROTOTYPES
-VG_API_CALL void VG_API_ENTRY vgParametricFilterKHR(VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguDropShadowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA) ;
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
-#endif
-typedef void (VG_API_ENTRYP PFNVGPARAMETRICFILTERKHRPROC) (VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUDROPSHADOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA);
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
-
-#endif
-
-
-/*-------------------------------------------------------------------------------
- * NDS extensions
- *------------------------------------------------------------------------------*/
-
-#ifndef VG_NDS_paint_generation
-#define VG_NDS_paint_generation 1
-
-typedef enum {
- VG_PAINT_COLOR_RAMP_LINEAR_NDS = 0x1A10,
- VG_COLOR_MATRIX_NDS = 0x1A11,
- VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS = 0x1A12,
-
- VG_PAINT_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
-} VGPaintParamTypeNds;
-
-typedef enum {
- VG_DRAW_IMAGE_COLOR_MATRIX_NDS = 0x1F10,
-
- VG_IMAGE_MODE_NDS_FORCE_SIZE = VG_MAX_ENUM
-} VGImageModeNds;
-#endif
-
-
-#ifndef VG_NDS_projective_geometry
-#define VG_NDS_projective_geometry 1
-
-typedef enum {
- VG_CLIP_MODE_NDS = 0x1180,
- VG_CLIP_LINES_NDS = 0x1181,
- VG_MAX_CLIP_LINES_NDS = 0x1182,
-
- VG_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
-} VGParamTypeNds;
-
-typedef enum {
- VG_CLIPMODE_NONE_NDS = 0x3000,
- VG_CLIPMODE_CLIP_CLOSED_NDS = 0x3001,
- VG_CLIPMODE_CLIP_OPEN_NDS = 0x3002,
- VG_CLIPMODE_CULL_NDS = 0x3003,
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/VG/vgplatform.h
^
|
@@ -1,92 +0,0 @@
-/* $Revision: 6810 $ on $Date:: 2008-10-29 07:31:37 -0700 #$ */
-
-/*------------------------------------------------------------------------
- *
- * VG platform specific header Reference Implementation
- * ----------------------------------------------------
- *
- * Copyright (c) 2008 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and /or associated documentation files
- * (the "Materials "), to deal in the Materials without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Materials,
- * and to permit persons to whom the Materials are furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
- * THE USE OR OTHER DEALINGS IN THE MATERIALS.
- *
- *//**
- * \file
- * \brief VG platform specific header
- *//*-------------------------------------------------------------------*/
-
-#ifndef _VGPLATFORM_H
-#define _VGPLATFORM_H
-
-#include <KHR/khrplatform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef VG_API_CALL
-#if defined(OPENVG_STATIC_LIBRARY)
-# define VG_API_CALL
-#else
-# define VG_API_CALL KHRONOS_APICALL
-#endif /* defined OPENVG_STATIC_LIBRARY */
-#endif /* ifndef VG_API_CALL */
-
-#ifndef VGU_API_CALL
-#if defined(OPENVG_STATIC_LIBRARY)
-# define VGU_API_CALL
-#else
-# define VGU_API_CALL KHRONOS_APICALL
-#endif /* defined OPENVG_STATIC_LIBRARY */
-#endif /* ifndef VGU_API_CALL */
-
-
-#ifndef VG_API_ENTRY
-#define VG_API_ENTRY
-#endif
-
-#ifndef VG_API_EXIT
-#define VG_API_EXIT
-#endif
-
-#ifndef VGU_API_ENTRY
-#define VGU_API_ENTRY
-#endif
-
-#ifndef VGU_API_EXIT
-#define VGU_API_EXIT
-#endif
-
-typedef float VGfloat;
-typedef signed char VGbyte;
-typedef unsigned char VGubyte;
-typedef signed short VGshort;
-typedef signed int VGint;
-typedef unsigned int VGuint;
-typedef unsigned int VGbitfield;
-
-#ifndef VG_VGEXT_PROTOTYPES
-#define VG_VGEXT_PROTOTYPES
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* _VGPLATFORM_H */
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.44.tar.bz2/libhybris/hybris/include/VG/vgu.h
^
|
@@ -1,131 +0,0 @@
-/* $Revision: 6810 $ on $Date:: 2008-10-29 07:31:37 -0700 #$ */
-
-/*------------------------------------------------------------------------
- *
- * VGU 1.1 Reference Implementation
- * -------------------------------------
- *
- * Copyright (c) 2008 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and /or associated documentation files
- * (the "Materials "), to deal in the Materials without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Materials,
- * and to permit persons to whom the Materials are furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
- * THE USE OR OTHER DEALINGS IN THE MATERIALS.
- *
- *//**
- * \file
- * \brief VGU 1.1 API.
- *//*-------------------------------------------------------------------*/
-
-#ifndef _VGU_H
-#define _VGU_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <VG/openvg.h>
-
-#define VGU_VERSION_1_0 1
-#define VGU_VERSION_1_1 2
-
-#ifndef VGU_API_CALL
-# error VGU_API_CALL must be defined
-#endif
-
-#ifndef VGU_API_ENTRY
-# error VGU_API_ENTRY must be defined
-#endif
-
-#ifndef VGU_API_EXIT
-# error VGU_API_EXIT must be defined
-#endif
-
-
-typedef enum {
- VGU_NO_ERROR = 0,
- VGU_BAD_HANDLE_ERROR = 0xF000,
- VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001,
- VGU_OUT_OF_MEMORY_ERROR = 0xF002,
- VGU_PATH_CAPABILITY_ERROR = 0xF003,
- VGU_BAD_WARP_ERROR = 0xF004,
-
- VGU_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
-} VGUErrorCode;
-
-typedef enum {
- VGU_ARC_OPEN = 0xF100,
- VGU_ARC_CHORD = 0xF101,
- VGU_ARC_PIE = 0xF102,
-
- VGU_ARC_TYPE_FORCE_SIZE = VG_MAX_ENUM
-} VGUArcType;
-
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguLine(VGPath path,
- VGfloat x0, VGfloat y0,
- VGfloat x1, VGfloat y1) VGU_API_EXIT;
-
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguPolygon(VGPath path,
- const VGfloat * points, VGint count,
- VGboolean closed) VGU_API_EXIT;
-
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRect(VGPath path,
- VGfloat x, VGfloat y,
- VGfloat width, VGfloat height) VGU_API_EXIT;
-
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRoundRect(VGPath path,
- VGfloat x, VGfloat y,
- VGfloat width, VGfloat height,
- VGfloat arcWidth, VGfloat arcHeight) VGU_API_EXIT;
-
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguEllipse(VGPath path,
- VGfloat cx, VGfloat cy,
- VGfloat width, VGfloat height) VGU_API_EXIT;
-
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguArc(VGPath path,
- VGfloat x, VGfloat y,
- VGfloat width, VGfloat height,
- VGfloat startAngle, VGfloat angleExtent,
- VGUArcType arcType) VGU_API_EXIT;
-
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,
- VGfloat sx1, VGfloat sy1,
- VGfloat sx2, VGfloat sy2,
- VGfloat sx3, VGfloat sy3,
- VGfloat * matrix) VGU_API_EXIT;
-
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0,
- VGfloat dx1, VGfloat dy1,
- VGfloat dx2, VGfloat dy2,
- VGfloat dx3, VGfloat dy3,
- VGfloat * matrix) VGU_API_EXIT;
-
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0,
- VGfloat dx1, VGfloat dy1,
- VGfloat dx2, VGfloat dy2,
- VGfloat dx3, VGfloat dy3,
- VGfloat sx0, VGfloat sy0,
- VGfloat sx1, VGfloat sy1,
- VGfloat sx2, VGfloat sy2,
- VGfloat sx3, VGfloat sy3,
- VGfloat * matrix) VGU_API_EXIT;
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* #ifndef _VGU_H */
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/.gitmodules
^
|
@@ -1,3 +1,3 @@
[submodule "libhybris"]
path = libhybris
- url = https://github.com/libhybris/libhybris
+ url = https://github.com/sailfishos-mirror/libhybris.git
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/LICENSE.Apache2
^
|
(renamed from libhybris/hybris/COPYING)
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/LICENSE.BSD-2
^
|
@@ -0,0 +1,20 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/LICENSE.BSD-3
^
|
@@ -0,0 +1,25 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of copyright holder nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/LICENSE.BSD-4
^
|
@@ -0,0 +1,28 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. All advertising materials mentioning features or use of this software must
+ display the following acknowledgement: This product includes software
+ developed by the copyright holder.
+
+4. Neither the name of copyright holder nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/LICENSE.GPL3
^
|
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/LICENSE.ISC
^
|
@@ -0,0 +1,11 @@
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/LICENSE.LGPLv21
^
|
@@ -0,0 +1,502 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/LICENSE.MIT
^
|
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/Android.common.mk
^
|
@@ -4,6 +4,13 @@
ANDROID_VERSION_MINOR := $(word 2, $(subst ., , $(PLATFORM_VERSION)))
ANDROID_VERSION_PATCH := $(word 3, $(subst ., , $(PLATFORM_VERSION)))
+ifeq ($(ANDROID_VERSION_MINOR),)
+ ANDROID_VERSION_MINOR := 0
+endif
+ifeq ($(ANDROID_VERSION_PATCH),)
+ ANDROID_VERSION_PATCH := 0
+endif
+
LOCAL_CFLAGS += \
-DANDROID_VERSION_MAJOR=$(ANDROID_VERSION_MAJOR) \
-DANDROID_VERSION_MINOR=$(ANDROID_VERSION_MINOR) \
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/hwc2/Android.mk
^
|
@@ -4,6 +4,16 @@
ANDROID_VERSION_MINOR := $(word 2, $(subst ., , $(PLATFORM_VERSION)))
ANDROID_VERSION_PATCH := $(word 3, $(subst ., , $(PLATFORM_VERSION)))
+ifeq ($(strip $(ANDROID_VERSION_MINOR)),)
+$(warning *** ANDROID_VERSION_MINOR undefined. Assuming 0)
+ANDROID_VERSION_MINOR = 0
+endif
+
+ifeq ($(strip $(ANDROID_VERSION_MICRO)),)
+$(warning *** ANDROID_VERSION_MICRO undefined. Assuming 0)
+ANDROID_VERSION_MICRO = 0
+endif
+
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
@@ -65,7 +75,7 @@
LOCAL_SRC_FILES := tests/hybris-gralloc.c \
GrallocUsageConversion.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/tests
-LOCAL_SHARED_LIBRARIES := libcutils
+LOCAL_SHARED_LIBRARIES := libcutils libnativewindow
LOCAL_CFLAGS := \
-DANDROID_VERSION_MAJOR=$(ANDROID_VERSION_MAJOR) \
-DANDROID_VERSION_MINOR=$(ANDROID_VERSION_MINOR) \
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/hwc2/hwc2_compatibility_layer.cpp
^
|
@@ -19,6 +19,7 @@
#include <ui/GraphicBuffer.h>
#include <ui/Region.h>
#include <sync/sync.h>
+#include <cutils/properties.h>
#include "HWC2.h"
#include "hwc2_compatibility_layer.h"
@@ -96,6 +97,10 @@
device->self = new HWC2::Device(useVrComposer);
+ bool presentTimestamp =
+ !device->self->getCapabilities().count(HWC2::Capability::PresentFenceIsNotReliable);
+ property_set("service.sf.present_timestamp", presentTimestamp ? "1" : "0");
+
return device;
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/hwc2/tests/direct_hwc2_test.cpp
^
|
@@ -330,7 +330,7 @@
glClearColor (1., 1., 1., 1.); // background color
float phase = 0;
- int i, oldretire = -1, oldrelease = -1, oldrelease2 = -1;
+ int i;
for (i=0; i<60*60; ++i) {
glClear(GL_COLOR_BUFFER_BIT);
glUniform1f (phase_loc, phase);
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/hwc2/tests/eglnativewindowbase.h
^
|
+(symlink to ../../../hybris/egl/platforms/common/eglnativewindowbase.h)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/hwc2/tests/nativewindowbase.cpp
^
|
-(symlink to ../../../../libhybris/hybris/egl/platforms/common/nativewindowbase.cpp)
+(symlink to ../../../hybris/platforms/common/nativewindowbase.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/hwc2/tests/nativewindowbase.h
^
|
-(symlink to ../../../../libhybris/hybris/egl/platforms/common/nativewindowbase.h)
+(symlink to ../../../hybris/platforms/common/nativewindowbase.h)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/hwc2/tests/support.h
^
|
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 2018-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
#ifndef SUPPORT_H_
#define SUPPORT_H_
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/ui/Android.mk
^
|
@@ -19,8 +19,14 @@
libutils \
libbinder \
libhardware \
+ liblog \
libui
+ifeq ($(shell test $(ANDROID_VERSION_MAJOR) -ge 10 && echo true),true)
+LOCAL_SHARED_LIBRARIES += \
+ libhidlbase
+endif
+
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/compat/ui/ui_compatibility_layer.cpp
^
|
@@ -17,6 +17,9 @@
#include <fcntl.h>
#include <sys/stat.h>
+#if ANDROID_VERSION_MAJOR>=10
+#include <ui/Gralloc.h>
+#endif
#include <ui/GraphicBuffer.h>
#include <ui/GraphicBufferMapper.h>
#include <ui/GraphicBufferAllocator.h>
@@ -66,7 +69,13 @@
if (!buffer)
return NULL;
- buffer->self = new android::GraphicBuffer(w, h, format, usage, stride, (native_handle_t*) handle, keepOwnership);
+#if ANDROID_VERSION_MAJOR>=8
+ buffer->self = new android::GraphicBuffer(w, h, format, 1/* layerCount */, usage, stride,
+ (native_handle_t*) handle, keepOwnership);
+#else
+ buffer->self = new android::GraphicBuffer(w, h, format, usage, stride,
+ (native_handle_t*) handle, keepOwnership);
+#endif
return buffer;
@@ -108,7 +117,11 @@
uint32_t graphic_buffer_reallocate(struct graphic_buffer *buffer, uint32_t w,
uint32_t h, int32_t f, uint32_t usage)
{
+#if ANDROID_VERSION_MAJOR>=8
+ return buffer->self->reallocate(w, h, f, 1/* layerCount */, usage);
+#else
return buffer->self->reallocate(w, h, f, usage);
+#endif
}
uint32_t graphic_buffer_lock(struct graphic_buffer *buffer, uint32_t usage, void **vaddr)
@@ -142,3 +155,69 @@
{
return buffer->self->initCheck();
}
+
+#if ANDROID_VERSION_MAJOR>=10
+using android::GraphicBufferAllocator;
+using android::GraphicBufferMapper;
+using android::PixelFormat;
+using android::status_t;
+
+status_t graphic_buffer_allocator_allocate(uint32_t width, uint32_t height,
+ PixelFormat format, uint32_t layerCount, uint64_t usage,
+ buffer_handle_t* handle, uint32_t* stride,
+ uint64_t graphicBufferId, const char* requestorName)
+{
+ return GraphicBufferAllocator::getInstance().allocate(width, height, format, layerCount, usage,
+ handle, stride, graphicBufferId, requestorName);
+}
+
+status_t graphic_buffer_allocator_free(buffer_handle_t handle) {
+ return GraphicBufferAllocator::getInstance().free(handle);
+}
+
+status_t graphic_buffer_mapper_import_buffer(buffer_handle_t rawHandle,
+ uint32_t width, uint32_t height, uint32_t layerCount,
+ PixelFormat format, uint64_t usage, uint32_t stride,
+ buffer_handle_t* outHandle)
+{
+ return GraphicBufferMapper::getInstance().importBuffer(rawHandle, width, height, layerCount,
+ format, usage, stride, outHandle);
+}
+
+status_t graphic_buffer_mapper_import_buffer_no_size(buffer_handle_t rawHandle,
+ buffer_handle_t* outHandle)
+{
+ // adapted from GraphicBufferMapper::importBuffer() but skips validation part
+ // needed to implement hybris_gralloc_retain() which doesn't have buffer information passed
+
+ auto &mapper = GraphicBufferMapper::getInstance().getGrallocMapper();
+ buffer_handle_t bufferHandle;
+ status_t error = mapper.importBuffer(android::hardware::hidl_handle(rawHandle), &bufferHandle);
+ if (error != android::NO_ERROR) {
+ ALOGW("importBuffer(%p) failed: %d", rawHandle, error);
+ return error;
+ }
+
+ *outHandle = bufferHandle;
+
+ return android::NO_ERROR;
+}
+
+status_t graphic_buffer_mapper_free_buffer(buffer_handle_t handle) {
+ return GraphicBufferMapper::getInstance().freeBuffer(handle);
+}
+
+
+status_t graphic_buffer_mapper_lock(buffer_handle_t handle, uint32_t usage, const ARect* bounds,
+ void** vaddr, int32_t* outBytesPerPixel,
+ int32_t* outBytesPerStride) {
+ auto rect = android::Rect(bounds->left, bounds->top, bounds->right, bounds->bottom);
+ return GraphicBufferMapper::getInstance().lock(handle, usage, rect,
+ vaddr, outBytesPerPixel, outBytesPerStride);
+}
+
+status_t graphic_buffer_mapper_unlock(buffer_handle_t handle)
+{
+ return GraphicBufferMapper::getInstance().unlock(handle);
+}
+#endif // ANDROID_VERSION_MAJOR>=10
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/Makefile.am
^
|
@@ -1,4 +1,4 @@
-SUBDIRS = include common properties hardware gralloc
+SUBDIRS = include common properties hardware ui gralloc
if HAS_ANDROID_4_2_0
SUBDIRS += libsync
@@ -6,7 +6,11 @@
if HAS_ANDROID_5_0_0
SUBDIRS += libsync
endif
-SUBDIRS += egl glesv1 glesv2 ui sf input camera vibrator media opencl wifi hwc2
+SUBDIRS += platforms egl glesv1 glesv2 sf input camera vibrator media opencl wifi hwc2
+
+if HAS_VULKAN_HEADERS
+SUBDIRS += vulkan
+endif
SUBDIRS += libnfc_nxp libnfc_ndef_nxp
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/common/Makefile.am
^
|
@@ -31,6 +31,7 @@
strlcpy.c \
strlcat.c \
logging.c \
+ native_handle.c \
sysconf.c \
dso_handle_counters.cpp \
legacy_properties/properties.c \
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/common/n/linker.cpp
^
|
@@ -4446,12 +4446,28 @@
static const char* get_executable_path() {
static std::string executable_path;
if (executable_path.empty()) {
+#ifdef DISABLED_FOR_HYBRIS_SUPPORT
char path[PATH_MAX];
ssize_t path_len = readlink("/proc/self/exe", path, sizeof(path));
if (path_len == -1 || path_len >= static_cast<ssize_t>(sizeof(path))) {
__libc_fatal("readlink('/proc/self/exe') failed: %s", strerror(errno));
}
executable_path = std::string(path, path_len);
+#else
+ if (!getauxval(AT_SECURE)) {
+ const char* use_vendor_namespace = getenv("HYBRIS_USE_VENDOR_NAMESPACE");
+ if (use_vendor_namespace != nullptr) {
+ executable_path = "/vendor/bin/yes";
+ }
+ }
+ if (executable_path.empty()) {
+#if defined(__aarch64__) || defined(__x86_64__)
+ executable_path = "/system/bin/app_process64";
+#else
+ executable_path = "/system/bin/app_process32";
+#endif
+ }
+#endif
}
return executable_path.c_str();
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/common/native_handle.c
^
|
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "NativeHandle"
+
+#include <android-config.h>
+#include <stdint.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <cutils/native_handle.h>
+
+native_handle_t* native_handle_create(int numFds, int numInts)
+{
+ native_handle_t* h = malloc(
+ sizeof(native_handle_t) + sizeof(int)*(numFds+numInts));
+
+ h->version = sizeof(native_handle_t);
+ h->numFds = numFds;
+ h->numInts = numInts;
+ return h;
+}
+
+int native_handle_delete(native_handle_t* h)
+{
+ if (h) {
+ if (h->version != sizeof(native_handle_t))
+ return -EINVAL;
+ free(h);
+ }
+ return 0;
+}
+
+int native_handle_close(const native_handle_t* h)
+{
+ if (h->version != sizeof(native_handle_t))
+ return -EINVAL;
+
+ const int numFds = h->numFds;
+ int i;
+ for (i=0 ; i<numFds ; i++) {
+ close(h->data[i]);
+ }
+ return 0;
+}
+
+native_handle_t* native_handle_clone(const native_handle_t* handle) {
+ native_handle_t* clone = native_handle_create(handle->numFds, handle->numInts);
+ if (clone == NULL) return NULL;
+
+ for (int i = 0; i < handle->numFds; i++) {
+ clone->data[i] = dup(handle->data[i]);
+ if (clone->data[i] == -1) {
+ clone->numFds = i;
+ native_handle_close(clone);
+ native_handle_delete(clone);
+ return NULL;
+ }
+ }
+
+ memcpy(&clone->data[handle->numFds], &handle->data[handle->numFds],
+ sizeof(int) * handle->numInts);
+
+ return clone;
+}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/common/o/linker_main.cpp
^
|
@@ -192,12 +192,28 @@
static const char* get_executable_path() {
static std::string executable_path;
if (executable_path.empty()) {
+#ifdef DISABLED_FOR_HYBRIS_SUPPORT
char path[PATH_MAX];
ssize_t path_len = readlink("/proc/self/exe", path, sizeof(path));
if (path_len == -1 || path_len >= static_cast<ssize_t>(sizeof(path))) {
async_safe_fatal("readlink('/proc/self/exe') failed: %s", strerror(errno));
}
executable_path = std::string(path, path_len);
+#else
+ if (!getauxval(AT_SECURE)) {
+ const char* use_vendor_namespace = getenv("HYBRIS_USE_VENDOR_NAMESPACE");
+ if (use_vendor_namespace != nullptr) {
+ executable_path = "/vendor/bin/yes";
+ }
+ }
+ if (executable_path.empty()) {
+#if defined(__aarch64__) || defined(__x86_64__)
+ executable_path = "/system/bin/app_process64";
+#else
+ executable_path = "/system/bin/app_process32";
+#endif
+ }
+#endif
}
return executable_path.c_str();
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/common/q/Makefile.am
^
|
@@ -51,6 +51,11 @@
-D_USING_LIBCXX \
$(ARCH_FLAGS) \
$(ANDROID_HEADERS_CFLAGS)
+
+if HAS_ANDROID_11_0_0
+q_la_CPPFLAGS += -DHAS_ANDROID_11_0_0
+endif
+
q_la_LDFLAGS = \
-lsupc++ \
-module \
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/common/q/hybris_compat.h
^
|
@@ -50,10 +50,24 @@
* Experimental support for SHT_RELR sections. For details, see proposal
* at https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg
*/
-#define DT_RELR 0x6fffe000
-#define DT_RELRSZ 0x6fffe001
-#define DT_RELRENT 0x6fffe003
-#define DT_RELRCOUNT 0x6fffe005
+#define DT_ANDROID_RELR 0x6fffe000
+#define DT_ANDROID_RELRSZ 0x6fffe001
+#define DT_ANDROID_RELRENT 0x6fffe003
+#define DT_ANDROID_RELRCOUNT 0x6fffe005
+
+/* Defined in glibc >= 2.36, and used in bionic since apilevel 30 */
+#ifndef DT_RELRSZ
+#define DT_RELRSZ 35
+#endif
+
+#ifndef DT_RELR
+#define DT_RELR 36
+#endif
+
+#ifndef DT_RELRENT
+#define DT_RELRENT 37
+#endif
+
/*
* From bionic/libc/include/elf.h
*
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/common/q/linker.cpp
^
|
@@ -106,6 +106,10 @@
static const char* const kLdConfigFilePath = "/system/etc/ld.config.txt";
static const char* const kLdConfigVndkLiteFilePath = "/system/etc/ld.config.vndk_lite.txt";
+#ifdef HAS_ANDROID_11_0_0
+static const char* const kLdGeneratedConfigFilePath = "/linkerconfig/ld.config.txt";
+#endif
+
#if defined(__LP64__)
static const char* const kSystemLibDir = "/system/lib64";
static const char* const kOdmLibDir = "/odm/lib64";
@@ -3722,14 +3726,17 @@
#endif
case DT_RELR:
+ case DT_ANDROID_RELR:
relr_ = reinterpret_cast<ElfW(Relr)*>(load_bias + d->d_un.d_ptr);
break;
case DT_RELRSZ:
+ case DT_ANDROID_RELRSZ:
relr_count_ = d->d_un.d_val / sizeof(ElfW(Relr));
break;
case DT_RELRENT:
+ case DT_ANDROID_RELRENT:
if (d->d_un.d_val != sizeof(ElfW(Relr))) {
DL_ERR("invalid DT_RELRENT: %zd", static_cast<size_t>(d->d_un.d_val));
return false;
@@ -3737,7 +3744,7 @@
break;
// Ignored (see DT_RELCOUNT comments for details).
- case DT_RELRCOUNT:
+ case DT_ANDROID_RELRCOUNT:
break;
case DT_INIT:
@@ -4208,6 +4215,16 @@
return path;
}
+#ifdef HAS_ANDROID_11_0_0
+ if (file_exists(kLdGeneratedConfigFilePath)) {
+ return kLdGeneratedConfigFilePath;
+ } else {
+ // TODO(b/146386369) : Adjust log level and add more condition to log only when necessary
+ INFO("Warning: failed to find generated linker configuration from \"%s\"",
+ kLdGeneratedConfigFilePath);
+ }
+#endif
+
path = get_ld_config_file_vndk_path();
if (file_exists(path.c_str())) {
return path;
@@ -4317,9 +4334,10 @@
for (auto it : namespaces) {
// hybris we have no libdl soinfo
// it.second->add_soinfo(ld_android_so);
- if (vdso != nullptr) {
- it.second->add_soinfo(vdso);
- }
+// hybris adding vdso without the previous command causes a crash
+ // if (vdso != nullptr) {
+ // it.second->add_soinfo(vdso);
+ // }
// somain and ld_preloads are added to these namespaces after LD_PRELOAD libs are linked
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/common/q/linker_main.cpp
^
|
@@ -754,12 +754,28 @@
static const char* get_executable_path() {
static std::string executable_path;
if (executable_path.empty()) {
+#ifdef DISABLED_FOR_HYBRIS_SUPPORT
char path[PATH_MAX];
ssize_t path_len = readlink("/proc/self/exe", path, sizeof(path));
if (path_len == -1 || path_len >= static_cast<ssize_t>(sizeof(path))) {
async_safe_fatal("readlink('/proc/self/exe') failed: %s", strerror(errno));
}
executable_path = std::string(path, path_len);
+#else
+ if (!getauxval(AT_SECURE)) {
+ const char* use_vendor_namespace = getenv("HYBRIS_USE_VENDOR_NAMESPACE");
+ if (use_vendor_namespace != nullptr) {
+ executable_path = "/vendor/bin/yes";
+ }
+ }
+ if (executable_path.empty()) {
+#if defined(__aarch64__) || defined(__x86_64__)
+ executable_path = "/system/bin/app_process64";
+#else
+ executable_path = "/system/bin/app_process32";
+#endif
+ }
+#endif
}
return executable_path.c_str();
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/common/wrappers.h
^
|
@@ -1,32 +1,22 @@
-#ifndef __WRAPPERS_H__
-#define __WRAPPERS_H__
-/**
- * Copyright (c) 2013, Franz-Josef Haider <f_haider@gmx.at>
- * All rights reserved.
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- **/
+ */
+
+#ifndef __WRAPPERS_H__
+#define __WRAPPERS_H__
#ifdef __cplusplus
extern "C" {
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/configure.ac
^
|
@@ -78,15 +78,12 @@
[ubuntu_camera_headers="no"])
AM_CONDITIONAL( [WANT_UBUNTU_CAMERA_HEADERS], [test x"$ubuntu_camera_headers" = x"yes"])
-WANT_WAYLAND_EGL="no"
-
AC_ARG_ENABLE(wayland,
[ --enable-wayland Enable wayland support (default=disabled)],
[wayland=$enableval
PKG_CHECK_MODULES(WAYLAND_CLIENT, wayland-client,, exit)
PKG_CHECK_MODULES(WAYLAND_SERVER, wayland-server,, exit)
- PKG_CHECK_MODULES(WAYLAND_EGL, [wayland-egl >= 1.15], , [WANT_WAYLAND_EGL="yes"])
- AC_DEFINE(WANT_WAYLAND_EGL, [], [We use internal Wayland EGL support])
+ PKG_CHECK_MODULES(WAYLAND_EGL, [wayland-egl >= 1.15],, exit)
WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],, [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
@@ -94,7 +91,6 @@
],
[wayland="no"])
AM_CONDITIONAL( [WANT_WAYLAND], [test x"$wayland" = x"yes"])
-AM_CONDITIONAL( [WANT_WAYLAND_EGL], [test x"$WANT_WAYLAND_EGL" = x"yes"])
AC_ARG_ENABLE(glvnd,
[ --enable-glvnd Enable GLVND support])
@@ -298,6 +294,8 @@
common/n/Makefile
common/o/Makefile
common/q/Makefile
+ platforms/Makefile
+ platforms/common/Makefile
egl/egl.pc
egl/Makefile
egl/glvnd/10_libhybris.json
@@ -343,7 +341,16 @@
tests/Makefile
])
-AM_COND_IF([WANT_WAYLAND_EGL], [AC_CONFIG_FILES([egl/platforms/common/wayland-egl.pc])])
+AC_CHECK_HEADERS(vulkan/vulkan.h, HAS_VULKAN_HEADERS=yes)
+AM_CONDITIONAL([HAS_VULKAN_HEADERS], [test x"$HAS_VULKAN_HEADERS" = x"yes"])
+
+AM_COND_IF([HAS_VULKAN_HEADERS], [AC_CONFIG_FILES([
+ vulkan/Makefile
+ vulkan/platforms/Makefile
+ vulkan/platforms/common/Makefile
+ vulkan/platforms/null/Makefile
+ vulkan/platforms/wayland/Makefile])])
+
AC_OUTPUT
echo
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/Makefile.am
^
|
@@ -56,7 +56,7 @@
pkgconfig_DATA = egl.pc
endif
-libEGL__GL_LIB_SUFFIX__la_CFLAGS = -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) -DPKGLIBDIR="\"$(pkglibdir)/\"" -I$(top_srcdir)/common -DDEFAULT_EGL_PLATFORM="\"@DEFAULT_EGL_PLATFORM@\""
+libEGL__GL_LIB_SUFFIX__la_CFLAGS = -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) -DPKGLIBDIR="\"$(pkglibdir)/\"" -I$(top_srcdir)/common -I$(top_srcdir)/platforms/common -DDEFAULT_EGL_PLATFORM="\"@DEFAULT_EGL_PLATFORM@\""
if WANT_MESA
libEGL__GL_LIB_SUFFIX__la_CFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
endif
@@ -70,7 +70,7 @@
libEGL__GL_LIB_SUFFIX__la_CFLAGS += $(GLVND_CFLAGS) -I$(srcdir)/glvnd -I$(builddir)/glvnd -fvisibility=hidden
endif
-libEGL__GL_LIB_SUFFIX__la_CXXFLAGS = -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/common -DPKGLIBDIR="\"$(pkglibdir)/\""
+libEGL__GL_LIB_SUFFIX__la_CXXFLAGS = -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/common -I$(top_srcdir)/platforms/common -DPKGLIBDIR="\"$(pkglibdir)/\""
if WANT_MESA
libEGL__GL_LIB_SUFFIX__la_CXXFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/egl.c
^
|
@@ -315,6 +315,11 @@
HYBRIS_TRACE_END("hybris-egl", "eglCreateWindowSurface", "");
return result;
}
+EGLSurface eglCreatePlatformWindowSurface(EGLDisplay dpy, EGLConfig config,
+ void *native_window, const EGLAttrib *attrib_list)
+{
+ return eglCreateWindowSurface(dpy, config, (uintptr_t) native_window, (const EGLint *) attrib_list);
+}
static EGLSurface _my_eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy, EGLConfig config,
void *native_window, const EGLint *attrib_list)
@@ -503,6 +508,7 @@
OVERRIDE_SAMENAME(eglGetPlatformDisplay),
OVERRIDE_SAMENAME(eglTerminate),
OVERRIDE_SAMENAME(eglCreateWindowSurface),
+ OVERRIDE_SAMENAME(eglCreatePlatformWindowSurface),
OVERRIDE_SAMENAME(eglDestroySurface),
OVERRIDE_SAMENAME(eglSwapInterval),
OVERRIDE_SAMENAME(eglCreateContext),
@@ -609,7 +615,7 @@
ret = ws_eglGetProcAddress(procname);
}
- if (ret == NULL) {
+ if (ret == NULL && _eglGetProcAddress != NULL) {
ret = (*_eglGetProcAddress)(procname);
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/eglhybris.h
^
|
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012 Simon Busch <morphis@gravedo.de>
+ * Copyright (c) 2022 Jolla Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +22,7 @@
/* Needed for ICS window.h */
#include <string.h>
#include <system/window.h>
+#include "platformcommon.h"
#ifdef __cplusplus
extern "C" {
@@ -28,8 +30,6 @@
void __eglHybrisSetError(EGLint error);
-void hybris_dump_buffer_to_file(struct ANativeWindowBuffer *buf);
-
void *hybris_android_egl_dlsym(const char *symbol);
int hybris_egl_has_mapping(EGLSurface surface);
EGLNativeWindowType hybris_egl_get_mapping(EGLSurface surface);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/common/Makefile.am
^
|
@@ -2,65 +2,12 @@
libhybris-eglplatformcommon.la
libhybris_eglplatformcommon_la_SOURCES = \
- native_handle.c \
- nativewindowbase.cpp \
- eglplatformcommon.cpp \
- windowbuffer.cpp
+ eglplatformcommon.cpp
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = hybris-egl-platform.pc
-if WANT_WAYLAND
-if WANT_WAYLAND_EGL
-lib_LTLIBRARIES += libwayland-egl.la
-
-pkgconfig_DATA += wayland-egl.pc
-endif
-
-libhybris_eglplatformcommon_la_SOURCES += \
- server_wlegl.cpp \
- server_wlegl_handle.cpp \
- server_wlegl_buffer.cpp \
- wayland-android-protocol.c
-
-BUILT_SOURCES = wayland-android-protocol.c \
- wayland-android-client-protocol.h \
- wayland-android-server-protocol.h
-
-%-protocol.c : %.xml
- $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
-
-%-server-protocol.h : %.xml
- $(AM_V_GEN)$(WAYLAND_SCANNER) server-header < $< > $@
-
-%-client-protocol.h : %.xml
- $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-if WANT_WAYLAND_EGL
-libwayland_egl_la_SOURCES = wayland-egl.c
-
-libwayland_egl_la_CFLAGS = -I. -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS)
-if WANT_TRACE
-libwayland_egl_la_CFLAGS += -DDEBUG
-endif
-if WANT_DEBUG
-libwayland_egl_la_CFLAGS += -ggdb -O0
-endif
-
-libwayland_egl_la_CXXFLAGS = -I. -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS)
-if WANT_TRACE
-libwayland_egl_la_CXXFLAGS += -DDEBUG
-endif
-if WANT_DEBUG
-libwayland_egl_la_CXXFLAGS += -ggdb -O0
-endif
-libwayland_egl_la_LDFLAGS = \
- -version-info "1":"0"
-
-endif
-endif
-
-libhybris_eglplatformcommon_la_CFLAGS = -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/egl -I$(top_srcdir)/common/
+libhybris_eglplatformcommon_la_CFLAGS = -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/egl -I$(top_srcdir)/common/ -I$(top_srcdir)/platforms/common/
if WANT_WAYLAND
libhybris_eglplatformcommon_la_CFLAGS += $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) $(ANDROID_HEADERS_CFLAGS)
endif
@@ -76,7 +23,7 @@
endif
-libhybris_eglplatformcommon_la_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/egl $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/common/
+libhybris_eglplatformcommon_la_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/egl $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/common/ -I$(top_srcdir)/platforms/common/
if WANT_MESA
libhybris_eglplatformcommon_la_CXXFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
endif
@@ -93,6 +40,8 @@
endif
libhybris_eglplatformcommon_la_LDFLAGS = \
$(top_builddir)/common/libhybris-common.la \
+ $(top_builddir)/gralloc/libgralloc.la \
+ $(top_builddir)/platforms/common/libhybris-platformcommon.la \
-version-info "1":"0":"0"
if HAS_ANDROID_4_2_0
@@ -106,9 +55,8 @@
eglplatformcommondir = $(includedir)/hybris/eglplatformcommon
eglplatformcommon_HEADERS = \
- support.h \
- nativewindowbase.h \
eglplatformcommon.h \
+ eglnativewindowbase.h \
hybris_nativebufferext.h
if WANT_WAYLAND
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/common/eglnativewindowbase.h
^
|
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef EGLNATIVEWINDOWBASE_H
+#define EGLNATIVEWINDOWBASE_H
+
+/* for ICS window.h */
+#include <string.h>
+#include <system/window.h>
+#include <EGL/egl.h>
+
+#include "nativewindowbase.h"
+
+/**
+ * @brief A Class to do common ANativeWindow initialization and thunk c-style
+ * callbacks into C++ method calls.
+ **/
+class EGLBaseNativeWindow : public BaseNativeWindow
+{
+public:
+ operator EGLNativeWindowType()
+ {
+ EGLNativeWindowType ret = reinterpret_cast<EGLNativeWindowType>(static_cast<ANativeWindow *>(this));
+ return ret;
+ }
+};
+
+#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/common/eglplatformcommon.cpp
^
|
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
#include <android-config.h>
#include <ws.h>
#include <stdlib.h>
@@ -19,6 +36,7 @@
#include "server_wlegl_buffer.h"
#endif
+#include "platformcommon.h"
#include "windowbuffer.h"
#include <hybris/gralloc/gralloc.h>
@@ -45,33 +63,6 @@
return (*my_egl_interface->get_mapping)(surface);
}
-extern "C" void hybris_dump_buffer_to_file(ANativeWindowBuffer *buf)
-{
- static int cnt = 0;
- void *vaddr;
- int ret = hybris_gralloc_lock(buf->handle, buf->usage, 0, 0, buf->width, buf->height, &vaddr);
- (void)ret;
- TRACE("buf:%p gralloc lock returns %i", buf, ret);
- TRACE("buf:%p lock to vaddr %p", buf, vaddr);
- char b[1024];
- int bytes_pp = 0;
-
- if (buf->format == HAL_PIXEL_FORMAT_RGBA_8888 || buf->format == HAL_PIXEL_FORMAT_BGRA_8888)
- bytes_pp = 4;
- else if (buf->format == HAL_PIXEL_FORMAT_RGB_565)
- bytes_pp = 2;
-
- snprintf(b, 1020, "vaddr.%p.%p.%i.%is%ix%ix%i", buf, vaddr, cnt, buf->width, buf->stride, buf->height, bytes_pp);
- cnt++;
- int fd = ::open(b, O_WRONLY|O_CREAT, S_IRWXU);
- if(fd < 0)
- return;
- if (::write(fd, vaddr, buf->stride * buf->height * bytes_pp) < 0)
- TRACE("dump buffer to file failed with error %i", errno);
- ::close(fd);
- hybris_gralloc_unlock(buf->handle);
-}
-
#ifdef WANT_WAYLAND
extern "C" EGLBoolean eglplatformcommon_eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
@@ -168,11 +159,14 @@
memcpy(&native->data[0], fds, num_fds * sizeof(int));
memcpy(&native->data[num_fds], ints, num_ints * sizeof(int));
- int ret = hybris_gralloc_retain(native);
+ const native_handle_t* out_handle = NULL;
+ int ret = hybris_gralloc_import_buffer(native, &out_handle);
+ native_handle_close(native);
+ native_handle_delete(native);
if (ret == 0)
{
- RemoteWindowBuffer *buf = new RemoteWindowBuffer(width, height, stride, format, usage, (buffer_handle_t)native);
+ RemoteWindowBuffer *buf = new RemoteWindowBuffer(width, height, stride, format, usage, (buffer_handle_t)out_handle);
buf->common.incRef(&buf->common);
*buffer = (EGLClientBuffer) static_cast<ANativeWindowBuffer *>(buf);
return EGL_TRUE;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/common/eglplatformcommon.h
^
|
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
#ifndef __EGLPLATFORMCOMMON_H
#define __EGLPLATFORMCOMMON_H
#include <string.h>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/common/hybris-egl-platform.pc.in
^
|
@@ -7,6 +7,6 @@
Description: libhybris EGL platform library
Version: @VERSION@
Requires: @ANDROID_HEADERS_PKGCONFIG@
-Libs: -L${libdir} -lhybris-common -lhybris-eglplatformcommon
-Cflags: -I${includedir} -I${includedir}/hybris/eglplatformcommon @ANDROID_HEADERS_CFLAGS@
+Libs: -L${libdir} -lhybris-common -lhybris-eglplatformcommon -lhybris-platformcommon
+Cflags: -I${includedir} -I${includedir}/hybris/eglplatformcommon -I${includedir}/hybris/platformcommon @ANDROID_HEADERS_CFLAGS@
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/fbdev/Makefile.am
^
|
@@ -7,6 +7,7 @@
eglplatform_fbdev_la_CXXFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
-I$(top_srcdir)/egl \
-I$(top_srcdir)/egl/platforms/common \
$(ANDROID_HEADERS_CFLAGS)
@@ -20,5 +21,6 @@
eglplatform_fbdev_la_LDFLAGS = \
-avoid-version -module -shared -export-dynamic \
+ $(top_builddir)/platforms/common/libhybris-platformcommon.la \
$(top_builddir)/egl/platforms/common/libhybris-eglplatformcommon.la \
$(top_builddir)/gralloc/libgralloc.la
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/fbdev/eglplatform_fbdev.cpp
^
|
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
#include <android-config.h>
#include <ws.h>
#include "fbdev_window.h"
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/fbdev/fbdev_window.cpp
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 libhybris
+ * Copyright (C) 2013-2022 libhybris
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
#include <errno.h>
#include <assert.h>
+#include <inttypes.h>
#include <pthread.h>
#include <stdio.h>
#include <string.h>
@@ -468,10 +469,10 @@
* Calling this function will usually cause following buffers to be
* reallocated.
*/
-int FbDevNativeWindow::setUsage(int usage)
+int FbDevNativeWindow::setUsage(uint64_t usage)
{
m_allocateBuffers = (m_usage != usage);
- TRACE("usage=x%x m_allocateBuffers=%d", usage, m_allocateBuffers);
+ TRACE("usage=x%" PRIx64 " m_allocateBuffers=%d", usage, m_allocateBuffers);
m_usage = usage;
return NO_ERROR;
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/fbdev/fbdev_window.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 libhybris
+ * Copyright (C) 2013-2022 libhybris
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
#ifndef FBDEV_WINDOW_H
#define FBDEV_WINDOW_H
-#include "nativewindowbase.h"
+#include "eglnativewindowbase.h"
#include <linux/fb.h>
#include <hardware/gralloc.h>
@@ -40,7 +40,7 @@
};
-class FbDevNativeWindow : public BaseNativeWindow {
+class FbDevNativeWindow : public EGLBaseNativeWindow {
public:
FbDevNativeWindow();
~FbDevNativeWindow();
@@ -64,7 +64,7 @@
virtual unsigned int transformHint() const;
virtual unsigned int getUsage() const;
// perform calls
- virtual int setUsage(int usage);
+ virtual int setUsage(uint64_t usage);
virtual int setBuffersFormat(int format);
virtual int setBuffersDimensions(int width, int height);
virtual int setBufferCount(int cnt);
@@ -74,7 +74,7 @@
void reallocateBuffers();
private:
- int m_usage;
+ uint64_t m_usage;
int m_bufFormat;
int m_bufferCount;
int m_freeBufs;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/hwcomposer/Makefile.am
^
|
@@ -14,6 +14,7 @@
libhybris_hwcomposerwindow_la_CXXFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
-I$(top_srcdir)/egl \
-I$(top_srcdir)/egl/platforms/common \
$(ANDROID_HEADERS_CFLAGS)
@@ -27,6 +28,7 @@
libhybris_hwcomposerwindow_la_LDFLAGS = \
-version-info "1":"0":"0" \
+ $(top_builddir)/platforms/common/libhybris-platformcommon.la \
$(top_builddir)/egl/platforms/common/libhybris-eglplatformcommon.la \
$(top_builddir)/gralloc/libgralloc.la
@@ -44,6 +46,7 @@
eglplatform_hwcomposer_la_CXXFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
-I$(top_srcdir)/egl \
-I$(top_srcdir)/egl/platforms/common \
$(ANDROID_HEADERS_CFLAGS)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/hwcomposer/eglplatform_hwcomposer.cpp
^
|
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
#include <android-config.h>
#include <ws.h>
#include "hwcomposer_window.h"
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/hwcomposer/hwcomposer_window.cpp
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 libhybris
+ * Copyright (C) 2013-2022 libhybris
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
#include <errno.h>
#include <assert.h>
+#include <inttypes.h>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
@@ -431,11 +432,11 @@
* Calling this function will usually cause following buffers to be
* reallocated.
*/
-int HWComposerNativeWindow::setUsage(int usage)
+int HWComposerNativeWindow::setUsage(uint64_t usage)
{
usage |= GRALLOC_USAGE_HW_COMPOSER|GRALLOC_USAGE_HW_FB;
int need_realloc = (m_usage != (unsigned int) usage);
- TRACE("usage=x%x realloc=%d", usage, need_realloc);
+ TRACE("usage=x%" PRIx64 " realloc=%d", usage, need_realloc);
m_usage = usage;
if (need_realloc)
destroyBuffers();
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/hwcomposer/hwcomposer_window.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 libhybris
+ * Copyright (C) 2013-2022 libhybris
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
#ifndef FBDEV_WINDOW_H
#define FBDEV_WINDOW_H
-#include "nativewindowbase.h"
+#include "eglnativewindowbase.h"
#include <linux/fb.h>
#include <hardware/gralloc.h>
@@ -41,7 +41,7 @@
};
-class HWComposerNativeWindow : public BaseNativeWindow {
+class HWComposerNativeWindow : public EGLBaseNativeWindow {
public:
HWComposerNativeWindow(unsigned int width, unsigned int height, unsigned int format);
~HWComposerNativeWindow();
@@ -67,7 +67,7 @@
virtual unsigned int transformHint() const;
virtual unsigned int getUsage() const;
// perform calls
- virtual int setUsage(int usage);
+ virtual int setUsage(uint64_t usage);
virtual int setBuffersFormat(int format);
virtual int setBuffersDimensions(int width, int height);
virtual int setBufferCount(int cnt);
@@ -78,7 +78,7 @@
void allocateBuffers();
private:
- unsigned int m_usage;
+ uint64_t m_usage;
unsigned int m_bufFormat;
std::vector<HWComposerNativeWindowBuffer*> m_bufList;
unsigned int m_bufferCount;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/null/eglplatform_null.c
^
|
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
#include <android-config.h>
#include <ws.h>
#include <dlfcn.h>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/wayland/Makefile.am
^
|
@@ -1,8 +1,9 @@
pkglib_LTLIBRARIES = eglplatform_wayland.la
-eglplatform_wayland_la_SOURCES = eglplatform_wayland.cpp wayland_window.cpp
+eglplatform_wayland_la_SOURCES = eglplatform_wayland.cpp wayland_window.cpp $(top_srcdir)/platforms/wayland/wayland_window_common.cpp
eglplatform_wayland_la_CXXFLAGS = \
-I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
-I$(top_srcdir)/include \
-I$(top_srcdir)/egl \
-I$(top_srcdir)/egl/platforms/common \
@@ -30,6 +31,7 @@
eglplatform_wayland_la_LDFLAGS = \
-avoid-version -module -shared -export-dynamic \
+ $(top_builddir)/platforms/common/libhybris-platformcommon.la \
$(top_builddir)/egl/platforms/common/libhybris-eglplatformcommon.la \
$(top_builddir)/gralloc/libgralloc.la \
$(WAYLAND_CLIENT_LIBS)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/wayland/eglplatform_wayland.cpp
^
|
@@ -1,7 +1,6 @@
/****************************************************************************************
**
- ** Copyright (C) 2013 Jolla Ltd.
- ** Contact: Carsten Munk <carsten.munk@jollamobile.com>
+ ** Copyright (C) 2013-2022 Jolla Ltd.
** All rights reserved.
**
** This file is part of Wayland enablement for libhybris
@@ -47,12 +46,12 @@
extern "C" {
#include <wayland-client.h>
#include <wayland-egl.h>
+#include <wayland-egl-backend.h>
}
#include <hybris/gralloc/gralloc.h>
#include "wayland_window.h"
#include "logging.h"
-#include "wayland-egl-priv.h"
#include "server_wlegl_buffer.h"
#include "wayland-android-client-protocol.h"
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/wayland/wayland_window.cpp
^
|
@@ -1,7 +1,6 @@
/****************************************************************************************
**
- ** Copyright (C) 2013 Jolla Ltd.
- ** Contact: Carsten Munk <carsten.munk@jollamobile.com>
+ ** Copyright (C) 2013-2022 Jolla Ltd.
** All rights reserved.
**
** This file is part of Wayland enablement for libhybris
@@ -28,7 +27,7 @@
#include <android-config.h>
#include <hardware/gralloc.h>
#include "wayland_window.h"
-#include "wayland-egl-priv.h"
+#include <wayland-egl-backend.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
@@ -44,131 +43,16 @@
#endif
static void
-buffer_create_sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
-{
- struct wl_callback **created_callback = static_cast<struct wl_callback **>(data);
-
- *created_callback = NULL;
- wl_callback_destroy(callback);
-}
-
-static const struct wl_callback_listener buffer_create_sync_listener = {
- buffer_create_sync_callback
-};
-
-void WaylandNativeWindowBuffer::wlbuffer_from_native_handle(struct android_wlegl *android_wlegl,
- struct wl_display *display, struct wl_event_queue *queue)
-{
- struct wl_array ints;
- int *ints_data;
- struct android_wlegl_handle *wlegl_handle;
-
- wl_array_init(&ints);
- ints_data = (int*) wl_array_add(&ints, handle->numInts*sizeof(int));
- memcpy(ints_data, handle->data + handle->numFds, handle->numInts*sizeof(int));
-
- wlegl_handle = android_wlegl_create_handle(android_wlegl, handle->numFds, &ints);
-
- wl_array_release(&ints);
-
- for (int i = 0; i < handle->numFds; i++) {
- android_wlegl_handle_add_fd(wlegl_handle, handle->data[i]);
- }
-
- wlbuffer = android_wlegl_create_buffer(android_wlegl,
- width, height, stride,
- format, usage, wlegl_handle);
- wl_proxy_set_queue((struct wl_proxy *) wlbuffer, queue);
-
- android_wlegl_handle_destroy(wlegl_handle);
-
- creation_callback = wl_display_sync(display);
- wl_callback_add_listener(creation_callback, &buffer_create_sync_listener, &creation_callback);
- wl_proxy_set_queue((struct wl_proxy *)creation_callback, queue);
-}
-
-void WaylandNativeWindow::resize(unsigned int width, unsigned int height)
-{
- lock();
- this->m_defaultWidth = m_width = width;
- this->m_defaultHeight = m_height = height;
- unlock();
-}
-
-void WaylandNativeWindow::resize_callback(struct wl_egl_window *egl_window, void *)
-{
- TRACE("%dx%d",egl_window->width,egl_window->height);
- ((WaylandNativeWindow *) egl_window->driver_private)->resize(egl_window->width, egl_window->height);
-}
-
-void WaylandNativeWindow::destroy_window_callback(void *data)
-{
- WaylandNativeWindow *native = (WaylandNativeWindow*)data;
-
- native->lock();
- native->m_window = 0;
- native->unlock();
-}
-
-void WaylandNativeWindow::lock()
-{
- pthread_mutex_lock(&this->mutex);
-}
-
-void WaylandNativeWindow::unlock()
-{
- pthread_mutex_unlock(&this->mutex);
-}
-
-void
-WaylandNativeWindow::sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
+wl_buffer_release(void *data, struct wl_buffer *buffer)
{
- int *done = static_cast<int *>(data);
-
- *done = 1;
- wl_callback_destroy(callback);
+ WaylandNativeWindow *win = static_cast<WaylandNativeWindow *>(data);
+ win->releaseBuffer(buffer);
}
-static const struct wl_callback_listener sync_listener = {
- WaylandNativeWindow::sync_callback
+static struct wl_buffer_listener wl_buffer_listener = {
+ wl_buffer_release
};
-
-#if WAYLAND_VERSION_MAJOR == 0 || (WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR < 6)
-int
-WaylandNativeWindow::wl_display_roundtrip_queue(struct wl_display *display,
- struct wl_event_queue *queue)
-{
- struct wl_callback *callback;
- int done = 0, ret = 0;
- wl_display_dispatch_queue_pending(display, queue);
-
- callback = wl_display_sync(display);
- wl_callback_add_listener(callback, &sync_listener, &done);
- wl_proxy_set_queue((struct wl_proxy *) callback, queue);
- while (ret >= 0 && !done)
- ret = wl_display_dispatch_queue(display, queue);
-
- return ret;
-}
-#endif
-
-static void check_fatal_error(struct wl_display *display)
-{
- int error = wl_display_get_error(display);
-
- if (error == 0)
- return;
-
- fprintf(stderr, "Wayland display got fatal error %i: %s\n", error, strerror(error));
-
- if (errno != 0)
- fprintf(stderr, "Additionally, errno was set to %i: %s\n", errno, strerror(errno));
-
- fprintf(stderr, "The display is now unusable, aborting.\n");
- abort();
-}
-
static void
wayland_frame_callback(void *data, struct wl_callback *callback, uint32_t time)
{
@@ -181,149 +65,61 @@
wayland_frame_callback
};
-WaylandNativeWindow::WaylandNativeWindow(struct wl_egl_window *window, struct wl_display *display, android_wlegl *wlegl)
- : m_android_wlegl(wlegl)
-{
- HYBRIS_TRACE_BEGIN("wayland-platform", "create_window", "");
- this->m_window = window;
- this->m_window->driver_private = (void *) this;
- this->m_display = display;
- this->m_width = window->width;
- this->m_height = window->height;
- this->m_defaultWidth = window->width;
- this->m_defaultHeight = window->height;
- this->m_window->resize_callback = resize_callback;
- this->m_window->destroy_window_callback = destroy_window_callback;
- this->frame_callback = NULL;
- this->wl_queue = wl_display_create_queue(display);
- this->m_format = 1;
-
- const_cast<int&>(ANativeWindow::minSwapInterval) = 0;
- const_cast<int&>(ANativeWindow::maxSwapInterval) = 1;
- // This is the default as per the EGL documentation
- this->m_swap_interval = 1;
-
- m_usage=GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE;
- pthread_mutex_init(&mutex, NULL);
- pthread_cond_init(&cond, NULL);
- m_queueReads = 0;
- m_freeBufs = 0;
- m_damage_rects = NULL;
- m_damage_n_rects = 0;
- m_lastBuffer = 0;
- setBufferCount(3);
- HYBRIS_TRACE_END("wayland-platform", "create_window", "");
-}
-
-WaylandNativeWindow::~WaylandNativeWindow()
+int WaylandNativeWindow::postBuffer(ANativeWindowBuffer* buffer)
{
- destroyBuffers();
- if (frame_callback)
- wl_callback_destroy(frame_callback);
- wl_event_queue_destroy(wl_queue);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/platforms/wayland/wayland_window.h
^
|
@@ -1,7 +1,6 @@
/****************************************************************************************
**
- ** Copyright (C) 2013 Jolla Ltd.
- ** Contact: Carsten Munk <carsten.munk@jollamobile.com>
+ ** Copyright (C) 2013-2022 Jolla Ltd.
** All rights reserved.
**
** This file is part of Wayland enablement for libhybris
@@ -26,7 +25,7 @@
#ifndef Wayland_WINDOW_H
#define Wayland_WINDOW_H
-#include "nativewindowbase.h"
+#include "eglnativewindowbase.h"
#include <linux/fb.h>
#include <hybris/gralloc/gralloc.h>
@@ -83,7 +82,7 @@
friend class WaylandNativeWindow;
protected:
ClientWaylandBuffer()
- : {}
+ {}
ClientWaylandBuffer( unsigned int width,
unsigned int height,
@@ -101,7 +100,7 @@
this->other = NULL;
int alloc_ok = hybris_gralloc_allocate(this->width ? this->width : 1, this->height ? this->height : 1,
this->format, this->usage,
- &this->handle, &this->stride);
+ &this->handle, (uint32_t*)&this->stride);
assert(alloc_ok == 0);
this->youngest = 0;
this->common.incRef(&this->common);
@@ -141,7 +140,7 @@
#endif // HYBRIS_NO_SERVER_SIDE_BUFFERS
-class WaylandNativeWindow : public BaseNativeWindow {
+class WaylandNativeWindow : public EGLBaseNativeWindow {
public:
WaylandNativeWindow(struct wl_egl_window *win, struct wl_display *display, android_wlegl *wlegl);
~WaylandNativeWindow();
@@ -180,7 +179,7 @@
virtual unsigned int transformHint() const;
virtual unsigned int getUsage() const;
// perform calls
- virtual int setUsage(int usage);
+ virtual int setUsage(uint64_t usage);
virtual int setBuffersFormat(int format);
virtual int setBuffersDimensions(int width, int height);
virtual int setBufferCount(int cnt);
@@ -204,7 +203,7 @@
int m_format;
unsigned int m_defaultWidth;
unsigned int m_defaultHeight;
- unsigned int m_usage;
+ uint64_t m_usage;
struct android_wlegl *m_android_wlegl;
pthread_mutex_t mutex;
pthread_cond_t cond;
@@ -213,10 +212,6 @@
EGLint *m_damage_rects, m_damage_n_rects;
struct wl_callback *frame_callback;
int m_swap_interval;
-#if WAYLAND_VERSION_MAJOR == 0 || (WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR < 6)
- static int wl_roundtrip_queue(struct wl_display *display,
- struct wl_event_queue *queue);
-#endif
};
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/egl/ws.h
^
|
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
#ifndef __LIBHYBRIS_WS_H
#define __LIBHYBRIS_WS_H
#include <EGL/egl.h>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/glesv1/glesv1_cm.c
^
|
@@ -274,8 +274,8 @@
HYBRIS_IMPLEMENT_VOID_FUNCTION5(glesv1_cm, glRenderbufferStorageMultisampleAPPLE, GLenum, GLsizei, GLenum, GLsizei, GLsizei);
HYBRIS_IMPLEMENT_VOID_FUNCTION0(glesv1_cm, glResolveMultisampleFramebufferAPPLE);
HYBRIS_IMPLEMENT_VOID_FUNCTION3(glesv1_cm, glDiscardFramebufferEXT, GLenum, GLsizei, const GLenum *);
-HYBRIS_IMPLEMENT_VOID_FUNCTION4(glesv1_cm, glMultiDrawArraysEXT, GLenum, GLint *, GLsizei *, GLsizei);
-HYBRIS_IMPLEMENT_VOID_FUNCTION5(glesv1_cm, glMultiDrawElementsEXT, GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei);
+HYBRIS_IMPLEMENT_VOID_FUNCTION4(glesv1_cm, glMultiDrawArraysEXT, GLenum, const GLint *, const GLsizei *, GLsizei);
+HYBRIS_IMPLEMENT_VOID_FUNCTION5(glesv1_cm, glMultiDrawElementsEXT, GLenum, const GLsizei *, GLenum, const void *const*, GLsizei);
HYBRIS_IMPLEMENT_VOID_FUNCTION2(glesv1_cm, glClipPlanefIMG, GLenum, const GLfloat *);
HYBRIS_IMPLEMENT_VOID_FUNCTION2(glesv1_cm, glClipPlanexIMG, GLenum, const GLfixed *);
HYBRIS_IMPLEMENT_VOID_FUNCTION5(glesv1_cm, glRenderbufferStorageMultisampleIMG, GLenum, GLsizei, GLenum, GLsizei, GLsizei);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/glesv2/glesv2.c
^
|
@@ -19,7 +19,6 @@
#define GL_GLEXT_PROTOTYPES
#include <GLES3/gl32.h>
-#include <GLES3/gl3ext.h>
#include <GLES2/gl2ext.h>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/gralloc/Makefile.am
^
|
@@ -15,8 +15,8 @@
else
libgralloc_la_CFLAGS = -DHAS_GRALLOC1_HEADER=0
endif
-libgralloc_la_CFLAGS += -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS)
-libgralloc_la_CXXFLAGS = -std=gnu++11 -I$(top_srcdir)/include
+libgralloc_la_CFLAGS += -I$(top_srcdir)/include -I$(top_srcdir)/common $(ANDROID_HEADERS_CFLAGS)
+libgralloc_la_CXXFLAGS = -std=gnu++11 -I$(top_srcdir)/include -I$(top_srcdir)/common
if WANT_TRACE
libgralloc_la_CFLAGS += -DDEBUG
endif
@@ -25,4 +25,5 @@
endif
libgralloc_la_LDFLAGS = \
$(top_builddir)/hardware/libhardware.la \
+ $(top_builddir)/ui/libui.la \
-version-info "1":"0":"0"
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/gralloc/gralloc.c
^
|
@@ -1,4 +1,23 @@
+/*
+ * Copyright (c) 2018-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef ANDROID_BUILD
#include <android-config.h>
+#endif
#include <stdlib.h>
#include <hardware/hardware.h>
@@ -14,6 +33,7 @@
#include "hybris-gralloc.h"
#else
#include <hybris/gralloc/gralloc.h>
+#include <hybris/ui/ui.h>
#include <hybris/common/binding.h>
#endif
@@ -24,6 +44,7 @@
#include <assert.h>
#include <dlfcn.h>
+#include "logging.h"
static int version = -1;
static hw_module_t *gralloc_hardware_module = NULL;
@@ -75,6 +96,12 @@
#define GRALLOC1(code) (0) {}
#endif
+#if ANDROID_VERSION_MAJOR>=10
+#define GRALLOC_COMPAT(code) (version == 2) { code }
+#else
+#define GRALLOC_COMPAT(code) (0) {}
+#endif
+
#define NO_GRALLOC { fprintf(stderr, "%s:%d: called gralloc method without gralloc loaded\n", __func__, __LINE__); assert(NULL); }
void hybris_gralloc_deinitialize(void);
@@ -125,12 +152,19 @@
assert(NULL);
}
} else {
- fprintf(stderr, "failed to find/load gralloc module\n");
- assert(NULL);
+#if ANDROID_VERSION_MAJOR>=10
+ hybris_ui_initialize();
+ if (hybris_ui_check_for_symbol("graphic_buffer_allocator_allocate")) {
+ version = 2;
+ } else
+#endif
+ {
+ fprintf(stderr, "failed to find/load gralloc module\n");
+ assert(NULL);
+ }
}
} else {
- // shouldn't reach here.
- assert(NULL);
+ TRACE("hybris gralloc module has been already initialized\n");
}
}
@@ -209,7 +243,13 @@
{
int ret = -ENOSYS;
- if GRALLOC1(
+ if GRALLOC_COMPAT(
+ if (was_allocated) {
+ ret = graphic_buffer_allocator_free(handle);
+ } else {
+ ret = graphic_buffer_mapper_free_buffer(handle);
+ }
+ ) else if GRALLOC1(
ret = gralloc1_release(gralloc1_device, handle);
// this needs to happen if the last reference is gone, this function is
@@ -234,6 +274,27 @@
return ret;
}
+int hybris_gralloc_import_buffer(buffer_handle_t raw_handle, buffer_handle_t* out_handle)
+{
+ int ret = -ENOSYS;
+
+ if GRALLOC_COMPAT(
+ ret = graphic_buffer_mapper_import_buffer_no_size(raw_handle, out_handle);
+ ) else {
+ // clone input buffer first when using gralloc 1 or 0
+ // to keep same ownership semantics with HIDL HAL
+ buffer_handle_t handle = NULL;
+ handle = native_handle_clone((native_handle_t*)raw_handle);
+ if (!handle)
+ return -ENOSYS;
+
+ ret = hybris_gralloc_retain(handle);
+ *out_handle = handle;
+ }
+
+ return ret;
+}
+
int hybris_gralloc_retain(buffer_handle_t handle)
{
int ret = -ENOSYS;
@@ -251,7 +312,10 @@
{
int ret = -ENOSYS;
- if GRALLOC1(
+ if GRALLOC_COMPAT(
+ ret = graphic_buffer_allocator_allocate(width, height, format, 1 /*layerCount*/, usage,
+ handle_ptr, stride_ptr, 0 /*graphicBufferId*/, "hybris-gralloc");
+ ) else if GRALLOC1(
gralloc1_buffer_descriptor_t desc;
uint64_t producer_usage;
uint64_t consumer_usage;
@@ -284,7 +348,19 @@
{
int ret = -ENOSYS;
- if GRALLOC1(
+ if GRALLOC_COMPAT(
+ ARect bounds;
+ int32_t outBytesPerPixel;
+ int32_t outBytesPerStride;
+
+ bounds.left = l;
+ bounds.top = t;
+ bounds.right = l + w;
+ bounds.bottom = t + h;
+
+ ret = graphic_buffer_mapper_lock(handle, usage, &bounds,
+ vaddr, &outBytesPerPixel, &outBytesPerStride);
+ ) else if GRALLOC1(
uint64_t producer_usage;
uint64_t consumer_usage;
gralloc1_rect_t access_region;
@@ -308,7 +384,9 @@
{
int ret = -ENOSYS;
- if GRALLOC1(
+ if GRALLOC_COMPAT(
+ ret = graphic_buffer_mapper_unlock(handle);
+ ) else if GRALLOC1(
int releaseFence = 0;
ret = gralloc1_unlock(gralloc1_device, handle, &releaseFence);
close(releaseFence);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl.h
^
|
@@ -1,39 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
******************************************************************************/
#ifndef __OPENCL_CL_H
#define __OPENCL_CL_H
-#ifdef __APPLE__
-#include <OpenCL/cl_platform.h>
-#else
+#include <CL/cl_version.h>
#include <CL/cl_platform.h>
-#endif
#ifdef __cplusplus
extern "C" {
@@ -51,8 +36,9 @@
typedef struct _cl_event * cl_event;
typedef struct _cl_sampler * cl_sampler;
-typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */
+typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */
typedef cl_ulong cl_bitfield;
+typedef cl_ulong cl_properties;
typedef cl_bitfield cl_device_type;
typedef cl_uint cl_platform_info;
typedef cl_uint cl_device_info;
@@ -60,52 +46,83 @@
typedef cl_uint cl_device_mem_cache_type;
typedef cl_uint cl_device_local_mem_type;
typedef cl_bitfield cl_device_exec_capabilities;
+#ifdef CL_VERSION_2_0
typedef cl_bitfield cl_device_svm_capabilities;
+#endif
typedef cl_bitfield cl_command_queue_properties;
+#ifdef CL_VERSION_1_2
typedef intptr_t cl_device_partition_property;
typedef cl_bitfield cl_device_affinity_domain;
+#endif
typedef intptr_t cl_context_properties;
typedef cl_uint cl_context_info;
-typedef cl_bitfield cl_queue_properties;
+#ifdef CL_VERSION_2_0
+typedef cl_properties cl_queue_properties;
+#endif
typedef cl_uint cl_command_queue_info;
typedef cl_uint cl_channel_order;
typedef cl_uint cl_channel_type;
typedef cl_bitfield cl_mem_flags;
+#ifdef CL_VERSION_2_0
typedef cl_bitfield cl_svm_mem_flags;
+#endif
typedef cl_uint cl_mem_object_type;
typedef cl_uint cl_mem_info;
+#ifdef CL_VERSION_1_2
typedef cl_bitfield cl_mem_migration_flags;
+#endif
typedef cl_uint cl_image_info;
+#ifdef CL_VERSION_1_1
typedef cl_uint cl_buffer_create_type;
+#endif
typedef cl_uint cl_addressing_mode;
typedef cl_uint cl_filter_mode;
typedef cl_uint cl_sampler_info;
typedef cl_bitfield cl_map_flags;
+#ifdef CL_VERSION_2_0
typedef intptr_t cl_pipe_properties;
typedef cl_uint cl_pipe_info;
+#endif
typedef cl_uint cl_program_info;
typedef cl_uint cl_program_build_info;
+#ifdef CL_VERSION_1_2
typedef cl_uint cl_program_binary_type;
+#endif
typedef cl_int cl_build_status;
typedef cl_uint cl_kernel_info;
+#ifdef CL_VERSION_1_2
typedef cl_uint cl_kernel_arg_info;
typedef cl_uint cl_kernel_arg_address_qualifier;
typedef cl_uint cl_kernel_arg_access_qualifier;
typedef cl_bitfield cl_kernel_arg_type_qualifier;
+#endif
typedef cl_uint cl_kernel_work_group_info;
+#ifdef CL_VERSION_2_1
typedef cl_uint cl_kernel_sub_group_info;
+#endif
typedef cl_uint cl_event_info;
typedef cl_uint cl_command_type;
typedef cl_uint cl_profiling_info;
-typedef cl_bitfield cl_sampler_properties;
+#ifdef CL_VERSION_2_0
+typedef cl_properties cl_sampler_properties;
typedef cl_uint cl_kernel_exec_info;
+#endif
+#ifdef CL_VERSION_3_0
+typedef cl_bitfield cl_device_atomic_capabilities;
+typedef cl_bitfield cl_device_device_enqueue_capabilities;
+typedef cl_uint cl_khronos_vendor_id;
+typedef cl_properties cl_mem_properties;
+typedef cl_uint cl_version;
+#endif
typedef struct _cl_image_format {
cl_channel_order image_channel_order;
cl_channel_type image_channel_data_type;
} cl_image_format;
+#ifdef CL_VERSION_1_2
+
typedef struct _cl_image_desc {
cl_mem_object_type image_type;
size_t image_width;
@@ -116,20 +133,55 @@
size_t image_slice_pitch;
cl_uint num_mip_levels;
cl_uint num_samples;
-#ifdef __GNUC__
- __extension__ /* Prevents warnings about anonymous union in -pedantic builds */
+#ifdef CL_VERSION_2_0
+#if defined(__GNUC__)
+ __extension__ /* Prevents warnings about anonymous union in -pedantic builds */
#endif
+#if defined(_MSC_VER) && !defined(__STDC__)
+#pragma warning( push )
+#pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 builds */
+#endif
+#if defined(_MSC_VER) && defined(__STDC__)
+ /* Anonymous unions are not supported in /Za builds */
+#else
union {
+#endif
+#endif
cl_mem buffer;
+#ifdef CL_VERSION_2_0
+#if defined(_MSC_VER) && defined(__STDC__)
+ /* Anonymous unions are not supported in /Za builds */
+#else
cl_mem mem_object;
};
+#endif
+#if defined(_MSC_VER) && !defined(__STDC__)
+#pragma warning( pop )
+#endif
+#endif
} cl_image_desc;
+#endif
+
+#ifdef CL_VERSION_1_1
+
typedef struct _cl_buffer_region {
size_t origin;
size_t size;
} cl_buffer_region;
+#endif
+
+#ifdef CL_VERSION_3_0
+
+#define CL_NAME_VERSION_MAX_NAME_SIZE 64
+
+typedef struct _cl_name_version {
+ cl_version version;
+ char name[CL_NAME_VERSION_MAX_NAME_SIZE];
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_d3d10.h
^
|
@@ -1,37 +1,34 @@
-/**********************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-
-/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
#ifndef __OPENCL_CL_D3D10_H
#define __OPENCL_CL_D3D10_H
+#if defined(_MSC_VER)
+#if _MSC_VER >=1500
+#pragma warning( push )
+#pragma warning( disable : 4201 )
+#endif
+#endif
#include <d3d10.h>
+#if defined(_MSC_VER)
+#if _MSC_VER >=1500
+#pragma warning( pop )
+#endif
+#endif
#include <CL/cl.h>
#include <CL/cl_platform.h>
@@ -78,7 +75,7 @@
/******************************************************************************/
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
+typedef cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
cl_platform_id platform,
cl_d3d10_device_source_khr d3d_device_source,
void * d3d_object,
@@ -87,27 +84,27 @@
cl_device_id * devices,
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
+typedef cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Buffer * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
+typedef cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture2D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
+typedef cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture3D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
+typedef cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
@@ -115,7 +112,7 @@
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
+typedef cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
@@ -123,6 +120,31 @@
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+/***************************************************************
+* cl_intel_sharing_format_query_d3d10
+***************************************************************/
+#define cl_intel_sharing_format_query_d3d10 1
+
+/* when cl_khr_d3d10_sharing is supported */
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetSupportedD3D10TextureFormatsINTEL(
+ cl_context context,
+ cl_mem_flags flags,
+ cl_mem_object_type image_type,
+ cl_uint num_entries,
+ DXGI_FORMAT* d3d10_formats,
+ cl_uint* num_texture_formats) ;
+
+typedef cl_int (CL_API_CALL *
+clGetSupportedD3D10TextureFormatsINTEL_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ cl_mem_object_type image_type,
+ cl_uint num_entries,
+ DXGI_FORMAT* d3d10_formats,
+ cl_uint* num_texture_formats) ;
+
#ifdef __cplusplus
}
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_d3d11.h
^
|
@@ -1,37 +1,34 @@
-/**********************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-
-/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
#ifndef __OPENCL_CL_D3D11_H
#define __OPENCL_CL_D3D11_H
+#if defined(_MSC_VER)
+#if _MSC_VER >=1500
+#pragma warning( push )
+#pragma warning( disable : 4201 )
+#endif
+#endif
#include <d3d11.h>
+#if defined(_MSC_VER)
+#if _MSC_VER >=1500
+#pragma warning( pop )
+#endif
+#endif
#include <CL/cl.h>
#include <CL/cl_platform.h>
@@ -78,7 +75,7 @@
/******************************************************************************/
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
+typedef cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
cl_platform_id platform,
cl_d3d11_device_source_khr d3d_device_source,
void * d3d_object,
@@ -87,27 +84,27 @@
cl_device_id * devices,
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
+typedef cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D11Buffer * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
+typedef cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D11Texture2D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
+typedef cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D11Texture3D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
+typedef cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
@@ -115,7 +112,7 @@
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
+typedef cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
@@ -123,6 +120,33 @@
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+/***************************************************************
+* cl_intel_sharing_format_query_d3d11
+***************************************************************/
+#define cl_intel_sharing_format_query_d3d11 1
+
+/* when cl_khr_d3d11_sharing is supported */
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetSupportedD3D11TextureFormatsINTEL(
+ cl_context context,
+ cl_mem_flags flags,
+ cl_mem_object_type image_type,
+ cl_uint plane,
+ cl_uint num_entries,
+ DXGI_FORMAT* d3d11_formats,
+ cl_uint* num_texture_formats) ;
+
+typedef cl_int (CL_API_CALL *
+clGetSupportedD3D11TextureFormatsINTEL_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ cl_mem_object_type image_type,
+ cl_uint plane,
+ cl_uint num_entries,
+ DXGI_FORMAT* d3d11_formats,
+ cl_uint* num_texture_formats) ;
+
#ifdef __cplusplus
}
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_dx9_media_sharing.h
^
|
@@ -1,32 +1,18 @@
-/**********************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-
-/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H
#define __OPENCL_CL_DX9_MEDIA_SHARING_H
@@ -90,7 +76,7 @@
/******************************************************************************/
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
+typedef cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
cl_platform_id platform,
cl_uint num_media_adapters,
cl_dx9_media_adapter_type_khr * media_adapter_type,
@@ -100,7 +86,7 @@
cl_device_id * devices,
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
+typedef cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
cl_context context,
cl_mem_flags flags,
cl_dx9_media_adapter_type_khr adapter_type,
@@ -108,7 +94,7 @@
cl_uint plane,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
+typedef cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
@@ -116,7 +102,7 @@
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
+typedef cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
@@ -124,6 +110,144 @@
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+/***************************************
+* cl_intel_dx9_media_sharing extension *
+****************************************/
+
+#define cl_intel_dx9_media_sharing 1
+
+typedef cl_uint cl_dx9_device_source_intel;
+typedef cl_uint cl_dx9_device_set_intel;
+
+/* error codes */
+#define CL_INVALID_DX9_DEVICE_INTEL -1010
+#define CL_INVALID_DX9_RESOURCE_INTEL -1011
+#define CL_DX9_RESOURCE_ALREADY_ACQUIRED_INTEL -1012
+#define CL_DX9_RESOURCE_NOT_ACQUIRED_INTEL -1013
+
+/* cl_dx9_device_source_intel */
+#define CL_D3D9_DEVICE_INTEL 0x4022
+#define CL_D3D9EX_DEVICE_INTEL 0x4070
+#define CL_DXVA_DEVICE_INTEL 0x4071
+
+/* cl_dx9_device_set_intel */
+#define CL_PREFERRED_DEVICES_FOR_DX9_INTEL 0x4024
+#define CL_ALL_DEVICES_FOR_DX9_INTEL 0x4025
+
+/* cl_context_info */
+#define CL_CONTEXT_D3D9_DEVICE_INTEL 0x4026
+#define CL_CONTEXT_D3D9EX_DEVICE_INTEL 0x4072
+#define CL_CONTEXT_DXVA_DEVICE_INTEL 0x4073
+
+/* cl_mem_info */
+#define CL_MEM_DX9_RESOURCE_INTEL 0x4027
+#define CL_MEM_DX9_SHARED_HANDLE_INTEL 0x4074
+
+/* cl_image_info */
+#define CL_IMAGE_DX9_PLANE_INTEL 0x4075
+
+/* cl_command_type */
+#define CL_COMMAND_ACQUIRE_DX9_OBJECTS_INTEL 0x402A
+#define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B
+/******************************************************************************/
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetDeviceIDsFromDX9INTEL(
+ cl_platform_id platform,
+ cl_dx9_device_source_intel dx9_device_source,
+ void* dx9_object,
+ cl_dx9_device_set_intel dx9_device_set,
+ cl_uint num_entries,
+ cl_device_id* devices,
+ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_1;
+
+typedef cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
+ cl_platform_id platform,
+ cl_dx9_device_source_intel dx9_device_source,
+ void* dx9_object,
+ cl_dx9_device_set_intel dx9_device_set,
+ cl_uint num_entries,
+ cl_device_id* devices,
+ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_1;
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromDX9MediaSurfaceINTEL(
+ cl_context context,
+ cl_mem_flags flags,
+ IDirect3DSurface9* resource,
+ HANDLE sharedHandle,
+ UINT plane,
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
+
+typedef cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ IDirect3DSurface9* resource,
+ HANDLE sharedHandle,
+ UINT plane,
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueAcquireDX9ObjectsINTEL(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
+
+typedef cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReleaseDX9ObjectsINTEL(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
+
+typedef cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
+
+/***************************************************************
+* cl_intel_sharing_format_query_dx9
+***************************************************************/
+#define cl_intel_sharing_format_query_dx9 1
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_dx9_media_sharing_intel.h
^
|
@@ -1,182 +1,18 @@
-/**********************************************************************************
- * Copyright (c) 2008-2016 The Khronos Group Inc.
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-/*****************************************************************************\
-
-Copyright (c) 2013-2016 Intel Corporation All Rights Reserved.
-
-THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
-MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-File Name: cl_dx9_media_sharing_intel.h
-
-Abstract:
-
-Notes:
-
-\*****************************************************************************/
-
-#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
-#define __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
-
-#include <CL/cl.h>
-#include <CL/cl_platform.h>
-#include <d3d9.h>
-#include <dxvahd.h>
-#include <wtypes.h>
-#include <d3d9types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/***************************************
-* cl_intel_dx9_media_sharing extension *
-****************************************/
-
-#define cl_intel_dx9_media_sharing 1
-
-typedef cl_uint cl_dx9_device_source_intel;
-typedef cl_uint cl_dx9_device_set_intel;
-
-/* error codes */
-#define CL_INVALID_DX9_DEVICE_INTEL -1010
-#define CL_INVALID_DX9_RESOURCE_INTEL -1011
-#define CL_DX9_RESOURCE_ALREADY_ACQUIRED_INTEL -1012
-#define CL_DX9_RESOURCE_NOT_ACQUIRED_INTEL -1013
-
-/* cl_dx9_device_source_intel */
-#define CL_D3D9_DEVICE_INTEL 0x4022
-#define CL_D3D9EX_DEVICE_INTEL 0x4070
-#define CL_DXVA_DEVICE_INTEL 0x4071
-
-/* cl_dx9_device_set_intel */
-#define CL_PREFERRED_DEVICES_FOR_DX9_INTEL 0x4024
-#define CL_ALL_DEVICES_FOR_DX9_INTEL 0x4025
-
-/* cl_context_info */
-#define CL_CONTEXT_D3D9_DEVICE_INTEL 0x4026
-#define CL_CONTEXT_D3D9EX_DEVICE_INTEL 0x4072
-#define CL_CONTEXT_DXVA_DEVICE_INTEL 0x4073
-
-/* cl_mem_info */
-#define CL_MEM_DX9_RESOURCE_INTEL 0x4027
-#define CL_MEM_DX9_SHARED_HANDLE_INTEL 0x4074
-
-/* cl_image_info */
-#define CL_IMAGE_DX9_PLANE_INTEL 0x4075
-
-/* cl_command_type */
-#define CL_COMMAND_ACQUIRE_DX9_OBJECTS_INTEL 0x402A
-#define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B
-/******************************************************************************/
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetDeviceIDsFromDX9INTEL(
- cl_platform_id /* platform */,
- cl_dx9_device_source_intel /* dx9_device_source */,
- void* /* dx9_object */,
- cl_dx9_device_set_intel /* dx9_device_set */,
- cl_uint /* num_entries */,
- cl_device_id* /* devices */,
- cl_uint* /* num_devices */) CL_EXT_SUFFIX__VERSION_1_1;
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
- cl_platform_id /* platform */,
- cl_dx9_device_source_intel /* dx9_device_source */,
- void* /* dx9_object */,
- cl_dx9_device_set_intel /* dx9_device_set */,
- cl_uint /* num_entries */,
- cl_device_id* /* devices */,
- cl_uint* /* num_devices */) CL_EXT_SUFFIX__VERSION_1_1;
-
-extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateFromDX9MediaSurfaceINTEL(
- cl_context /* context */,
- cl_mem_flags /* flags */,
- IDirect3DSurface9* /* resource */,
- HANDLE /* sharedHandle */,
- UINT /* plane */,
- cl_int* /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;
-
-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
- cl_context /* context */,
- cl_mem_flags /* flags */,
- IDirect3DSurface9* /* resource */,
- HANDLE /* sharedHandle */,
- UINT /* plane */,
- cl_int* /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueAcquireDX9ObjectsINTEL(
- cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem* /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event* /* event_wait_list */,
- cl_event* /* event */) CL_EXT_SUFFIX__VERSION_1_1;
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
- cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem* /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event* /* event_wait_list */,
- cl_event* /* event */) CL_EXT_SUFFIX__VERSION_1_1;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueReleaseDX9ObjectsINTEL(
- cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- cl_mem* /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event* /* event_wait_list */,
- cl_event* /* event */) CL_EXT_SUFFIX__VERSION_1_1;
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
- cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- cl_mem* /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event* /* event_wait_list */,
- cl_event* /* event */) CL_EXT_SUFFIX__VERSION_1_1;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H */
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+#include <CL/cl_dx9_media_sharing.h>
+#pragma message("The Intel DX9 media sharing extensions have been moved into cl_dx9_media_sharing.h. Please include cl_dx9_media_sharing.h directly.")
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_egl.h
^
|
@@ -1,39 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
******************************************************************************/
#ifndef __OPENCL_CL_EGL_H
#define __OPENCL_CL_EGL_H
-#ifdef __APPLE__
-
-#else
#include <CL/cl.h>
-#endif
#ifdef __cplusplus
extern "C" {
@@ -65,69 +49,69 @@
#define cl_khr_egl_image 1
extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateFromEGLImageKHR(cl_context /* context */,
- CLeglDisplayKHR /* egldisplay */,
- CLeglImageKHR /* eglimage */,
- cl_mem_flags /* flags */,
- const cl_egl_image_properties_khr * /* properties */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
- cl_context context,
- CLeglDisplayKHR egldisplay,
- CLeglImageKHR eglimage,
- cl_mem_flags flags,
- const cl_egl_image_properties_khr * properties,
- cl_int * errcode_ret);
+clCreateFromEGLImageKHR(cl_context context,
+ CLeglDisplayKHR egldisplay,
+ CLeglImageKHR eglimage,
+ cl_mem_flags flags,
+ const cl_egl_image_properties_khr * properties,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
+ cl_context context,
+ CLeglDisplayKHR egldisplay,
+ CLeglImageKHR eglimage,
+ cl_mem_flags flags,
+ const cl_egl_image_properties_khr * properties,
+ cl_int * errcode_ret);
extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueAcquireEGLObjectsKHR(cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem * /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
- cl_command_queue command_queue,
- cl_uint num_objects,
- const cl_mem * mem_objects,
- cl_uint num_events_in_wait_list,
- const cl_event * event_wait_list,
- cl_event * event);
+clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event);
extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueReleaseEGLObjectsKHR(cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem * /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
- cl_command_queue command_queue,
- cl_uint num_objects,
- const cl_mem * mem_objects,
- cl_uint num_events_in_wait_list,
- const cl_event * event_wait_list,
- cl_event * event);
+clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event);
#define cl_khr_egl_event 1
extern CL_API_ENTRY cl_event CL_API_CALL
-clCreateEventFromEGLSyncKHR(cl_context /* context */,
- CLeglSyncKHR /* sync */,
- CLeglDisplayKHR /* display */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
- cl_context context,
- CLeglSyncKHR sync,
- CLeglDisplayKHR display,
- cl_int * errcode_ret);
+clCreateEventFromEGLSyncKHR(cl_context context,
+ CLeglSyncKHR sync,
+ CLeglDisplayKHR display,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
+ cl_context context,
+ CLeglSyncKHR sync,
+ CLeglDisplayKHR display,
+ cl_int * errcode_ret);
#ifdef __cplusplus
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_ext.h
^
|
@@ -1,33 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
******************************************************************************/
-/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */
-
/* cl_ext.h contains OpenCL extensions which don't have external */
/* (OpenGL, D3D) dependencies. */
@@ -38,11 +24,394 @@
extern "C" {
#endif
-#ifdef __APPLE__
- #include <OpenCL/cl.h>
- #include <AvailabilityMacros.h>
-#else
- #include <CL/cl.h>
+#include <CL/cl.h>
+
+/***************************************************************
+* cl_khr_command_buffer
+***************************************************************/
+#define cl_khr_command_buffer 1
+#define CL_KHR_COMMAND_BUFFER_EXTENSION_NAME \
+ "cl_khr_command_buffer"
+
+typedef cl_bitfield cl_device_command_buffer_capabilities_khr;
+typedef struct _cl_command_buffer_khr* cl_command_buffer_khr;
+typedef cl_uint cl_sync_point_khr;
+typedef cl_uint cl_command_buffer_info_khr;
+typedef cl_uint cl_command_buffer_state_khr;
+typedef cl_properties cl_command_buffer_properties_khr;
+typedef cl_bitfield cl_command_buffer_flags_khr;
+typedef cl_properties cl_ndrange_kernel_command_properties_khr;
+typedef struct _cl_mutable_command_khr* cl_mutable_command_khr;
+
+/* cl_device_info */
+#define CL_DEVICE_COMMAND_BUFFER_CAPABILITIES_KHR 0x12A9
+#define CL_DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES_KHR 0x12AA
+
+/* cl_device_command_buffer_capabilities_khr - bitfield */
+#define CL_COMMAND_BUFFER_CAPABILITY_KERNEL_PRINTF_KHR (1 << 0)
+#define CL_COMMAND_BUFFER_CAPABILITY_DEVICE_SIDE_ENQUEUE_KHR (1 << 1)
+#define CL_COMMAND_BUFFER_CAPABILITY_SIMULTANEOUS_USE_KHR (1 << 2)
+#define CL_COMMAND_BUFFER_CAPABILITY_OUT_OF_ORDER_KHR (1 << 3)
+
+/* cl_command_buffer_properties_khr */
+#define CL_COMMAND_BUFFER_FLAGS_KHR 0x1293
+
+/* cl_command_buffer_flags_khr */
+#define CL_COMMAND_BUFFER_SIMULTANEOUS_USE_KHR (1 << 0)
+
+/* Error codes */
+#define CL_INVALID_COMMAND_BUFFER_KHR -1138
+#define CL_INVALID_SYNC_POINT_WAIT_LIST_KHR -1139
+#define CL_INCOMPATIBLE_COMMAND_QUEUE_KHR -1140
+
+/* cl_command_buffer_info_khr */
+#define CL_COMMAND_BUFFER_QUEUES_KHR 0x1294
+#define CL_COMMAND_BUFFER_NUM_QUEUES_KHR 0x1295
+#define CL_COMMAND_BUFFER_REFERENCE_COUNT_KHR 0x1296
+#define CL_COMMAND_BUFFER_STATE_KHR 0x1297
+#define CL_COMMAND_BUFFER_PROPERTIES_ARRAY_KHR 0x1298
+
+/* cl_command_buffer_state_khr */
+#define CL_COMMAND_BUFFER_STATE_RECORDING_KHR 0
+#define CL_COMMAND_BUFFER_STATE_EXECUTABLE_KHR 1
+#define CL_COMMAND_BUFFER_STATE_PENDING_KHR 2
+#define CL_COMMAND_BUFFER_STATE_INVALID_KHR 3
+
+/* cl_command_type */
+#define CL_COMMAND_COMMAND_BUFFER_KHR 0x12A8
+
+
+typedef cl_command_buffer_khr (CL_API_CALL *
+clCreateCommandBufferKHR_fn)(
+ cl_uint num_queues,
+ const cl_command_queue* queues,
+ const cl_command_buffer_properties_khr* properties,
+ cl_int* errcode_ret) ;
+
+typedef cl_int (CL_API_CALL *
+clFinalizeCommandBufferKHR_fn)(
+ cl_command_buffer_khr command_buffer) ;
+
+typedef cl_int (CL_API_CALL *
+clRetainCommandBufferKHR_fn)(
+ cl_command_buffer_khr command_buffer) ;
+
+typedef cl_int (CL_API_CALL *
+clReleaseCommandBufferKHR_fn)(
+ cl_command_buffer_khr command_buffer) ;
+
+typedef cl_int (CL_API_CALL *
+clEnqueueCommandBufferKHR_fn)(
+ cl_uint num_queues,
+ cl_command_queue* queues,
+ cl_command_buffer_khr command_buffer,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event) ;
+
+typedef cl_int (CL_API_CALL *
+clCommandBarrierWithWaitListKHR_fn)(
+ cl_command_buffer_khr command_buffer,
+ cl_command_queue command_queue,
+ cl_uint num_sync_points_in_wait_list,
+ const cl_sync_point_khr* sync_point_wait_list,
+ cl_sync_point_khr* sync_point,
+ cl_mutable_command_khr* mutable_handle) ;
+
+typedef cl_int (CL_API_CALL *
+clCommandCopyBufferKHR_fn)(
+ cl_command_buffer_khr command_buffer,
+ cl_command_queue command_queue,
+ cl_mem src_buffer,
+ cl_mem dst_buffer,
+ size_t src_offset,
+ size_t dst_offset,
+ size_t size,
+ cl_uint num_sync_points_in_wait_list,
+ const cl_sync_point_khr* sync_point_wait_list,
+ cl_sync_point_khr* sync_point,
+ cl_mutable_command_khr* mutable_handle) ;
+
+typedef cl_int (CL_API_CALL *
+clCommandCopyBufferRectKHR_fn)(
+ cl_command_buffer_khr command_buffer,
+ cl_command_queue command_queue,
+ cl_mem src_buffer,
+ cl_mem dst_buffer,
+ const size_t* src_origin,
+ const size_t* dst_origin,
+ const size_t* region,
+ size_t src_row_pitch,
+ size_t src_slice_pitch,
+ size_t dst_row_pitch,
+ size_t dst_slice_pitch,
+ cl_uint num_sync_points_in_wait_list,
+ const cl_sync_point_khr* sync_point_wait_list,
+ cl_sync_point_khr* sync_point,
+ cl_mutable_command_khr* mutable_handle) ;
+
+typedef cl_int (CL_API_CALL *
+clCommandCopyBufferToImageKHR_fn)(
+ cl_command_buffer_khr command_buffer,
+ cl_command_queue command_queue,
+ cl_mem src_buffer,
+ cl_mem dst_image,
+ size_t src_offset,
+ const size_t* dst_origin,
+ const size_t* region,
+ cl_uint num_sync_points_in_wait_list,
+ const cl_sync_point_khr* sync_point_wait_list,
+ cl_sync_point_khr* sync_point,
+ cl_mutable_command_khr* mutable_handle) ;
+
+typedef cl_int (CL_API_CALL *
+clCommandCopyImageKHR_fn)(
+ cl_command_buffer_khr command_buffer,
+ cl_command_queue command_queue,
+ cl_mem src_image,
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_ext_intel.h
^
|
@@ -1,429 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2008-2017 The Khronos Group Inc.
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
******************************************************************************/
-/*****************************************************************************\
-
-Copyright (c) 2013-2017 Intel Corporation All Rights Reserved.
-
-THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
-MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-File Name: cl_ext_intel.h
-
-Abstract:
-
-Notes:
-
-\*****************************************************************************/
-
-#ifndef __CL_EXT_INTEL_H
-#define __CL_EXT_INTEL_H
-
-#ifdef __APPLE__
- #include <OpenCL/cl.h>
- #include <OpenCL/cl_platform.h>
-#else
- #include <CL/cl.h>
- #include <CL/cl_platform.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/***************************************
-* cl_intel_thread_local_exec extension *
-****************************************/
-
-#define cl_intel_thread_local_exec 1
-
-#define CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL (((cl_bitfield)1) << 31)
-
-/***********************************************
-* cl_intel_device_partition_by_names extension *
-************************************************/
-
-#define cl_intel_device_partition_by_names 1
-
-#define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052
-#define CL_PARTITION_BY_NAMES_LIST_END_INTEL -1
-
-/************************************************
-* cl_intel_accelerator extension *
-* cl_intel_motion_estimation extension *
-* cl_intel_advanced_motion_estimation extension *
-*************************************************/
-
-#define cl_intel_accelerator 1
-#define cl_intel_motion_estimation 1
-#define cl_intel_advanced_motion_estimation 1
-
-typedef struct _cl_accelerator_intel* cl_accelerator_intel;
-typedef cl_uint cl_accelerator_type_intel;
-typedef cl_uint cl_accelerator_info_intel;
-
-typedef struct _cl_motion_estimation_desc_intel {
- cl_uint mb_block_type;
- cl_uint subpixel_mode;
- cl_uint sad_adjust_mode;
- cl_uint search_path_type;
-} cl_motion_estimation_desc_intel;
-
-/* error codes */
-#define CL_INVALID_ACCELERATOR_INTEL -1094
-#define CL_INVALID_ACCELERATOR_TYPE_INTEL -1095
-#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL -1096
-#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL -1097
-
-/* cl_accelerator_type_intel */
-#define CL_ACCELERATOR_TYPE_MOTION_ESTIMATION_INTEL 0x0
-
-/* cl_accelerator_info_intel */
-#define CL_ACCELERATOR_DESCRIPTOR_INTEL 0x4090
-#define CL_ACCELERATOR_REFERENCE_COUNT_INTEL 0x4091
-#define CL_ACCELERATOR_CONTEXT_INTEL 0x4092
-#define CL_ACCELERATOR_TYPE_INTEL 0x4093
-
-/* cl_motion_detect_desc_intel flags */
-#define CL_ME_MB_TYPE_16x16_INTEL 0x0
-#define CL_ME_MB_TYPE_8x8_INTEL 0x1
-#define CL_ME_MB_TYPE_4x4_INTEL 0x2
-
-#define CL_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
-#define CL_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
-#define CL_ME_SUBPIXEL_MODE_QPEL_INTEL 0x2
-
-#define CL_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
-#define CL_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x1
-
-#define CL_ME_SEARCH_PATH_RADIUS_2_2_INTEL 0x0
-#define CL_ME_SEARCH_PATH_RADIUS_4_4_INTEL 0x1
-#define CL_ME_SEARCH_PATH_RADIUS_16_12_INTEL 0x5
-
-#define CL_ME_SKIP_BLOCK_TYPE_16x16_INTEL 0x0
-#define CL_ME_CHROMA_INTRA_PREDICT_ENABLED_INTEL 0x1
-#define CL_ME_LUMA_INTRA_PREDICT_ENABLED_INTEL 0x2
-#define CL_ME_SKIP_BLOCK_TYPE_8x8_INTEL 0x4
-
-#define CL_ME_FORWARD_INPUT_MODE_INTEL 0x1
-#define CL_ME_BACKWARD_INPUT_MODE_INTEL 0x2
-#define CL_ME_BIDIRECTION_INPUT_MODE_INTEL 0x3
-
-#define CL_ME_BIDIR_WEIGHT_QUARTER_INTEL 16
-#define CL_ME_BIDIR_WEIGHT_THIRD_INTEL 21
-#define CL_ME_BIDIR_WEIGHT_HALF_INTEL 32
-#define CL_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 43
-#define CL_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 48
-
-#define CL_ME_COST_PENALTY_NONE_INTEL 0x0
-#define CL_ME_COST_PENALTY_LOW_INTEL 0x1
-#define CL_ME_COST_PENALTY_NORMAL_INTEL 0x2
-#define CL_ME_COST_PENALTY_HIGH_INTEL 0x3
-
-#define CL_ME_COST_PRECISION_QPEL_INTEL 0x0
-#define CL_ME_COST_PRECISION_HPEL_INTEL 0x1
-#define CL_ME_COST_PRECISION_PEL_INTEL 0x2
-#define CL_ME_COST_PRECISION_DPEL_INTEL 0x3
-
-#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
-#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
-#define CL_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
-#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
-
-#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
-#define CL_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
-#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
-#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
-#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
-#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
-
-#define CL_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
-#define CL_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
-#define CL_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
-#define CL_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
-
-/* cl_device_info */
-#define CL_DEVICE_ME_VERSION_INTEL 0x407E
-
-#define CL_ME_VERSION_LEGACY_INTEL 0x0
-#define CL_ME_VERSION_ADVANCED_VER_1_INTEL 0x1
-#define CL_ME_VERSION_ADVANCED_VER_2_INTEL 0x2
-
-extern CL_API_ENTRY cl_accelerator_intel CL_API_CALL
-clCreateAcceleratorINTEL(
- cl_context /* context */,
- cl_accelerator_type_intel /* accelerator_type */,
- size_t /* descriptor_size */,
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_gl.h
^
|
@@ -1,39 +1,23 @@
-/**********************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+/*******************************************************************************
+ * Copyright (c) 2008-2021 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
#ifndef __OPENCL_CL_GL_H
#define __OPENCL_CL_GL_H
-#ifdef __APPLE__
-#include <OpenCL/cl.h>
-#else
#include <CL/cl.h>
-#endif
#ifdef __cplusplus
extern "C" {
@@ -49,117 +33,160 @@
#define CL_GL_OBJECT_TEXTURE2D 0x2001
#define CL_GL_OBJECT_TEXTURE3D 0x2002
#define CL_GL_OBJECT_RENDERBUFFER 0x2003
+#ifdef CL_VERSION_1_2
#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
#define CL_GL_OBJECT_TEXTURE1D 0x200F
#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
+#endif
/* cl_gl_texture_info */
#define CL_GL_TEXTURE_TARGET 0x2004
#define CL_GL_MIPMAP_LEVEL 0x2005
+#ifdef CL_VERSION_1_2
#define CL_GL_NUM_SAMPLES 0x2012
+#endif
extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateFromGLBuffer(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLuint /* bufobj */,
- int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+clCreateFromGLBuffer(cl_context context,
+ cl_mem_flags flags,
+ cl_GLuint bufobj,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateFromGLTexture(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLenum /* target */,
- cl_GLint /* miplevel */,
- cl_GLuint /* texture */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
-
+clCreateFromGLTexture(cl_context context,
+ cl_mem_flags flags,
+ cl_GLenum target,
+ cl_GLint miplevel,
+ cl_GLuint texture,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
extern CL_API_ENTRY cl_mem CL_API_CALL
-clCreateFromGLRenderbuffer(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLuint /* renderbuffer */,
- cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetGLObjectInfo(cl_mem /* memobj */,
- cl_gl_object_type * /* gl_object_type */,
- cl_GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetGLTextureInfo(cl_mem /* memobj */,
- cl_gl_texture_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem * /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem * /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event * /* event_wait_list */,
- cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+clCreateFromGLRenderbuffer(cl_context context,
+ cl_mem_flags flags,
+ cl_GLuint renderbuffer,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetGLObjectInfo(cl_mem memobj,
+ cl_gl_object_type * gl_object_type,
+ cl_GLuint * gl_object_name) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetGLTextureInfo(cl_mem memobj,
+ cl_gl_texture_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueAcquireGLObjects(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReleaseGLObjects(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
/* Deprecated OpenCL 1.1 APIs */
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
-clCreateFromGLTexture2D(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLenum /* target */,
- cl_GLint /* miplevel */,
- cl_GLuint /* texture */,
- cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
-clCreateFromGLTexture3D(cl_context /* context */,
- cl_mem_flags /* flags */,
- cl_GLenum /* target */,
- cl_GLint /* miplevel */,
- cl_GLuint /* texture */,
- cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
-
+extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+clCreateFromGLTexture2D(cl_context context,
+ cl_mem_flags flags,
+ cl_GLenum target,
+ cl_GLint miplevel,
+ cl_GLuint texture,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+clCreateFromGLTexture3D(cl_context context,
+ cl_mem_flags flags,
+ cl_GLenum target,
+ cl_GLint miplevel,
+ cl_GLuint texture,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_gl_ext.h
^
|
@@ -1,74 +1,18 @@
-/**********************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+/*******************************************************************************
+ * Copyright (c) 2008-2021 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-
-/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
-
-/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */
-/* OpenGL dependencies. */
-
-#ifndef __OPENCL_CL_GL_EXT_H
-#define __OPENCL_CL_GL_EXT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __APPLE__
- #include <OpenCL/cl_gl.h>
-#else
- #include <CL/cl_gl.h>
-#endif
-
-/*
- * For each extension, follow this template
- * cl_VEN_extname extension */
-/* #define cl_VEN_extname 1
- * ... define new types, if any
- * ... define new tokens, if any
- * ... define new APIs, if any
- *
- * If you need GLtypes here, mirror them with a cl_GLtype, rather than including a GL header
- * This allows us to avoid having to decide whether to include GL headers or GLES here.
- */
-
-/*
- * cl_khr_gl_event extension
- * See section 9.9 in the OpenCL 1.1 spec for more information
- */
-#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
-
-extern CL_API_ENTRY cl_event CL_API_CALL
-clCreateEventFromGLsyncKHR(cl_context /* context */,
- cl_GLsync /* cl_GLsync */,
- cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;
-
-#ifdef __cplusplus
-}
-#endif
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
-#endif /* __OPENCL_CL_GL_EXT_H */
+#include <CL/cl_gl.h>
+#pragma message("All OpenGL-related extensions have been moved into cl_gl.h. Please include cl_gl.h directly.")
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_half.h
^
|
@@ -0,0 +1,440 @@
+/*******************************************************************************
+ * Copyright (c) 2019-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+/**
+ * This is a header-only utility library that provides OpenCL host code with
+ * routines for converting to/from cl_half values.
+ *
+ * Example usage:
+ *
+ * #include <CL/cl_half.h>
+ * ...
+ * cl_half h = cl_half_from_float(0.5f, CL_HALF_RTE);
+ * cl_float f = cl_half_to_float(h);
+ */
+
+#ifndef OPENCL_CL_HALF_H
+#define OPENCL_CL_HALF_H
+
+#include <CL/cl_platform.h>
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Rounding mode used when converting to cl_half.
+ */
+typedef enum
+{
+ CL_HALF_RTE, // round to nearest even
+ CL_HALF_RTZ, // round towards zero
+ CL_HALF_RTP, // round towards positive infinity
+ CL_HALF_RTN, // round towards negative infinity
+} cl_half_rounding_mode;
+
+
+/* Private utility macros. */
+#define CL_HALF_EXP_MASK 0x7C00
+#define CL_HALF_MAX_FINITE_MAG 0x7BFF
+
+
+/*
+ * Utility to deal with values that overflow when converting to half precision.
+ */
+static inline cl_half cl_half_handle_overflow(cl_half_rounding_mode rounding_mode,
+ uint16_t sign)
+{
+ if (rounding_mode == CL_HALF_RTZ)
+ {
+ // Round overflow towards zero -> largest finite number (preserving sign)
+ return (sign << 15) | CL_HALF_MAX_FINITE_MAG;
+ }
+ else if (rounding_mode == CL_HALF_RTP && sign)
+ {
+ // Round negative overflow towards positive infinity -> most negative finite number
+ return (1 << 15) | CL_HALF_MAX_FINITE_MAG;
+ }
+ else if (rounding_mode == CL_HALF_RTN && !sign)
+ {
+ // Round positive overflow towards negative infinity -> largest finite number
+ return CL_HALF_MAX_FINITE_MAG;
+ }
+
+ // Overflow to infinity
+ return (sign << 15) | CL_HALF_EXP_MASK;
+}
+
+/*
+ * Utility to deal with values that underflow when converting to half precision.
+ */
+static inline cl_half cl_half_handle_underflow(cl_half_rounding_mode rounding_mode,
+ uint16_t sign)
+{
+ if (rounding_mode == CL_HALF_RTP && !sign)
+ {
+ // Round underflow towards positive infinity -> smallest positive value
+ return (sign << 15) | 1;
+ }
+ else if (rounding_mode == CL_HALF_RTN && sign)
+ {
+ // Round underflow towards negative infinity -> largest negative value
+ return (sign << 15) | 1;
+ }
+
+ // Flush to zero
+ return (sign << 15);
+}
+
+
+/**
+ * Convert a cl_float to a cl_half.
+ */
+static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode rounding_mode)
+{
+ // Type-punning to get direct access to underlying bits
+ union
+ {
+ cl_float f;
+ uint32_t i;
+ } f32;
+ f32.f = f;
+
+ // Extract sign bit
+ uint16_t sign = f32.i >> 31;
+
+ // Extract FP32 exponent and mantissa
+ uint32_t f_exp = (f32.i >> (CL_FLT_MANT_DIG - 1)) & 0xFF;
+ uint32_t f_mant = f32.i & ((1 << (CL_FLT_MANT_DIG - 1)) - 1);
+
+ // Remove FP32 exponent bias
+ int32_t exp = f_exp - CL_FLT_MAX_EXP + 1;
+
+ // Add FP16 exponent bias
+ uint16_t h_exp = (uint16_t)(exp + CL_HALF_MAX_EXP - 1);
+
+ // Position of the bit that will become the FP16 mantissa LSB
+ uint32_t lsb_pos = CL_FLT_MANT_DIG - CL_HALF_MANT_DIG;
+
+ // Check for NaN / infinity
+ if (f_exp == 0xFF)
+ {
+ if (f_mant)
+ {
+ // NaN -> propagate mantissa and silence it
+ uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
+ h_mant |= 0x200;
+ return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
+ }
+ else
+ {
+ // Infinity -> zero mantissa
+ return (sign << 15) | CL_HALF_EXP_MASK;
+ }
+ }
+
+ // Check for zero
+ if (!f_exp && !f_mant)
+ {
+ return (sign << 15);
+ }
+
+ // Check for overflow
+ if (exp >= CL_HALF_MAX_EXP)
+ {
+ return cl_half_handle_overflow(rounding_mode, sign);
+ }
+
+ // Check for underflow
+ if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
+ {
+ return cl_half_handle_underflow(rounding_mode, sign);
+ }
+
+ // Check for value that will become denormal
+ if (exp < -14)
+ {
+ // Denormal -> include the implicit 1 from the FP32 mantissa
+ h_exp = 0;
+ f_mant |= 1 << (CL_FLT_MANT_DIG - 1);
+
+ // Mantissa shift amount depends on exponent
+ lsb_pos = -exp + (CL_FLT_MANT_DIG - 25);
+ }
+
+ // Generate FP16 mantissa by shifting FP32 mantissa
+ uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
+
+ // Check whether we need to round
+ uint32_t halfway = 1 << (lsb_pos - 1);
+ uint32_t mask = (halfway << 1) - 1;
+ switch (rounding_mode)
+ {
+ case CL_HALF_RTE:
+ if ((f_mant & mask) > halfway)
+ {
+ // More than halfway -> round up
+ h_mant += 1;
+ }
+ else if ((f_mant & mask) == halfway)
+ {
+ // Exactly halfway -> round to nearest even
+ if (h_mant & 0x1)
+ h_mant += 1;
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_icd.h
^
|
@@ -0,0 +1,1294 @@
+/*******************************************************************************
+ * Copyright (c) 2019-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef OPENCL_CL_ICD_H
+#define OPENCL_CL_ICD_H
+
+#include <CL/cl.h>
+#include <CL/cl_egl.h>
+#include <CL/cl_ext.h>
+#include <CL/cl_gl.h>
+
+#if defined(_WIN32)
+#include <CL/cl_d3d11.h>
+#include <CL/cl_d3d10.h>
+#include <CL/cl_dx9_media_sharing.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This file contains pointer type definitions for each of the CL API calls as
+ * well as a type definition for the dispatch table used by the Khronos ICD
+ * loader (see cl_khr_icd extension specification for background).
+ */
+
+/* API function pointer definitions */
+
+// Platform APIs
+typedef cl_int(CL_API_CALL *cl_api_clGetPlatformIDs)(
+ cl_uint num_entries, cl_platform_id *platforms,
+ cl_uint *num_platforms) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clGetPlatformInfo)(
+ cl_platform_id platform, cl_platform_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+// Device APIs
+typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDs)(
+ cl_platform_id platform, cl_device_type device_type, cl_uint num_entries,
+ cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clGetDeviceInfo)(
+ cl_device_id device, cl_device_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef cl_int(CL_API_CALL *cl_api_clCreateSubDevices)(
+ cl_device_id in_device,
+ const cl_device_partition_property *partition_properties,
+ cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices);
+
+typedef cl_int(CL_API_CALL *cl_api_clRetainDevice)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
+
+typedef cl_int(CL_API_CALL *cl_api_clReleaseDevice)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clCreateSubDevices;
+typedef void *cl_api_clRetainDevice;
+typedef void *cl_api_clReleaseDevice;
+
+#endif
+
+// Context APIs
+typedef cl_context(CL_API_CALL *cl_api_clCreateContext)(
+ const cl_context_properties *properties, cl_uint num_devices,
+ const cl_device_id *devices,
+ void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
+ void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_context(CL_API_CALL *cl_api_clCreateContextFromType)(
+ const cl_context_properties *properties, cl_device_type device_type,
+ void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
+ void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clRetainContext)(
+ cl_context context) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clReleaseContext)(
+ cl_context context) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clGetContextInfo)(
+ cl_context context, cl_context_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+// Command Queue APIs
+typedef cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueue)(
+ cl_context context, cl_device_id device,
+ cl_command_queue_properties properties,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_0
+
+typedef
+cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueueWithProperties)(
+ cl_context /* context */, cl_device_id /* device */,
+ const cl_queue_properties * /* properties */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
+
+#else
+
+typedef void *cl_api_clCreateCommandQueueWithProperties;
+
+#endif
+
+typedef cl_int(CL_API_CALL *cl_api_clRetainCommandQueue)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clReleaseCommandQueue)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clGetCommandQueueInfo)(
+ cl_command_queue command_queue, cl_command_queue_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+// Memory Object APIs
+typedef cl_mem(CL_API_CALL *cl_api_clCreateBuffer)(
+ cl_context context, cl_mem_flags flags, size_t size, void *host_ptr,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef cl_mem(CL_API_CALL *cl_api_clCreateImage)(
+ cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
+ const cl_image_desc *image_desc, void *host_ptr,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clCreateImage;
+
+#endif
+
+#ifdef CL_VERSION_3_0
+
+typedef cl_mem(CL_API_CALL *cl_api_clCreateBufferWithProperties)(
+ cl_context context, const cl_mem_properties *properties, cl_mem_flags flags,
+ size_t size, void *host_ptr,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_3_0;
+
+typedef cl_mem(CL_API_CALL *cl_api_clCreateImageWithProperties)(
+ cl_context context, const cl_mem_properties *properties, cl_mem_flags flags,
+ const cl_image_format *image_format, const cl_image_desc *image_desc,
+ void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_3_0;
+
+typedef cl_int(CL_API_CALL* cl_api_clSetContextDestructorCallback)(
+ cl_context context,
+ void(CL_CALLBACK* pfn_notify)(cl_context context, void* user_data),
+ void* user_data) CL_API_SUFFIX__VERSION_3_0;
+
+#else
+
+typedef void *cl_api_clCreateBufferWithProperties;
+typedef void *cl_api_clCreateImageWithProperties;
+typedef void *cl_api_clSetContextDestructorCallback;
+
+#endif
+
+typedef cl_int(CL_API_CALL *cl_api_clRetainMemObject)(
+ cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clReleaseMemObject)(
+ cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clGetSupportedImageFormats)(
+ cl_context context, cl_mem_flags flags, cl_mem_object_type image_type,
+ cl_uint num_entries, cl_image_format *image_formats,
+ cl_uint *num_image_formats) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clGetMemObjectInfo)(
+ cl_mem memobj, cl_mem_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef cl_int(CL_API_CALL *cl_api_clGetImageInfo)(
+ cl_mem image, cl_image_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_0
+
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_layer.h
^
|
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * OpenCL is a trademark of Apple Inc. used under license by Khronos.
+ */
+
+#ifndef OPENCL_CL_LAYER_H
+#define OPENCL_CL_LAYER_H
+
+#include <CL/cl_icd.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef cl_uint cl_layer_info;
+typedef cl_uint cl_layer_api_version;
+#define CL_LAYER_API_VERSION 0x4240
+#define CL_LAYER_API_VERSION_100 100
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetLayerInfo(cl_layer_info param_name,
+ size_t param_value_size,
+ void *param_value,
+ size_t *param_value_size_ret);
+
+typedef cl_int
+(CL_API_CALL *pfn_clGetLayerInfo)(cl_layer_info param_name,
+ size_t param_value_size,
+ void *param_value,
+ size_t *param_value_size_ret);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clInitLayer(cl_uint num_entries,
+ const cl_icd_dispatch *target_dispatch,
+ cl_uint *num_entries_ret,
+ const cl_icd_dispatch **layer_dispatch_ret);
+
+typedef cl_int
+(CL_API_CALL *pfn_clInitLayer)(cl_uint num_entries,
+ const cl_icd_dispatch *target_dispatch,
+ cl_uint *num_entries_ret,
+ const cl_icd_dispatch **layer_dispatch_ret);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OPENCL_CL_LAYER_H */
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_platform.h
^
|
@@ -1,53 +1,48 @@
-/**********************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-
-/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
#ifndef __CL_PLATFORM_H
#define __CL_PLATFORM_H
-#ifdef __APPLE__
- /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */
- #include <AvailabilityMacros.h>
-#endif
+#include <CL/cl_version.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_WIN32)
- #define CL_API_ENTRY
- #define CL_API_CALL __stdcall
- #define CL_CALLBACK __stdcall
+ #if !defined(CL_API_ENTRY)
+ #define CL_API_ENTRY
+ #endif
+ #if !defined(CL_API_CALL)
+ #define CL_API_CALL __stdcall
+ #endif
+ #if !defined(CL_CALLBACK)
+ #define CL_CALLBACK __stdcall
+ #endif
#else
- #define CL_API_ENTRY
- #define CL_API_CALL
- #define CL_CALLBACK
+ #if !defined(CL_API_ENTRY)
+ #define CL_API_ENTRY
+ #endif
+ #if !defined(CL_API_CALL)
+ #define CL_API_CALL
+ #endif
+ #if !defined(CL_CALLBACK)
+ #define CL_CALLBACK
+ #endif
#endif
/*
@@ -58,143 +53,94 @@
* deprecation but is deprecated in versions later than 1.1.
*/
-#ifdef __APPLE__
- #define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
- #define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
- #define CL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define GCL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
-
- #ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
- #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
- #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
- #else
- #warning This path should never happen outside of internal operating system development. AvailabilityMacros do not function correctly here!
- #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- #endif
+#ifndef CL_API_SUFFIX_USER
+#define CL_API_SUFFIX_USER
+#endif
+
+#ifndef CL_API_PREFIX_USER
+#define CL_API_PREFIX_USER
+#endif
+
+#define CL_API_SUFFIX_COMMON CL_API_SUFFIX_USER
+#define CL_API_PREFIX_COMMON CL_API_PREFIX_USER
+
+#define CL_API_SUFFIX__VERSION_1_0 CL_API_SUFFIX_COMMON
+#define CL_API_SUFFIX__VERSION_1_1 CL_API_SUFFIX_COMMON
+#define CL_API_SUFFIX__VERSION_1_2 CL_API_SUFFIX_COMMON
+#define CL_API_SUFFIX__VERSION_2_0 CL_API_SUFFIX_COMMON
+#define CL_API_SUFFIX__VERSION_2_1 CL_API_SUFFIX_COMMON
+#define CL_API_SUFFIX__VERSION_2_2 CL_API_SUFFIX_COMMON
+#define CL_API_SUFFIX__VERSION_3_0 CL_API_SUFFIX_COMMON
+#define CL_API_SUFFIX__EXPERIMENTAL CL_API_SUFFIX_COMMON
+
+
+#ifdef __GNUC__
+ #define CL_API_SUFFIX_DEPRECATED __attribute__((deprecated))
+ #define CL_API_PREFIX_DEPRECATED
+#elif defined(_WIN32)
+ #define CL_API_SUFFIX_DEPRECATED
+ #define CL_API_PREFIX_DEPRECATED __declspec(deprecated)
#else
- #define CL_EXTENSION_WEAK_LINK
- #define CL_API_SUFFIX__VERSION_1_0
- #define CL_EXT_SUFFIX__VERSION_1_0
- #define CL_API_SUFFIX__VERSION_1_1
- #define CL_EXT_SUFFIX__VERSION_1_1
- #define CL_API_SUFFIX__VERSION_1_2
- #define CL_EXT_SUFFIX__VERSION_1_2
- #define CL_API_SUFFIX__VERSION_2_0
- #define CL_EXT_SUFFIX__VERSION_2_0
- #define CL_API_SUFFIX__VERSION_2_1
- #define CL_EXT_SUFFIX__VERSION_2_1
- #define CL_API_SUFFIX__VERSION_2_2
- #define CL_EXT_SUFFIX__VERSION_2_2
-
- #ifdef __GNUC__
- #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED __attribute__((deprecated))
- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
- #endif
-
- #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated))
- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
- #endif
-
- #ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
- #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED __attribute__((deprecated))
- #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
- #endif
-
- #ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
- #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED __attribute__((deprecated))
- #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
- #endif
-
- #ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS
- #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED __attribute__((deprecated))
- #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
- #endif
- #elif defined(_WIN32)
- #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
- #else
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED __declspec(deprecated)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_va_api_media_sharing_intel.h
^
|
@@ -1,54 +1,18 @@
-/**********************************************************************************
- * Copyright (c) 2008-2016 The Khronos Group Inc.
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- **********************************************************************************/
-/*****************************************************************************\
-
-Copyright (c) 2013-2016 Intel Corporation All Rights Reserved.
-
-THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
-MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-File Name: cl_va_api_media_sharing_intel.h
-
-Abstract:
-
-Notes:
-
-\*****************************************************************************/
-
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
#ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
#define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
@@ -61,6 +25,33 @@
extern "C" {
#endif
+/***************************************************************
+* cl_intel_sharing_format_query_va_api
+***************************************************************/
+#define cl_intel_sharing_format_query_va_api 1
+
+/* when cl_intel_va_api_media_sharing is supported */
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetSupportedVA_APIMediaSurfaceFormatsINTEL(
+ cl_context context,
+ cl_mem_flags flags,
+ cl_mem_object_type image_type,
+ cl_uint plane,
+ cl_uint num_entries,
+ VAImageFormat* va_api_formats,
+ cl_uint* num_surface_formats) ;
+
+typedef cl_int (CL_API_CALL *
+clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ cl_mem_object_type image_type,
+ cl_uint plane,
+ cl_uint num_entries,
+ VAImageFormat* va_api_formats,
+ cl_uint* num_surface_formats) ;
+
/******************************************
* cl_intel_va_api_media_sharing extension *
*******************************************/
@@ -98,71 +89,71 @@
extern CL_API_ENTRY cl_int CL_API_CALL
clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
- cl_platform_id /* platform */,
- cl_va_api_device_source_intel /* media_adapter_type */,
- void* /* media_adapter */,
- cl_va_api_device_set_intel /* media_adapter_set */,
- cl_uint /* num_entries */,
- cl_device_id* /* devices */,
- cl_uint* /* num_devices */) CL_EXT_SUFFIX__VERSION_1_2;
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
- cl_platform_id /* platform */,
- cl_va_api_device_source_intel /* media_adapter_type */,
- void* /* media_adapter */,
- cl_va_api_device_set_intel /* media_adapter_set */,
- cl_uint /* num_entries */,
- cl_device_id* /* devices */,
- cl_uint* /* num_devices */) CL_EXT_SUFFIX__VERSION_1_2;
+ cl_platform_id platform,
+ cl_va_api_device_source_intel media_adapter_type,
+ void* media_adapter,
+ cl_va_api_device_set_intel media_adapter_set,
+ cl_uint num_entries,
+ cl_device_id* devices,
+ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
+
+typedef cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
+ cl_platform_id platform,
+ cl_va_api_device_source_intel media_adapter_type,
+ void* media_adapter,
+ cl_va_api_device_set_intel media_adapter_set,
+ cl_uint num_entries,
+ cl_device_id* devices,
+ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromVA_APIMediaSurfaceINTEL(
- cl_context /* context */,
- cl_mem_flags /* flags */,
- VASurfaceID* /* surface */,
- cl_uint /* plane */,
- cl_int* /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2;
-
-typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
- cl_context /* context */,
- cl_mem_flags /* flags */,
- VASurfaceID* /* surface */,
- cl_uint /* plane */,
- cl_int* /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2;
+ cl_context context,
+ cl_mem_flags flags,
+ VASurfaceID* surface,
+ cl_uint plane,
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+typedef cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ VASurfaceID* surface,
+ cl_uint plane,
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireVA_APIMediaSurfacesINTEL(
- cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem* /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event* /* event_wait_list */,
- cl_event* /* event */) CL_EXT_SUFFIX__VERSION_1_2;
-
-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
- cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
- const cl_mem* /* mem_objects */,
- cl_uint /* num_events_in_wait_list */,
- const cl_event* /* event_wait_list */,
- cl_event* /* event */) CL_EXT_SUFFIX__VERSION_1_2;
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
+
+typedef cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseVA_APIMediaSurfacesINTEL(
- cl_command_queue /* command_queue */,
- cl_uint /* num_objects */,
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/cl_version.h
^
|
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2018-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef __CL_VERSION_H
+#define __CL_VERSION_H
+
+/* Detect which version to target */
+#if !defined(CL_TARGET_OPENCL_VERSION)
+#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
+#define CL_TARGET_OPENCL_VERSION 300
+#endif
+#if CL_TARGET_OPENCL_VERSION != 100 && \
+ CL_TARGET_OPENCL_VERSION != 110 && \
+ CL_TARGET_OPENCL_VERSION != 120 && \
+ CL_TARGET_OPENCL_VERSION != 200 && \
+ CL_TARGET_OPENCL_VERSION != 210 && \
+ CL_TARGET_OPENCL_VERSION != 220 && \
+ CL_TARGET_OPENCL_VERSION != 300
+#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220, 300). Defaulting to 300 (OpenCL 3.0)")
+#undef CL_TARGET_OPENCL_VERSION
+#define CL_TARGET_OPENCL_VERSION 300
+#endif
+
+
+/* OpenCL Version */
+#if CL_TARGET_OPENCL_VERSION >= 300 && !defined(CL_VERSION_3_0)
+#define CL_VERSION_3_0 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 220 && !defined(CL_VERSION_2_2)
+#define CL_VERSION_2_2 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 210 && !defined(CL_VERSION_2_1)
+#define CL_VERSION_2_1 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 200 && !defined(CL_VERSION_2_0)
+#define CL_VERSION_2_0 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 120 && !defined(CL_VERSION_1_2)
+#define CL_VERSION_1_2 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 110 && !defined(CL_VERSION_1_1)
+#define CL_VERSION_1_1 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 100 && !defined(CL_VERSION_1_0)
+#define CL_VERSION_1_0 1
+#endif
+
+/* Allow deprecated APIs for older OpenCL versions. */
+#if CL_TARGET_OPENCL_VERSION <= 220 && !defined(CL_USE_DEPRECATED_OPENCL_2_2_APIS)
+#define CL_USE_DEPRECATED_OPENCL_2_2_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 210 && !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS)
+#define CL_USE_DEPRECATED_OPENCL_2_1_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS)
+#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
+#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
+#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS)
+#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
+#endif
+
+#endif /* __CL_VERSION_H */
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/CL/opencl.h
^
|
@@ -1,33 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2008-2015 The Khronos Group Inc.
+ * Copyright (c) 2008-2021 The Khronos Group Inc.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
- * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
- * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
- * https://www.khronos.org/registry/
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
******************************************************************************/
-/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
-
#ifndef __OPENCL_H
#define __OPENCL_H
@@ -35,25 +21,12 @@
extern "C" {
#endif
-#ifdef __APPLE__
-
-#include <OpenCL/cl.h>
-#include <OpenCL/cl_gl.h>
-#include <OpenCL/cl_gl_ext.h>
-#include <OpenCL/cl_ext.h>
-
-#else
-
#include <CL/cl.h>
#include <CL/cl_gl.h>
-#include <CL/cl_gl_ext.h>
#include <CL/cl_ext.h>
-#endif
-
#ifdef __cplusplus
}
#endif
#endif /* __OPENCL_H */
-
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/EGL/egl.h
^
|
@@ -14,7 +14,7 @@
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
-** Khronos $Git commit SHA1: 5a9a7e3fcb $ on $Git commit date: 2020-08-24 11:05:32 -0700 $
+** Khronos $Git commit SHA1: 8c62b915dd $ on $Git commit date: 2021-11-05 23:32:01 -0400 $
*/
#include <EGL/eglplatform.h>
@@ -23,7 +23,7 @@
#define EGL_EGL_PROTOTYPES 1
#endif
-/* Generated on date 20201001 */
+/* Generated on date 20211116 */
/* Generated C header for:
* API: egl
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/EGL/eglext.h
^
|
@@ -14,12 +14,12 @@
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
-** Khronos $Git commit SHA1: 5a9a7e3fcb $ on $Git commit date: 2020-08-24 11:05:32 -0700 $
+** Khronos $Git commit SHA1: 330c97a53f $ on $Git commit date: 2022-03-22 03:57:27 -0500 $
*/
#include <EGL/eglplatform.h>
-#define EGL_EGLEXT_VERSION 20201001
+#define EGL_EGLEXT_VERSION 20220323
/* Generated C header for:
* API: egl
@@ -574,6 +574,14 @@
#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */
+#ifndef EGL_ANGLE_sync_control_rate
+#define EGL_ANGLE_sync_control_rate 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMSCRATEANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *numerator, EGLint *denominator);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglGetMscRateANGLE (EGLDisplay dpy, EGLSurface surface, EGLint *numerator, EGLint *denominator);
+#endif
+#endif /* EGL_ANGLE_sync_control_rate */
+
#ifndef EGL_ANGLE_window_fixed_size
#define EGL_ANGLE_window_fixed_size 1
#define EGL_FIXED_SIZE_ANGLE 0x3201
@@ -643,6 +651,11 @@
#endif
#endif /* EGL_EXT_compositor */
+#ifndef EGL_EXT_config_select_group
+#define EGL_EXT_config_select_group 1
+#define EGL_CONFIG_SELECT_GROUP_EXT 0x34C0
+#endif /* EGL_EXT_config_select_group */
+
#ifndef EGL_EXT_create_context_robustness
#define EGL_EXT_create_context_robustness 1
#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
@@ -675,6 +688,11 @@
#define EGL_DRM_MASTER_FD_EXT 0x333C
#endif /* EGL_EXT_device_drm */
+#ifndef EGL_EXT_device_drm_render_node
+#define EGL_EXT_device_drm_render_node 1
+#define EGL_DRM_RENDER_NODE_FILE_EXT 0x3377
+#endif /* EGL_EXT_device_drm_render_node */
+
#ifndef EGL_EXT_device_enumeration
#define EGL_EXT_device_enumeration 1
#endif /* EGL_EXT_device_enumeration */
@@ -682,8 +700,20 @@
#ifndef EGL_EXT_device_openwf
#define EGL_EXT_device_openwf 1
#define EGL_OPENWF_DEVICE_ID_EXT 0x3237
+#define EGL_OPENWF_DEVICE_EXT 0x333D
#endif /* EGL_EXT_device_openwf */
+#ifndef EGL_EXT_device_persistent_id
+#define EGL_EXT_device_persistent_id 1
+#define EGL_DEVICE_UUID_EXT 0x335C
+#define EGL_DRIVER_UUID_EXT 0x335D
+#define EGL_DRIVER_NAME_EXT 0x335E
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEBINARYEXTPROC) (EGLDeviceEXT device, EGLint name, EGLint max_size, void *value, EGLint *size);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceBinaryEXT (EGLDeviceEXT device, EGLint name, EGLint max_size, void *value, EGLint *size);
+#endif
+#endif /* EGL_EXT_device_persistent_id */
+
#ifndef EGL_EXT_device_query
#define EGL_EXT_device_query 1
#endif /* EGL_EXT_device_query */
@@ -875,6 +905,11 @@
#define EGL_PLATFORM_XCB_SCREEN_EXT 0x31DE
#endif /* EGL_EXT_platform_xcb */
+#ifndef EGL_EXT_present_opaque
+#define EGL_EXT_present_opaque 1
+#define EGL_PRESENT_OPAQUE_EXT 0x31DF
+#endif /* EGL_EXT_present_opaque */
+
#ifndef EGL_EXT_protected_content
#define EGL_EXT_protected_content 1
#define EGL_PROTECTED_CONTENT_EXT 0x32C0
@@ -913,6 +948,31 @@
#define EGL_METADATA_SCALING_EXT 50000
#endif /* EGL_EXT_surface_SMPTE2086_metadata */
+#ifndef EGL_EXT_surface_compression
+#define EGL_EXT_surface_compression 1
+#define EGL_SURFACE_COMPRESSION_EXT 0x34B0
+#define EGL_SURFACE_COMPRESSION_PLANE1_EXT 0x328E
+#define EGL_SURFACE_COMPRESSION_PLANE2_EXT 0x328F
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_NONE_EXT 0x34B1
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_DEFAULT_EXT 0x34B2
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_1BPC_EXT 0x34B4
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_2BPC_EXT 0x34B5
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_3BPC_EXT 0x34B6
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_4BPC_EXT 0x34B7
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_5BPC_EXT 0x34B8
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_6BPC_EXT 0x34B9
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_7BPC_EXT 0x34BA
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_8BPC_EXT 0x34BB
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_9BPC_EXT 0x34BC
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_10BPC_EXT 0x34BD
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_11BPC_EXT 0x34BE
+#define EGL_SURFACE_COMPRESSION_FIXED_RATE_12BPC_EXT 0x34BF
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSUPPORTEDCOMPRESSIONRATESEXTPROC) (EGLDisplay dpy, EGLConfig config, const EGLAttrib *attrib_list, EGLint *rates, EGLint rate_size, EGLint *num_rates);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySupportedCompressionRatesEXT (EGLDisplay dpy, EGLConfig config, const EGLAttrib *attrib_list, EGLint *rates, EGLint rate_size, EGLint *num_rates);
+#endif
+#endif /* EGL_EXT_surface_compression */
+
#ifndef EGL_EXT_swap_buffers_with_damage
#define EGL_EXT_swap_buffers_with_damage 1
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
@@ -1147,12 +1207,12 @@
#define EGL_STREAM_IMAGE_ADD_NV 0x3374
#define EGL_STREAM_IMAGE_REMOVE_NV 0x3375
#define EGL_STREAM_IMAGE_AVAILABLE_NV 0x3376
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, EGLuint64KHR *modifiers, EGLAttrib *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, const EGLuint64KHR *modifiers, const EGLAttrib *attrib_list);
typedef EGLint (EGLAPIENTRYP PFNEGLQUERYSTREAMCONSUMEREVENTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMACQUIREIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMRELEASEIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync);
#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglStreamImageConsumerConnectNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, EGLuint64KHR *modifiers, EGLAttrib *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamImageConsumerConnectNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, const EGLuint64KHR *modifiers, const EGLAttrib *attrib_list);
EGLAPI EGLint EGLAPIENTRY eglQueryStreamConsumerEventNV (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux);
EGLAPI EGLBoolean EGLAPIENTRY eglStreamAcquireImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync);
EGLAPI EGLBoolean EGLAPIENTRY eglStreamReleaseImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync);
@@ -1412,8 +1472,6 @@
#endif
#endif /* EGL_WL_create_wayland_buffer_from_image */
-#include <EGL/eglmesaext.h>
-
#ifdef __cplusplus
}
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/EGL/eglmesaext.h
^
|
@@ -1,6 +1,6 @@
/**************************************************************************
*
- * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2008 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -34,138 +34,21 @@
#include <EGL/eglplatform.h>
-/* EGL_MESA_screen extension >>> PRELIMINARY <<< */
-#ifndef EGL_MESA_screen_surface
-#define EGL_MESA_screen_surface 1
-
-#define EGL_BAD_SCREEN_MESA 0x4000
-#define EGL_BAD_MODE_MESA 0x4001
-#define EGL_SCREEN_COUNT_MESA 0x4002
-#define EGL_SCREEN_POSITION_MESA 0x4003
-#define EGL_SCREEN_POSITION_GRANULARITY_MESA 0x4004
-#define EGL_MODE_ID_MESA 0x4005
-#define EGL_REFRESH_RATE_MESA 0x4006
-#define EGL_OPTIMAL_MESA 0x4007
-#define EGL_INTERLACED_MESA 0x4008
-#define EGL_SCREEN_BIT_MESA 0x08
-
-typedef khronos_uint32_t EGLScreenMESA;
-typedef khronos_uint32_t EGLModeMESA;
-
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens);
-EGLAPI EGLSurface EGLAPIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglShowScreenSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode);
-EGLAPI EGLBoolean EGLAPIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode);
-EGLAPI const char * EGLAPIENTRY eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode);
-#endif /* EGL_EGLEXT_PROTOTYPES */
-
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSEMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMODESMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGetModeATTRIBMESA) (EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSCRREENSMESA) (EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens);
-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESCREENSURFACEMESA) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSHOWSCREENSURFACEMESA) (EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSCREENPOSIITONMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENSURFACEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode);
-typedef const char * (EGLAPIENTRYP PFNEGLQUERYMODESTRINGMESA) (EGLDisplay dpy, EGLModeMESA mode);
-
-#endif /* EGL_MESA_screen_surface */
-
-#ifndef EGL_MESA_copy_context
-#define EGL_MESA_copy_context 1
-
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask);
-#endif /* EGL_EGLEXT_PROTOTYPES */
-
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask);
-
-#endif /* EGL_MESA_copy_context */
-
-#ifndef EGL_MESA_drm_display
-#define EGL_MESA_drm_display 1
-
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd);
-#endif /* EGL_EGLEXT_PROTOTYPES */
-
-typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd);
-
-#endif /* EGL_MESA_drm_display */
-
-#ifdef EGL_MESA_drm_image
-/* Mesa's extension to EGL_MESA_drm_image... */
-#ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA
-#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004
-#endif
-#endif
-
-#ifndef EGL_WL_bind_wayland_display
-#define EGL_WL_bind_wayland_display 1
-
-#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */
-#define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */
-
-#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB /* eglQueryWaylandBufferWL attribute */
-
-#define EGL_TEXTURE_Y_U_V_WL 0x31D7
-#define EGL_TEXTURE_Y_UV_WL 0x31D8
-#define EGL_TEXTURE_Y_XUXV_WL 0x31D9
-#define EGL_TEXTURE_EXTERNAL_WL 0x31DA
-
-struct wl_display;
-struct wl_resource;
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
-EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
-#endif
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
-
-#endif
-
-#ifndef EGL_WL_create_wayland_buffer_from_image
-#define EGL_WL_create_wayland_buffer_from_image 1
-
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image);
-#endif
-typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image);
-
-#endif
-
-#ifndef EGL_NOK_swap_region
-#define EGL_NOK_swap_region 1
-
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
-#endif
-
+/* remnant of EGL_NOK_swap_region kept for compatibility because of a non-standard type name */
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
-#endif
-
-#ifndef EGL_NOK_texture_from_pixmap
-#define EGL_NOK_texture_from_pixmap 1
-#define EGL_Y_INVERTED_NOK 0x307F
-#endif /* EGL_NOK_texture_from_pixmap */
-
-#ifndef EGL_ANDROID_image_native_buffer
-#define EGL_ANDROID_image_native_buffer 1
-#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */
+#ifndef EGL_MESA_configless_context
+#define EGL_MESA_configless_context 1
+#define EGL_NO_CONFIG_MESA EGL_CAST(EGLConfig,0)
#endif
+#ifndef EGL_MESA_drm_image_formats
+#define EGL_MESA_drm_image_formats 1
+#define EGL_DRM_BUFFER_FORMAT_ARGB2101010_MESA 0x3290
+#define EGL_DRM_BUFFER_FORMAT_ARGB1555_MESA 0x3291
+#define EGL_DRM_BUFFER_FORMAT_RGB565_MESA 0x3292
+#endif /* EGL_MESA_drm_image_formats */
+
#ifdef __cplusplus
}
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/EGL/eglplatform.h
^
|
@@ -27,10 +27,6 @@
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
*/
-#ifndef LIBHYBRIS_WANTS_MESA_X11_HEADERS
-#define EGL_NO_X11
-#endif
-
#ifndef EGLAPI
#define EGLAPI KHRONOS_APICALL
#endif
@@ -107,13 +103,7 @@
typedef intptr_t EGLNativePixmapType;
typedef intptr_t EGLNativeWindowType;
-#elif defined(__unix__) && defined(EGL_NO_X11)
-
-typedef void *EGLNativeDisplayType;
-typedef khronos_uintptr_t EGLNativePixmapType;
-typedef khronos_uintptr_t EGLNativeWindowType;
-
-#elif defined(__unix__) || defined(USE_X11)
+#elif defined(USE_X11)
/* X11 (tentative) */
#include <X11/Xlib.h>
@@ -123,6 +113,12 @@
typedef Pixmap EGLNativePixmapType;
typedef Window EGLNativeWindowType;
+#elif defined(__unix__)
+
+typedef void *EGLNativeDisplayType;
+typedef khronos_uintptr_t EGLNativePixmapType;
+typedef khronos_uintptr_t EGLNativeWindowType;
+
#elif defined(__APPLE__)
typedef int EGLNativeDisplayType;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GL/gl.h
^
|
@@ -1,6 +1,5 @@
/*
* Mesa 3-D graphics library
- * Version: 7.6
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
@@ -18,49 +17,32 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __gl_h_
#define __gl_h_
-#if defined(USE_MGL_NAMESPACE)
-#include "gl_mangle.h"
-#endif
-
-
/**********************************************************************
- * Begin system-specific stuff. Do not do any of this when building
- * for SciTech SNAP, as this is all done before this header file is
- * included.
+ * Begin system-specific stuff.
*/
-#if !defined(__SCITECH_SNAP__)
-
-#if defined(__BEOS__)
-#include <stdlib.h> /* to get some BeOS-isms */
-#endif
-
-#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
-#define OPENSTEP
-#endif
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
#define __WIN32__
#endif
-#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
+#if defined(__WIN32__) && !defined(__CYGWIN__)
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
-# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
-# define GLAPI __declspec(dllimport)
-# else /* for use with static link lib build of Win32 edition only */
+# else
# define GLAPI extern
-# endif /* _STATIC_MESA support */
+# endif
# if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
-# define GLAPIENTRY
+# define GLAPIENTRY
# else
# define GLAPIENTRY __stdcall
# endif
@@ -72,10 +54,6 @@
# define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */
-#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
-# define PRAGMA_EXPORT_SUPPORTED 1
-#endif
-
/*
* WINDOWS: Include windows.h here to define APIENTRY.
* It is also useful when applications include this file by
@@ -91,10 +69,6 @@
#include <windows.h>
#endif
-#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
-#pragma import on
-#endif
-
#ifndef GLAPI
#define GLAPI extern
#endif
@@ -116,15 +90,6 @@
#define GLAPIENTRYP GLAPIENTRY *
#endif
-#ifdef CENTERLINE_CLPP
-#define signed
-#endif
-
-#if defined(PRAGMA_EXPORT_SUPPORTED)
-#pragma export on
-#endif
-
-#endif /* !__SCITECH_SNAP__ */
/*
* End system-specific stuff.
**********************************************************************/
@@ -169,8 +134,8 @@
*/
/* Boolean values */
-#define GL_FALSE 0x0
-#define GL_TRUE 0x1
+#define GL_FALSE 0
+#define GL_TRUE 1
/* Data types */
#define GL_BYTE 0x1400
@@ -370,8 +335,8 @@
#define GL_BLEND 0x0BE2
#define GL_BLEND_SRC 0x0BE1
#define GL_BLEND_DST 0x0BE0
-#define GL_ZERO 0x0
-#define GL_ONE 0x1
+#define GL_ZERO 0
+#define GL_ONE 1
#define GL_SRC_COLOR 0x0300
#define GL_ONE_MINUS_SRC_COLOR 0x0301
#define GL_SRC_ALPHA 0x0302
@@ -461,7 +426,7 @@
#define GL_DECR 0x1E03
/* Buffers, Pixel Drawing/Reading */
-#define GL_NONE 0x0
+#define GL_NONE 0
#define GL_LEFT 0x0406
#define GL_RIGHT 0x0407
/*GL_FRONT 0x0404 */
@@ -689,7 +654,7 @@
#define GL_EXTENSIONS 0x1F03
/* Errors */
-#define GL_NO_ERROR 0x0
+#define GL_NO_ERROR 0
#define GL_INVALID_ENUM 0x0500
#define GL_INVALID_VALUE 0x0501
#define GL_INVALID_OPERATION 0x0502
@@ -718,7 +683,7 @@
#define GL_LIST_BIT 0x00020000
#define GL_TEXTURE_BIT 0x00040000
#define GL_SCISSOR_BIT 0x00080000
-#define GL_ALL_ATTRIB_BITS 0x000FFFFF
+#define GL_ALL_ATTRIB_BITS 0xFFFFFFFF
/* OpenGL 1.1 */
@@ -1736,8 +1701,6 @@
GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
-typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
@@ -1933,13 +1896,13 @@
GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
-GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble * m );
-GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat * m );
-GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble * m );
-GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat * m );
GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
@@ -2088,26 +2051,6 @@
-#if GL_ARB_shader_objects
-
-#ifndef GL_MESA_shader_debug
-#define GL_MESA_shader_debug 1
-
-#define GL_DEBUG_OBJECT_MESA 0x8759
-#define GL_DEBUG_PRINT_MESA 0x875A
-#define GL_DEBUG_ASSERT_MESA 0x875B
-
-GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void);
-GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
-GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
- GLsizei *length, GLcharARB *debugLog);
-GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
-
-#endif /* GL_MESA_shader_debug */
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GL/glcorearb.h
^
|
@@ -0,0 +1,5918 @@
+#ifndef __gl_glcorearb_h_
+#define __gl_glcorearb_h_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2013-2018 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+** https://github.com/KhronosGroup/OpenGL-Registry
+*/
+
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
+#include <windows.h>
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+/* glcorearb.h is for use with OpenGL core profile implementations.
+** It should should be placed in the same directory as gl.h and
+** included as <GL/glcorearb.h>.
+**
+** glcorearb.h includes only APIs in the latest OpenGL core profile
+** implementation together with APIs in newer ARB extensions which
+** can be supported by the core profile. It does not, and never will
+** include functionality removed from the core profile, such as
+** fixed-function vertex and fragment processing.
+**
+** Do not #include both <GL/glcorearb.h> and either of <GL/gl.h> or
+** <GL/glext.h> in the same source file.
+*/
+
+/* Generated C header for:
+ * API: gl
+ * Profile: core
+ * Versions considered: .*
+ * Versions emitted: .*
+ * Default extensions included: glcore
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
+
+#ifndef GL_VERSION_1_0
+#define GL_VERSION_1_0 1
+typedef void GLvoid;
+typedef unsigned int GLenum;
+#include <KHR/khrplatform.h>
+typedef khronos_float_t GLfloat;
+typedef int GLint;
+typedef int GLsizei;
+typedef unsigned int GLbitfield;
+typedef double GLdouble;
+typedef unsigned int GLuint;
+typedef unsigned char GLboolean;
+typedef khronos_uint8_t GLubyte;
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_COLOR_BUFFER_BIT 0x00004000
+#define GL_FALSE 0
+#define GL_TRUE 1
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+#define GL_QUADS 0x0007
+#define GL_NEVER 0x0200
+#define GL_LESS 0x0201
+#define GL_EQUAL 0x0202
+#define GL_LEQUAL 0x0203
+#define GL_GREATER 0x0204
+#define GL_NOTEQUAL 0x0205
+#define GL_GEQUAL 0x0206
+#define GL_ALWAYS 0x0207
+#define GL_ZERO 0
+#define GL_ONE 1
+#define GL_SRC_COLOR 0x0300
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_SRC_ALPHA 0x0302
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_DST_ALPHA 0x0304
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+#define GL_DST_COLOR 0x0306
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_SRC_ALPHA_SATURATE 0x0308
+#define GL_NONE 0
+#define GL_FRONT_LEFT 0x0400
+#define GL_FRONT_RIGHT 0x0401
+#define GL_BACK_LEFT 0x0402
+#define GL_BACK_RIGHT 0x0403
+#define GL_FRONT 0x0404
+#define GL_BACK 0x0405
+#define GL_LEFT 0x0406
+#define GL_RIGHT 0x0407
+#define GL_FRONT_AND_BACK 0x0408
+#define GL_NO_ERROR 0
+#define GL_INVALID_ENUM 0x0500
+#define GL_INVALID_VALUE 0x0501
+#define GL_INVALID_OPERATION 0x0502
+#define GL_OUT_OF_MEMORY 0x0505
+#define GL_CW 0x0900
+#define GL_CCW 0x0901
+#define GL_POINT_SIZE 0x0B11
+#define GL_POINT_SIZE_RANGE 0x0B12
+#define GL_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_LINE_SMOOTH 0x0B20
+#define GL_LINE_WIDTH 0x0B21
+#define GL_LINE_WIDTH_RANGE 0x0B22
+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_POLYGON_MODE 0x0B40
+#define GL_POLYGON_SMOOTH 0x0B41
+#define GL_CULL_FACE 0x0B44
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_FRONT_FACE 0x0B46
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_TEST 0x0B71
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_STENCIL_TEST 0x0B90
+#define GL_STENCIL_CLEAR_VALUE 0x0B91
+#define GL_STENCIL_FUNC 0x0B92
+#define GL_STENCIL_VALUE_MASK 0x0B93
+#define GL_STENCIL_FAIL 0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define GL_STENCIL_REF 0x0B97
+#define GL_STENCIL_WRITEMASK 0x0B98
+#define GL_VIEWPORT 0x0BA2
+#define GL_DITHER 0x0BD0
+#define GL_BLEND_DST 0x0BE0
+#define GL_BLEND_SRC 0x0BE1
+#define GL_BLEND 0x0BE2
+#define GL_LOGIC_OP_MODE 0x0BF0
+#define GL_DRAW_BUFFER 0x0C01
+#define GL_READ_BUFFER 0x0C02
+#define GL_SCISSOR_BOX 0x0C10
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_COLOR_CLEAR_VALUE 0x0C22
+#define GL_COLOR_WRITEMASK 0x0C23
+#define GL_DOUBLEBUFFER 0x0C32
+#define GL_STEREO 0x0C33
+#define GL_LINE_SMOOTH_HINT 0x0C52
+#define GL_POLYGON_SMOOTH_HINT 0x0C53
+#define GL_UNPACK_SWAP_BYTES 0x0CF0
+#define GL_UNPACK_LSB_FIRST 0x0CF1
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_SKIP_ROWS 0x0CF3
+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_PACK_SWAP_BYTES 0x0D00
+#define GL_PACK_LSB_FIRST 0x0D01
+#define GL_PACK_ROW_LENGTH 0x0D02
+#define GL_PACK_SKIP_ROWS 0x0D03
+#define GL_PACK_SKIP_PIXELS 0x0D04
+#define GL_PACK_ALIGNMENT 0x0D05
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define GL_SUBPIXEL_BITS 0x0D50
+#define GL_TEXTURE_1D 0x0DE0
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_TEXTURE_WIDTH 0x1000
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GL/glext.h
^
|
@@ -1,13 +1,13 @@
-#ifndef __glext_h_
-#define __glext_h_
+#ifndef __gl_glext_h_
+#define __gl_glext_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
-** Copyright (c) 2007-2012 The Khronos Group Inc.
-**
+** Copyright (c) 2013-2018 The Khronos Group Inc.
+**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
@@ -15,10 +15,10 @@
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
-**
+**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
-**
+**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -27,15 +27,17 @@
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
-
-/* Header file version number, required by OpenGL ABI for Linux */
-/* glext.h last updated $Date: 2012-09-19 19:02:24 -0700 (Wed, 19 Sep 2012) $ */
-/* Current version at http://www.opengl.org/registry/ */
-#define GL_GLEXT_VERSION 85
-/* Function declaration macros - to move into glplatform.h */
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+** https://github.com/KhronosGroup/OpenGL-Registry
+*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
+#endif
#include <windows.h>
#endif
@@ -49,9 +51,22 @@
#define GLAPI extern
#endif
-/*************************************************************/
+#define GL_GLEXT_VERSION 20190911
+
+#include <KHR/khrplatform.h>
+
+/* Generated C header for:
+ * API: gl
+ * Profile: compatibility
+ * Versions considered: .*
+ * Versions emitted: 1\.[2-9]|[234]\.[0-9]
+ * Default extensions included: gl
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
#ifndef GL_VERSION_1_2
+#define GL_VERSION_1_2 1
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
@@ -93,87 +108,20 @@
#define GL_SINGLE_COLOR 0x81F9
#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
#endif
-
-#ifndef GL_ARB_imaging
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-#define GL_FUNC_ADD 0x8006
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-#define GL_BLEND_EQUATION 0x8009
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_CONVOLUTION_1D 0x8010
-#define GL_CONVOLUTION_2D 0x8011
-#define GL_SEPARABLE_2D 0x8012
-#define GL_CONVOLUTION_BORDER_MODE 0x8013
-#define GL_CONVOLUTION_FILTER_SCALE 0x8014
-#define GL_CONVOLUTION_FILTER_BIAS 0x8015
-#define GL_REDUCE 0x8016
-#define GL_CONVOLUTION_FORMAT 0x8017
-#define GL_CONVOLUTION_WIDTH 0x8018
-#define GL_CONVOLUTION_HEIGHT 0x8019
-#define GL_MAX_CONVOLUTION_WIDTH 0x801A
-#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
-#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
-#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
-#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
-#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
-#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
-#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
-#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
-#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
-#define GL_HISTOGRAM 0x8024
-#define GL_PROXY_HISTOGRAM 0x8025
-#define GL_HISTOGRAM_WIDTH 0x8026
-#define GL_HISTOGRAM_FORMAT 0x8027
-#define GL_HISTOGRAM_RED_SIZE 0x8028
-#define GL_HISTOGRAM_GREEN_SIZE 0x8029
-#define GL_HISTOGRAM_BLUE_SIZE 0x802A
-#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
-#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
-#define GL_HISTOGRAM_SINK 0x802D
-#define GL_MINMAX 0x802E
-#define GL_MINMAX_FORMAT 0x802F
-#define GL_MINMAX_SINK 0x8030
-#define GL_TABLE_TOO_LARGE 0x8031
-#define GL_COLOR_MATRIX 0x80B1
-#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
-#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
-#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
-#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
-#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
-#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
-#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
-#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
-#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
-#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
-#define GL_COLOR_TABLE 0x80D0
-#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
-#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
-#define GL_PROXY_COLOR_TABLE 0x80D3
-#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
-#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
-#define GL_COLOR_TABLE_SCALE 0x80D6
-#define GL_COLOR_TABLE_BIAS 0x80D7
-#define GL_COLOR_TABLE_FORMAT 0x80D8
-#define GL_COLOR_TABLE_WIDTH 0x80D9
-#define GL_COLOR_TABLE_RED_SIZE 0x80DA
-#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
-#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
-#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
-#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
-#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
-#define GL_CONSTANT_BORDER 0x8151
-#define GL_REPLICATE_BORDER 0x8153
-#define GL_CONVOLUTION_BORDER_COLOR 0x8154
-#endif
+#endif /* GL_VERSION_1_2 */
#ifndef GL_VERSION_1_3
+#define GL_VERSION_1_3 1
#define GL_TEXTURE0 0x84C0
#define GL_TEXTURE1 0x84C1
#define GL_TEXTURE2 0x84C2
@@ -270,9 +218,104 @@
#define GL_PREVIOUS 0x8578
#define GL_DOT3_RGB 0x86AE
#define GL_DOT3_RGBA 0x86AF
+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GL/glx.h
^
|
@@ -1,6 +1,5 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -17,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -27,29 +27,11 @@
#define GLX_H
-#ifdef __VMS
-#include <GL/vms_x_fix.h>
-# ifdef __cplusplus
-/* VMS Xlib.h gives problems with C++.
- * this avoids a bunch of trivial warnings */
-#pragma message disable nosimpint
-#endif
-#endif
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-#ifdef __VMS
-# ifdef __cplusplus
-#pragma message enable nosimpint
-#endif
-#endif
#include <GL/gl.h>
-#if defined(USE_MGL_NAMESPACE)
-#include "glx_mangle.h"
-#endif
-
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -382,18 +364,6 @@
/*
- * Remove this when glxext.h is updated.
- */
-#ifndef GLX_NV_float_buffer
-#define GLX_NV_float_buffer 1
-
-#define GLX_FLOAT_COMPONENTS_NV 0x20B0
-
-#endif /* GLX_NV_float_buffer */
-
-
-
-/*
* #?. GLX_MESA_swap_frame_usage
*/
#ifndef GLX_MESA_swap_frame_usage
@@ -428,61 +398,6 @@
#endif /* GLX_MESA_swap_control */
-
-/*
- * #?. GLX_EXT_texture_from_pixmap
- * XXX not finished?
- */
-#ifndef GLX_EXT_texture_from_pixmap
-#define GLX_EXT_texture_from_pixmap 1
-
-#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
-#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
-#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
-#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
-#define GLX_Y_INVERTED_EXT 0x20D4
-
-#define GLX_TEXTURE_FORMAT_EXT 0x20D5
-#define GLX_TEXTURE_TARGET_EXT 0x20D6
-#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
-
-#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
-#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
-#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
-
-#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
-#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
-#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
-
-#define GLX_TEXTURE_1D_EXT 0x20DB
-#define GLX_TEXTURE_2D_EXT 0x20DC
-#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
-
-#define GLX_FRONT_LEFT_EXT 0x20DE
-#define GLX_FRONT_RIGHT_EXT 0x20DF
-#define GLX_BACK_LEFT_EXT 0x20E0
-#define GLX_BACK_RIGHT_EXT 0x20E1
-#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
-#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
-#define GLX_AUX0_EXT 0x20E2
-#define GLX_AUX1_EXT 0x20E3
-#define GLX_AUX2_EXT 0x20E4
-#define GLX_AUX3_EXT 0x20E5
-#define GLX_AUX4_EXT 0x20E6
-#define GLX_AUX5_EXT 0x20E7
-#define GLX_AUX6_EXT 0x20E8
-#define GLX_AUX7_EXT 0x20E9
-#define GLX_AUX8_EXT 0x20EA
-#define GLX_AUX9_EXT 0x20EB
-
-extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
-extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
-
-#endif /* GLX_EXT_texture_from_pixmap */
-
-
-
-
/*** Should these go here, or in another header? */
/*
** GLX Events
@@ -506,7 +421,7 @@
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
- GLXDrawable drawable; /* drawable on which event was requested in event mask */
+ Drawable drawable; /* drawable on which event was requested in event mask */
int event_type;
int64_t ust;
int64_t msc;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GL/glxext.h
^
|
@@ -1,13 +1,13 @@
-#ifndef __glxext_h_
-#define __glxext_h_
+#ifndef __glx_glxext_h_
+#define __glx_glxext_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
-** Copyright (c) 2007-2012 The Khronos Group Inc.
-**
+** Copyright (c) 2013-2018 The Khronos Group Inc.
+**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
@@ -15,10 +15,10 @@
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
-**
+**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
-**
+**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -27,464 +27,642 @@
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+** https://github.com/KhronosGroup/OpenGL-Registry
+*/
-/* Function declaration macros - to move into glplatform.h */
-
-#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
-#define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
-#endif
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-#ifndef GLAPI
-#define GLAPI extern
-#endif
-
-/*************************************************************/
+#define GLX_GLXEXT_VERSION 20190911
-/* Header file version number, required by OpenGL ABI for Linux */
-/* glxext.h last updated 2012/02/29 */
-/* Current version at http://www.opengl.org/registry/ */
-#define GLX_GLXEXT_VERSION 33
+/* Generated C header for:
+ * API: glx
+ * Versions considered: .*
+ * Versions emitted: 1\.[3-9]
+ * Default extensions included: glx
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
#ifndef GLX_VERSION_1_3
-#define GLX_WINDOW_BIT 0x00000001
-#define GLX_PIXMAP_BIT 0x00000002
-#define GLX_PBUFFER_BIT 0x00000004
-#define GLX_RGBA_BIT 0x00000001
-#define GLX_COLOR_INDEX_BIT 0x00000002
-#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
-#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
-#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
-#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
-#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
-#define GLX_AUX_BUFFERS_BIT 0x00000010
-#define GLX_DEPTH_BUFFER_BIT 0x00000020
-#define GLX_STENCIL_BUFFER_BIT 0x00000040
-#define GLX_ACCUM_BUFFER_BIT 0x00000080
-#define GLX_CONFIG_CAVEAT 0x20
-#define GLX_X_VISUAL_TYPE 0x22
-#define GLX_TRANSPARENT_TYPE 0x23
-#define GLX_TRANSPARENT_INDEX_VALUE 0x24
-#define GLX_TRANSPARENT_RED_VALUE 0x25
-#define GLX_TRANSPARENT_GREEN_VALUE 0x26
-#define GLX_TRANSPARENT_BLUE_VALUE 0x27
-#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
-#define GLX_DONT_CARE 0xFFFFFFFF
-#define GLX_NONE 0x8000
-#define GLX_SLOW_CONFIG 0x8001
-#define GLX_TRUE_COLOR 0x8002
-#define GLX_DIRECT_COLOR 0x8003
-#define GLX_PSEUDO_COLOR 0x8004
-#define GLX_STATIC_COLOR 0x8005
-#define GLX_GRAY_SCALE 0x8006
-#define GLX_STATIC_GRAY 0x8007
-#define GLX_TRANSPARENT_RGB 0x8008
-#define GLX_TRANSPARENT_INDEX 0x8009
-#define GLX_VISUAL_ID 0x800B
-#define GLX_SCREEN 0x800C
-#define GLX_NON_CONFORMANT_CONFIG 0x800D
-#define GLX_DRAWABLE_TYPE 0x8010
-#define GLX_RENDER_TYPE 0x8011
-#define GLX_X_RENDERABLE 0x8012
-#define GLX_FBCONFIG_ID 0x8013
-#define GLX_RGBA_TYPE 0x8014
-#define GLX_COLOR_INDEX_TYPE 0x8015
-#define GLX_MAX_PBUFFER_WIDTH 0x8016
-#define GLX_MAX_PBUFFER_HEIGHT 0x8017
-#define GLX_MAX_PBUFFER_PIXELS 0x8018
-#define GLX_PRESERVED_CONTENTS 0x801B
-#define GLX_LARGEST_PBUFFER 0x801C
-#define GLX_WIDTH 0x801D
-#define GLX_HEIGHT 0x801E
-#define GLX_EVENT_MASK 0x801F
-#define GLX_DAMAGED 0x8020
-#define GLX_SAVED 0x8021
-#define GLX_WINDOW 0x8022
-#define GLX_PBUFFER 0x8023
-#define GLX_PBUFFER_HEIGHT 0x8040
-#define GLX_PBUFFER_WIDTH 0x8041
+#define GLX_VERSION_1_3 1
+typedef XID GLXContextID;
+typedef struct __GLXFBConfigRec *GLXFBConfig;
+typedef XID GLXWindow;
+typedef XID GLXPbuffer;
+#define GLX_WINDOW_BIT 0x00000001
+#define GLX_PIXMAP_BIT 0x00000002
+#define GLX_PBUFFER_BIT 0x00000004
+#define GLX_RGBA_BIT 0x00000001
+#define GLX_COLOR_INDEX_BIT 0x00000002
+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
+#define GLX_AUX_BUFFERS_BIT 0x00000010
+#define GLX_DEPTH_BUFFER_BIT 0x00000020
+#define GLX_STENCIL_BUFFER_BIT 0x00000040
+#define GLX_ACCUM_BUFFER_BIT 0x00000080
+#define GLX_CONFIG_CAVEAT 0x20
+#define GLX_X_VISUAL_TYPE 0x22
+#define GLX_TRANSPARENT_TYPE 0x23
+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
+#define GLX_TRANSPARENT_RED_VALUE 0x25
+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
+#define GLX_DONT_CARE 0xFFFFFFFF
+#define GLX_NONE 0x8000
+#define GLX_SLOW_CONFIG 0x8001
+#define GLX_TRUE_COLOR 0x8002
+#define GLX_DIRECT_COLOR 0x8003
+#define GLX_PSEUDO_COLOR 0x8004
+#define GLX_STATIC_COLOR 0x8005
+#define GLX_GRAY_SCALE 0x8006
+#define GLX_STATIC_GRAY 0x8007
+#define GLX_TRANSPARENT_RGB 0x8008
+#define GLX_TRANSPARENT_INDEX 0x8009
+#define GLX_VISUAL_ID 0x800B
+#define GLX_SCREEN 0x800C
+#define GLX_NON_CONFORMANT_CONFIG 0x800D
+#define GLX_DRAWABLE_TYPE 0x8010
+#define GLX_RENDER_TYPE 0x8011
+#define GLX_X_RENDERABLE 0x8012
+#define GLX_FBCONFIG_ID 0x8013
+#define GLX_RGBA_TYPE 0x8014
+#define GLX_COLOR_INDEX_TYPE 0x8015
+#define GLX_MAX_PBUFFER_WIDTH 0x8016
+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
+#define GLX_MAX_PBUFFER_PIXELS 0x8018
+#define GLX_PRESERVED_CONTENTS 0x801B
+#define GLX_LARGEST_PBUFFER 0x801C
+#define GLX_WIDTH 0x801D
+#define GLX_HEIGHT 0x801E
+#define GLX_EVENT_MASK 0x801F
+#define GLX_DAMAGED 0x8020
+#define GLX_SAVED 0x8021
+#define GLX_WINDOW 0x8022
+#define GLX_PBUFFER 0x8023
+#define GLX_PBUFFER_HEIGHT 0x8040
+#define GLX_PBUFFER_WIDTH 0x8041
+typedef GLXFBConfig *( *PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
+typedef GLXFBConfig *( *PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
+typedef int ( *PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
+typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
+typedef GLXWindow ( *PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
+typedef void ( *PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
+typedef GLXPixmap ( *PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GL/internal/dri_interface.h
^
|
@@ -40,20 +40,7 @@
#ifndef DRI_INTERFACE_H
#define DRI_INTERFACE_H
-/* For archs with no drm.h */
-#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__GNU__)
-#ifndef __NOT_HAVE_DRM_H
-#define __NOT_HAVE_DRM_H
-#endif
-#endif
-
-#ifndef __NOT_HAVE_DRM_H
-#include <drm.h>
-#else
-typedef unsigned int drm_context_t;
-typedef unsigned int drm_drawable_t;
-typedef struct drm_clip_rect drm_clip_rect_t;
-#endif
+#include <stdint.h>
/**
* \name DRI interface structures
@@ -85,6 +72,13 @@
typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension;
typedef struct __DRI2flushExtensionRec __DRI2flushExtension;
typedef struct __DRI2throttleExtensionRec __DRI2throttleExtension;
+typedef struct __DRI2fenceExtensionRec __DRI2fenceExtension;
+typedef struct __DRI2interopExtensionRec __DRI2interopExtension;
+typedef struct __DRI2blobExtensionRec __DRI2blobExtension;
+typedef struct __DRI2bufferDamageExtensionRec __DRI2bufferDamageExtension;
+
+typedef struct __DRIimageLoaderExtensionRec __DRIimageLoaderExtension;
+typedef struct __DRIimageDriverExtensionRec __DRIimageDriverExtension;
/*@}*/
@@ -150,32 +144,6 @@
};
/**
- * Used by drivers that implement the GLX_MESA_swap_frame_usage extension.
- */
-#define __DRI_FRAME_TRACKING "DRI_FrameTracking"
-#define __DRI_FRAME_TRACKING_VERSION 1
-struct __DRIframeTrackingExtensionRec {
- __DRIextension base;
-
- /**
- * Enable or disable frame usage tracking.
- *
- * \since Internal API version 20030317.
- */
- int (*frameTracking)(__DRIdrawable *drawable, GLboolean enable);
-
- /**
- * Retrieve frame usage information.
- *
- * \since Internal API version 20030317.
- */
- int (*queryFrameTracking)(__DRIdrawable *drawable,
- int64_t * sbc, int64_t * missedFrames,
- float * lastMissedUsage, float * usage);
-};
-
-
-/**
* Used by drivers that implement the GLX_SGI_video_sync extension.
*/
#define __DRI_MEDIA_STREAM_COUNTER "DRI_MediaStreamCounter"
@@ -201,24 +169,6 @@
int64_t *msc);
};
-
-#define __DRI_TEX_OFFSET "DRI_TexOffset"
-#define __DRI_TEX_OFFSET_VERSION 1
-struct __DRItexOffsetExtensionRec {
- __DRIextension base;
-
- /**
- * Method to override base texture image with a driver specific 'offset'.
- * The depth passed in allows e.g. to ignore the alpha channel of texture
- * images where the non-alpha components don't occupy a whole texel.
- *
- * For GLX_EXT_texture_from_pixmap with AIGLX.
- */
- void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname,
- unsigned long long offset, GLint depth, GLuint pitch);
-};
-
-
/* Valid values for format in the setTexBuffer2 function below. These
* values match the GLX tokens for compatibility reasons, but we
* define them here since the DRI interface can't depend on GLX. */
@@ -227,7 +177,7 @@
#define __DRI_TEXTURE_FORMAT_RGBA 0x20DA
#define __DRI_TEX_BUFFER "DRI_TexBuffer"
-#define __DRI_TEX_BUFFER_VERSION 2
+#define __DRI_TEX_BUFFER_VERSION 3
struct __DRItexBufferExtensionRec {
__DRIextension base;
@@ -239,7 +189,7 @@
* setTexBuffer2 in version 2 of this interface
*/
void (*setTexBuffer)(__DRIcontext *pDRICtx,
- GLint target,
+ int target,
__DRIdrawable *pDraw);
/**
@@ -247,19 +197,23 @@
* __DRIdrawable, including the required texture format attribute.
*
* For GLX_EXT_texture_from_pixmap with AIGLX.
+ *
+ * \since 2
*/
void (*setTexBuffer2)(__DRIcontext *pDRICtx,
- GLint target,
- GLint format,
+ int target,
+ int format,
__DRIdrawable *pDraw);
/**
* Method to release texture buffer in case some special platform
* need this.
*
* For GLX_EXT_texture_from_pixmap with AIGLX.
+ *
+ * \since 3
*/
void (*releaseTexBuffer)(__DRIcontext *pDRICtx,
- GLint target,
+ int target,
__DRIdrawable *pDraw);
};
@@ -267,7 +221,18 @@
* Used by drivers that implement DRI2
*/
#define __DRI2_FLUSH "DRI2_Flush"
-#define __DRI2_FLUSH_VERSION 3
+#define __DRI2_FLUSH_VERSION 4
+
+#define __DRI2_FLUSH_DRAWABLE (1 << 0) /* the drawable should be flushed. */
+#define __DRI2_FLUSH_CONTEXT (1 << 1) /* glFlush should be called */
+#define __DRI2_FLUSH_INVALIDATE_ANCILLARY (1 << 2)
+
+enum __DRI2throttleReason {
+ __DRI2_THROTTLE_SWAPBUFFER,
+ __DRI2_THROTTLE_COPYSUBBUFFER,
+ __DRI2_THROTTLE_FLUSHFRONT
+};
+
struct __DRI2flushExtensionRec {
__DRIextension base;
void (*flush)(__DRIdrawable *drawable);
@@ -281,6 +246,27 @@
* \since 3
*/
void (*invalidate)(__DRIdrawable *drawable);
+
+ /**
+ * This function reduces the number of flushes in the driver by combining
+ * several operations into one call.
+ *
+ * It can:
+ * - throttle
+ * - flush a drawable
+ * - flush a context
+ *
+ * \param context the context
+ * \param drawable the drawable to flush
+ * \param flags a combination of _DRI2_FLUSH_xxx flags
+ * \param throttle_reason the reason for throttling, 0 = no throttling
+ *
+ * \since 4
+ */
+ void (*flush_with_flags)(__DRIcontext *ctx,
+ __DRIdrawable *drawable,
+ unsigned flags,
+ enum __DRI2throttleReason throttle_reason);
};
@@ -292,12 +278,6 @@
#define __DRI2_THROTTLE "DRI2_Throttle"
#define __DRI2_THROTTLE_VERSION 1
-enum __DRI2throttleReason {
- __DRI2_THROTTLE_SWAPBUFFER,
- __DRI2_THROTTLE_COPYSUBBUFFER,
- __DRI2_THROTTLE_FLUSHFRONT
-};
-
struct __DRI2throttleExtensionRec {
__DRIextension base;
void (*throttle)(__DRIcontext *ctx,
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GL/mesa_glinterop.h
^
|
@@ -0,0 +1,308 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright 2016 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/* Mesa OpenGL inter-driver interoperability interface designed for but not
+ * limited to OpenCL.
+ *
+ * This is a driver-agnostic, backward-compatible interface. The structures
+ * are only allowed to grow. They can never shrink and their members can
+ * never be removed, renamed, or redefined.
+ *
+ * The interface doesn't return a lot of static texture parameters like
+ * width, height, etc. It mainly returns mutable buffer and texture view
+ * parameters that can't be part of the texture allocation (because they are
+ * mutable). If drivers want to return more data or want to return static
+ * allocation parameters, they can do it in one of these two ways:
+ * - attaching the data to the DMABUF handle in a driver-specific way
+ * - passing the data via "out_driver_data" in the "in" structure.
+ *
+ * Mesa is expected to do a lot of error checking on behalf of OpenCL, such
+ * as checking the target, miplevel, and texture completeness.
+ *
+ * OpenCL, on the other hand, needs to check if the display+context combo
+ * is compatible with the OpenCL driver by querying the device information.
+ * It also needs to check if the texture internal format and channel ordering
+ * (returned in a driver-specific way) is supported by OpenCL, among other
+ * things.
+ */
+
+#ifndef MESA_GLINTEROP_H
+#define MESA_GLINTEROP_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Forward declarations to avoid inclusion of GL/glx.h */
+#ifndef GLX_H
+struct _XDisplay;
+struct __GLXcontextRec;
+#endif
+
+/* Forward declarations to avoid inclusion of EGL/egl.h */
+#ifndef __egl_h_
+typedef void *EGLDisplay;
+typedef void *EGLContext;
+#endif
+
+/** Returned error codes. */
+enum {
+ MESA_GLINTEROP_SUCCESS = 0,
+ MESA_GLINTEROP_OUT_OF_RESOURCES,
+ MESA_GLINTEROP_OUT_OF_HOST_MEMORY,
+ MESA_GLINTEROP_INVALID_OPERATION,
+ MESA_GLINTEROP_INVALID_VERSION,
+ MESA_GLINTEROP_INVALID_DISPLAY,
+ MESA_GLINTEROP_INVALID_CONTEXT,
+ MESA_GLINTEROP_INVALID_TARGET,
+ MESA_GLINTEROP_INVALID_OBJECT,
+ MESA_GLINTEROP_INVALID_MIP_LEVEL,
+ MESA_GLINTEROP_UNSUPPORTED
+};
+
+/** Access flags. */
+enum {
+ MESA_GLINTEROP_ACCESS_READ_WRITE = 0,
+ MESA_GLINTEROP_ACCESS_READ_ONLY,
+ MESA_GLINTEROP_ACCESS_WRITE_ONLY
+};
+
+#define MESA_GLINTEROP_DEVICE_INFO_VERSION 1
+
+/**
+ * Device information returned by Mesa.
+ */
+struct mesa_glinterop_device_info {
+ /* The caller should set this to the version of the struct they support */
+ /* The callee will overwrite it if it supports a lower version.
+ *
+ * The caller should check the value and access up-to the version supported
+ * by the callee.
+ */
+ /* NOTE: Do not use the MESA_GLINTEROP_DEVICE_INFO_VERSION macro */
+ uint32_t version;
+
+ /* PCI location */
+ uint32_t pci_segment_group;
+ uint32_t pci_bus;
+ uint32_t pci_device;
+ uint32_t pci_function;
+
+ /* Device identification */
+ uint32_t vendor_id;
+ uint32_t device_id;
+
+ /* Structure version 1 ends here. */
+};
+
+#define MESA_GLINTEROP_EXPORT_IN_VERSION 1
+
+/**
+ * Input parameters to Mesa interop export functions.
+ */
+struct mesa_glinterop_export_in {
+ /* The caller should set this to the version of the struct they support */
+ /* The callee will overwrite it if it supports a lower version.
+ *
+ * The caller should check the value and access up-to the version supported
+ * by the callee.
+ */
+ /* NOTE: Do not use the MESA_GLINTEROP_EXPORT_IN_VERSION macro */
+ uint32_t version;
+
+ /* One of the following:
+ * - GL_TEXTURE_BUFFER
+ * - GL_TEXTURE_1D
+ * - GL_TEXTURE_2D
+ * - GL_TEXTURE_3D
+ * - GL_TEXTURE_RECTANGLE
+ * - GL_TEXTURE_1D_ARRAY
+ * - GL_TEXTURE_2D_ARRAY
+ * - GL_TEXTURE_CUBE_MAP_ARRAY
+ * - GL_TEXTURE_CUBE_MAP
+ * - GL_TEXTURE_CUBE_MAP_POSITIVE_X
+ * - GL_TEXTURE_CUBE_MAP_NEGATIVE_X
+ * - GL_TEXTURE_CUBE_MAP_POSITIVE_Y
+ * - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
+ * - GL_TEXTURE_CUBE_MAP_POSITIVE_Z
+ * - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
+ * - GL_TEXTURE_2D_MULTISAMPLE
+ * - GL_TEXTURE_2D_MULTISAMPLE_ARRAY
+ * - GL_TEXTURE_EXTERNAL_OES
+ * - GL_RENDERBUFFER
+ * - GL_ARRAY_BUFFER
+ */
+ unsigned target;
+
+ /* If target is GL_ARRAY_BUFFER, it's a buffer object.
+ * If target is GL_RENDERBUFFER, it's a renderbuffer object.
+ * If target is GL_TEXTURE_*, it's a texture object.
+ */
+ unsigned obj;
+
+ /* Mipmap level. Ignored for non-texture objects. */
+ unsigned miplevel;
+
+ /* One of MESA_GLINTEROP_ACCESS_* flags. This describes how the exported
+ * object is going to be used.
+ */
+ uint32_t access;
+
+ /* Size of memory pointed to by out_driver_data. */
+ uint32_t out_driver_data_size;
+
+ /* If the caller wants to query driver-specific data about the OpenGL
+ * object, this should point to the memory where that data will be stored.
+ * This is expected to be a temporary staging memory. The pointer is not
+ * allowed to be saved for later use by Mesa.
+ */
+ void *out_driver_data;
+ /* Structure version 1 ends here. */
+};
+
+#define MESA_GLINTEROP_EXPORT_OUT_VERSION 1
+
+/**
+ * Outputs of Mesa interop export functions.
+ */
+struct mesa_glinterop_export_out {
+ /* The caller should set this to the version of the struct they support */
+ /* The callee will overwrite it if it supports a lower version.
+ *
+ * The caller should check the value and access up-to the version supported
+ * by the callee.
+ */
+ /* NOTE: Do not use the MESA_GLINTEROP_EXPORT_OUT_VERSION macro */
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GL/osmesa.h
^
|
@@ -1,6 +1,5 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -17,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -41,10 +41,8 @@
* OSMesaGetIntegerv - return OSMesa state parameters
*
*
- * The limits on the width and height of an image buffer are MAX_WIDTH and
- * MAX_HEIGHT as defined in Mesa/src/config.h. Defaults are 1280 and 1024.
- * You can increase them as needed but beware that many temporary arrays in
- * Mesa are dimensioned by MAX_WIDTH or MAX_HEIGHT.
+ * The limits on the width and height of an image buffer can be retrieved
+ * via OSMesaGetIntegerv(OSMESA_MAX_WIDTH/OSMESA_MAX_HEIGHT).
*/
@@ -60,8 +58,8 @@
#include <GL/gl.h>
-#define OSMESA_MAJOR_VERSION 6
-#define OSMESA_MINOR_VERSION 5
+#define OSMESA_MAJOR_VERSION 11
+#define OSMESA_MINOR_VERSION 2
#define OSMESA_PATCH_VERSION 0
@@ -97,13 +95,20 @@
#define OSMESA_MAX_WIDTH 0x24 /* new in 4.0 */
#define OSMESA_MAX_HEIGHT 0x25 /* new in 4.0 */
-
-typedef struct osmesa_context *OSMesaContext;
+/*
+ * Accepted in OSMesaCreateContextAttrib's attribute list.
+ */
+#define OSMESA_DEPTH_BITS 0x30
+#define OSMESA_STENCIL_BITS 0x31
+#define OSMESA_ACCUM_BITS 0x32
+#define OSMESA_PROFILE 0x33
+#define OSMESA_CORE_PROFILE 0x34
+#define OSMESA_COMPAT_PROFILE 0x35
+#define OSMESA_CONTEXT_MAJOR_VERSION 0x36
+#define OSMESA_CONTEXT_MINOR_VERSION 0x37
-#if defined(__QUICKDRAW__)
-#pragma export on
-#endif
+typedef struct osmesa_context *OSMesaContext;
/*
@@ -135,6 +140,35 @@
/*
+ * Create an Off-Screen Mesa rendering context with attribute list.
+ * The list is composed of (attribute, value) pairs and terminated with
+ * attribute==0. Supported Attributes:
+ *
+ * Attributes Values
+ * --------------------------------------------------------------------------
+ * OSMESA_FORMAT OSMESA_RGBA*, OSMESA_BGRA, OSMESA_ARGB, etc.
+ * OSMESA_DEPTH_BITS 0*, 16, 24, 32
+ * OSMESA_STENCIL_BITS 0*, 8
+ * OSMESA_ACCUM_BITS 0*, 16
+ * OSMESA_PROFILE OSMESA_COMPAT_PROFILE*, OSMESA_CORE_PROFILE
+ * OSMESA_CONTEXT_MAJOR_VERSION 1*, 2, 3
+ * OSMESA_CONTEXT_MINOR_VERSION 0+
+ *
+ * Note: * = default value
+ *
+ * We return a context version >= what's specified by OSMESA_CONTEXT_MAJOR/
+ * MINOR_VERSION for the given profile. For example, if you request a GL 1.4
+ * compat profile, you might get a GL 3.0 compat profile.
+ * Otherwise, null is returned if the version/profile is not supported.
+ *
+ * New in Mesa 11.2
+ */
+GLAPI OSMesaContext GLAPIENTRY
+OSMesaCreateContextAttribs( const int *attribList, OSMesaContext sharelist );
+
+
+
+/*
* Destroy an Off-Screen Mesa rendering context.
*
* Input: ctx - the context to destroy
@@ -275,6 +309,21 @@
GLAPI void GLAPIENTRY
OSMesaColorClamp(GLboolean enable);
+
+/**
+ * Enable/disable Gallium post-process filters.
+ * This should be called after a context is created, but before it is
+ * made current for the first time. After a context has been made
+ * current, this function has no effect.
+ * If the enable_value param is zero, the filter is disabled. Otherwise
+ * the filter is enabled, and the value may control the filter's quality.
+ * New in Mesa 10.0
+ */
+GLAPI void GLAPIENTRY
+OSMesaPostprocess(OSMesaContext osmesa, const char *filter,
+ unsigned enable_value);
+
+
#ifdef __cplusplus
}
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GL/wglext.h
^
|
@@ -1,13 +1,13 @@
-#ifndef __wglext_h_
-#define __wglext_h_
+#ifndef __wgl_wglext_h_
+#define __wgl_wglext_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
-** Copyright (c) 2007-2010 The Khronos Group Inc.
-**
+** Copyright (c) 2013-2018 The Khronos Group Inc.
+**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
@@ -15,10 +15,10 @@
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
-**
+**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
-**
+**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -27,676 +27,537 @@
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
-
-/* Function declaration macros - to move into glplatform.h */
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+** https://github.com/KhronosGroup/OpenGL-Registry
+*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
#endif
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-#ifndef GLAPI
-#define GLAPI extern
-#endif
-
-/*************************************************************/
+#define WGL_WGLEXT_VERSION 20190728
-/* Header file version number */
-/* wglext.h last updated 2010/08/06 */
-/* Current version at http://www.opengl.org/registry/ */
-#define WGL_WGLEXT_VERSION 22
+/* Generated C header for:
+ * API: wgl
+ * Versions considered: .*
+ * Versions emitted: _nomatch_^
+ * Default extensions included: wgl
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
#ifndef WGL_ARB_buffer_region
-#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
-#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
-#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
-#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
-#endif
-
-#ifndef WGL_ARB_multisample
-#define WGL_SAMPLE_BUFFERS_ARB 0x2041
-#define WGL_SAMPLES_ARB 0x2042
-#endif
-
-#ifndef WGL_ARB_extensions_string
-#endif
-
-#ifndef WGL_ARB_pixel_format
-#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
-#define WGL_DRAW_TO_WINDOW_ARB 0x2001
-#define WGL_DRAW_TO_BITMAP_ARB 0x2002
-#define WGL_ACCELERATION_ARB 0x2003
-#define WGL_NEED_PALETTE_ARB 0x2004
-#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
-#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
-#define WGL_SWAP_METHOD_ARB 0x2007
-#define WGL_NUMBER_OVERLAYS_ARB 0x2008
-#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
-#define WGL_TRANSPARENT_ARB 0x200A
-#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
-#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
-#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
-#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
-#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
-#define WGL_SHARE_DEPTH_ARB 0x200C
-#define WGL_SHARE_STENCIL_ARB 0x200D
-#define WGL_SHARE_ACCUM_ARB 0x200E
-#define WGL_SUPPORT_GDI_ARB 0x200F
-#define WGL_SUPPORT_OPENGL_ARB 0x2010
-#define WGL_DOUBLE_BUFFER_ARB 0x2011
-#define WGL_STEREO_ARB 0x2012
-#define WGL_PIXEL_TYPE_ARB 0x2013
-#define WGL_COLOR_BITS_ARB 0x2014
-#define WGL_RED_BITS_ARB 0x2015
-#define WGL_RED_SHIFT_ARB 0x2016
-#define WGL_GREEN_BITS_ARB 0x2017
-#define WGL_GREEN_SHIFT_ARB 0x2018
-#define WGL_BLUE_BITS_ARB 0x2019
-#define WGL_BLUE_SHIFT_ARB 0x201A
-#define WGL_ALPHA_BITS_ARB 0x201B
-#define WGL_ALPHA_SHIFT_ARB 0x201C
-#define WGL_ACCUM_BITS_ARB 0x201D
-#define WGL_ACCUM_RED_BITS_ARB 0x201E
-#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
-#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
-#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
-#define WGL_DEPTH_BITS_ARB 0x2022
-#define WGL_STENCIL_BITS_ARB 0x2023
-#define WGL_AUX_BUFFERS_ARB 0x2024
-#define WGL_NO_ACCELERATION_ARB 0x2025
-#define WGL_GENERIC_ACCELERATION_ARB 0x2026
-#define WGL_FULL_ACCELERATION_ARB 0x2027
-#define WGL_SWAP_EXCHANGE_ARB 0x2028
-#define WGL_SWAP_COPY_ARB 0x2029
-#define WGL_SWAP_UNDEFINED_ARB 0x202A
-#define WGL_TYPE_RGBA_ARB 0x202B
-#define WGL_TYPE_COLORINDEX_ARB 0x202C
-#endif
-
-#ifndef WGL_ARB_make_current_read
-#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
-#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
-#endif
-
-#ifndef WGL_ARB_pbuffer
-#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
-#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
-#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
-#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
-#define WGL_PBUFFER_LARGEST_ARB 0x2033
-#define WGL_PBUFFER_WIDTH_ARB 0x2034
-#define WGL_PBUFFER_HEIGHT_ARB 0x2035
-#define WGL_PBUFFER_LOST_ARB 0x2036
-#endif
-
-#ifndef WGL_ARB_render_texture
-#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
-#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
-#define WGL_TEXTURE_FORMAT_ARB 0x2072
-#define WGL_TEXTURE_TARGET_ARB 0x2073
-#define WGL_MIPMAP_TEXTURE_ARB 0x2074
-#define WGL_TEXTURE_RGB_ARB 0x2075
-#define WGL_TEXTURE_RGBA_ARB 0x2076
-#define WGL_NO_TEXTURE_ARB 0x2077
-#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
-#define WGL_TEXTURE_1D_ARB 0x2079
-#define WGL_TEXTURE_2D_ARB 0x207A
-#define WGL_MIPMAP_LEVEL_ARB 0x207B
-#define WGL_CUBE_MAP_FACE_ARB 0x207C
-#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
-#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
-#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
-#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
-#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
-#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
-#define WGL_FRONT_LEFT_ARB 0x2083
-#define WGL_FRONT_RIGHT_ARB 0x2084
-#define WGL_BACK_LEFT_ARB 0x2085
-#define WGL_BACK_RIGHT_ARB 0x2086
-#define WGL_AUX0_ARB 0x2087
-#define WGL_AUX1_ARB 0x2088
-#define WGL_AUX2_ARB 0x2089
-#define WGL_AUX3_ARB 0x208A
-#define WGL_AUX4_ARB 0x208B
-#define WGL_AUX5_ARB 0x208C
-#define WGL_AUX6_ARB 0x208D
-#define WGL_AUX7_ARB 0x208E
-#define WGL_AUX8_ARB 0x208F
-#define WGL_AUX9_ARB 0x2090
-#endif
-
-#ifndef WGL_ARB_pixel_format_float
-#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
-#endif
-
-#ifndef WGL_ARB_framebuffer_sRGB
-#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES/egl.h
^
|
@@ -1,9 +1,12 @@
/*
+** Copyright 2008-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: Apache-2.0
+*/
+
+/*
* Skeleton egl.h to provide compatibility for early GLES 1.0
* applications. Several early implementations included gl.h
* in egl.h leading applications to include only egl.h
- *
- * $Revision: 6252 $ on $Date:: 2008-08-06 16:35:08 -0700 #$
*/
#ifndef __legacy_egl_h_
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES/gl.h
^
|
@@ -1,58 +1,62 @@
-#ifndef __gl_h_
-#define __gl_h_
-
-/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
-
-#include <GLES/glplatform.h>
+#ifndef __gles1_gl_h_
+#define __gles1_gl_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-typedef void GLvoid;
-typedef char GLchar;
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef khronos_int8_t GLbyte;
-typedef short GLshort;
-typedef int GLint;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-typedef unsigned short GLushort;
-typedef unsigned int GLuint;
-typedef khronos_float_t GLfloat;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-typedef khronos_int32_t GLclampx;
-
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t GLsizeiptr;
+** Copyright 2013-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: MIT
+**
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+** https://github.com/KhronosGroup/OpenGL-Registry
+*/
+#include <GLES/glplatform.h>
-/*************************************************************/
+/* Generated on date 20211115 */
-/* OpenGL ES core versions */
-#define GL_VERSION_ES_CM_1_0 1
-#define GL_VERSION_ES_CL_1_0 1
-#define GL_VERSION_ES_CM_1_1 1
-#define GL_VERSION_ES_CL_1_1 1
+/* Generated C header for:
+ * API: gles1
+ * Profile: common
+ * Versions considered: .*
+ * Versions emitted: .*
+ * Default extensions included: None
+ * Additional extensions included: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$
+ * Extensions removed: _nomatch_^
+ */
-/* ClearBufferMask */
+#ifndef GL_VERSION_ES_CM_1_0
+#define GL_VERSION_ES_CM_1_0 1
+#include <KHR/khrplatform.h>
+typedef khronos_int8_t GLbyte;
+typedef khronos_float_t GLclampf;
+typedef khronos_int16_t GLshort;
+typedef khronos_uint16_t GLushort;
+typedef void GLvoid;
+typedef unsigned int GLenum;
+typedef khronos_float_t GLfloat;
+typedef khronos_int32_t GLfixed;
+typedef unsigned int GLuint;
+typedef khronos_ssize_t GLsizeiptr;
+typedef khronos_intptr_t GLintptr;
+typedef unsigned int GLbitfield;
+typedef int GLint;
+typedef khronos_uint8_t GLubyte;
+typedef unsigned char GLboolean;
+typedef int GLsizei;
+typedef khronos_int32_t GLclampx;
+#define GL_VERSION_ES_CL_1_0 1
+#define GL_VERSION_ES_CM_1_1 1
+#define GL_VERSION_ES_CL_1_1 1
#define GL_DEPTH_BUFFER_BIT 0x00000100
#define GL_STENCIL_BUFFER_BIT 0x00000400
#define GL_COLOR_BUFFER_BIT 0x00004000
-
-/* Boolean */
#define GL_FALSE 0
#define GL_TRUE 1
-
-/* BeginMode */
#define GL_POINTS 0x0000
#define GL_LINES 0x0001
#define GL_LINE_LOOP 0x0002
@@ -60,8 +64,6 @@
#define GL_TRIANGLES 0x0004
#define GL_TRIANGLE_STRIP 0x0005
#define GL_TRIANGLE_FAN 0x0006
-
-/* AlphaFunction */
#define GL_NEVER 0x0200
#define GL_LESS 0x0201
#define GL_EQUAL 0x0202
@@ -70,8 +72,6 @@
#define GL_NOTEQUAL 0x0205
#define GL_GEQUAL 0x0206
#define GL_ALWAYS 0x0207
-
-/* BlendingFactorDest */
#define GL_ZERO 0
#define GL_ONE 1
#define GL_SRC_COLOR 0x0300
@@ -80,53 +80,18 @@
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
#define GL_DST_ALPHA 0x0304
#define GL_ONE_MINUS_DST_ALPHA 0x0305
-
-/* BlendingFactorSrc */
-/* GL_ZERO */
-/* GL_ONE */
#define GL_DST_COLOR 0x0306
#define GL_ONE_MINUS_DST_COLOR 0x0307
#define GL_SRC_ALPHA_SATURATE 0x0308
-/* GL_SRC_ALPHA */
-/* GL_ONE_MINUS_SRC_ALPHA */
-/* GL_DST_ALPHA */
-/* GL_ONE_MINUS_DST_ALPHA */
-
-/* ClipPlaneName */
#define GL_CLIP_PLANE0 0x3000
#define GL_CLIP_PLANE1 0x3001
#define GL_CLIP_PLANE2 0x3002
#define GL_CLIP_PLANE3 0x3003
#define GL_CLIP_PLANE4 0x3004
#define GL_CLIP_PLANE5 0x3005
-
-/* ColorMaterialFace */
-/* GL_FRONT_AND_BACK */
-
-/* ColorMaterialParameter */
-/* GL_AMBIENT_AND_DIFFUSE */
-
-/* ColorPointerType */
-/* GL_UNSIGNED_BYTE */
-/* GL_FLOAT */
-/* GL_FIXED */
-
-/* CullFaceMode */
#define GL_FRONT 0x0404
#define GL_BACK 0x0405
#define GL_FRONT_AND_BACK 0x0408
-
-/* DepthFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* EnableCap */
#define GL_FOG 0x0B60
#define GL_LIGHTING 0x0B50
#define GL_TEXTURE_2D 0x0DE1
@@ -137,21 +102,12 @@
#define GL_DITHER 0x0BD0
#define GL_STENCIL_TEST 0x0B90
#define GL_DEPTH_TEST 0x0B71
-/* GL_LIGHT0 */
-/* GL_LIGHT1 */
-/* GL_LIGHT2 */
-/* GL_LIGHT3 */
-/* GL_LIGHT4 */
-/* GL_LIGHT5 */
-/* GL_LIGHT6 */
-/* GL_LIGHT7 */
#define GL_POINT_SMOOTH 0x0B10
#define GL_LINE_SMOOTH 0x0B20
#define GL_SCISSOR_TEST 0x0C11
#define GL_COLOR_MATERIAL 0x0B57
#define GL_NORMALIZE 0x0BA1
#define GL_RESCALE_NORMAL 0x803A
-#define GL_POLYGON_OFFSET_FILL 0x8037
#define GL_VERTEX_ARRAY 0x8074
#define GL_NORMAL_ARRAY 0x8075
#define GL_COLOR_ARRAY 0x8076
@@ -160,8 +116,6 @@
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES/glext.h
^
|
@@ -1,519 +1,118 @@
-#ifndef __glext_h_
-#define __glext_h_
-
-/* $Revision: 13240 $ on $Date:: 2010-12-17 15:16:00 -0800 #$ */
+#ifndef __gles1_glext_h_
+#define __gles1_glext_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
+** Copyright 2013-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: MIT
+**
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+** https://github.com/KhronosGroup/OpenGL-Registry
+*/
#ifndef GL_APIENTRYP
-# define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/*------------------------------------------------------------------------*
- * OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_OES_blend_equation_separate */
-#ifndef GL_OES_blend_equation_separate
-/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */
-#define GL_BLEND_EQUATION_RGB_OES 0x8009
-#define GL_BLEND_EQUATION_ALPHA_OES 0x883D
-#endif
-
-/* GL_OES_blend_func_separate */
-#ifndef GL_OES_blend_func_separate
-#define GL_BLEND_DST_RGB_OES 0x80C8
-#define GL_BLEND_SRC_RGB_OES 0x80C9
-#define GL_BLEND_DST_ALPHA_OES 0x80CA
-#define GL_BLEND_SRC_ALPHA_OES 0x80CB
-#endif
-
-/* GL_OES_blend_subtract */
-#ifndef GL_OES_blend_subtract
-#define GL_BLEND_EQUATION_OES 0x8009
-#define GL_FUNC_ADD_OES 0x8006
-#define GL_FUNC_SUBTRACT_OES 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B
-#endif
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_ETC1_RGB8_OES 0x8D64
+#define GL_APIENTRYP GL_APIENTRY*
#endif
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_DEPTH_COMPONENT24_OES 0x81A6
-#endif
+/* Generated on date 20211115 */
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_DEPTH_COMPONENT32_OES 0x81A7
-#endif
+/* Generated C header for:
+ * API: gles1
+ * Profile: common
+ * Versions considered: .*
+ * Versions emitted: _nomatch_^
+ * Default extensions included: gles1
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$
+ */
-/* GL_OES_draw_texture */
-#ifndef GL_OES_draw_texture
-#define GL_TEXTURE_CROP_RECT_OES 0x8B9D
-#endif
+#ifndef GL_KHR_debug
+#define GL_KHR_debug 1
+#endif /* GL_KHR_debug */
-/* GL_OES_EGL_image */
#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
+#define GL_OES_EGL_image 1
+typedef void *GLeglImageOES;
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
#endif
+#endif /* GL_OES_EGL_image */
-/* GL_OES_EGL_image_external */
#ifndef GL_OES_EGL_image_external
-/* GLeglImageOES defined in GL_OES_EGL_image already. */
-#define GL_TEXTURE_EXTERNAL_OES 0x8D65
-#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_UNSIGNED_INT 0x1405
-#endif
-
-/* GL_OES_fixed_point */
-#ifndef GL_OES_fixed_point
-#define GL_FIXED_OES 0x140C
-#endif
-
-/* GL_OES_framebuffer_object */
-#ifndef GL_OES_framebuffer_object
-#define GL_NONE_OES 0
-#define GL_FRAMEBUFFER_OES 0x8D40
-#define GL_RENDERBUFFER_OES 0x8D41
-#define GL_RGBA4_OES 0x8056
-#define GL_RGB5_A1_OES 0x8057
-#define GL_RGB565_OES 0x8D62
-#define GL_DEPTH_COMPONENT16_OES 0x81A5
-#define GL_RENDERBUFFER_WIDTH_OES 0x8D42
-#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3
-#define GL_COLOR_ATTACHMENT0_OES 0x8CE0
-#define GL_DEPTH_ATTACHMENT_OES 0x8D00
-#define GL_STENCIL_ATTACHMENT_OES 0x8D20
-#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9
-#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA
-#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD
-#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6
-#define GL_RENDERBUFFER_BINDING_OES 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8
-#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_WRITE_ONLY_OES 0x88B9
-#define GL_BUFFER_ACCESS_OES 0x88BB
-#define GL_BUFFER_MAPPED_OES 0x88BC
-#define GL_BUFFER_MAP_POINTER_OES 0x88BD
-#endif
-
-/* GL_OES_matrix_get */
-#ifndef GL_OES_matrix_get
-#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
-#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
-#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
-#endif
-
-/* GL_OES_matrix_palette */
-#ifndef GL_OES_matrix_palette
-#define GL_MAX_VERTEX_UNITS_OES 0x86A4
-#define GL_MAX_PALETTE_MATRICES_OES 0x8842
-#define GL_MATRIX_PALETTE_OES 0x8840
-#define GL_MATRIX_INDEX_ARRAY_OES 0x8844
-#define GL_WEIGHT_ARRAY_OES 0x86AD
-#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843
-#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846
-#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847
-#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848
-#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849
-#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E
-#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB
-#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9
-#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA
-#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC
-#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_DEPTH_STENCIL_OES 0x84F9
-#define GL_UNSIGNED_INT_24_8_OES 0x84FA
-#define GL_DEPTH24_STENCIL8_OES 0x88F0
-#endif
-
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES/glplatform.h
^
|
@@ -1,20 +1,17 @@
#ifndef __glplatform_h_
#define __glplatform_h_
-/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
-
/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
+** Copyright 2017-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: Apache-2.0
+*/
/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
*
* Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
+ * Please contribute modifications back to Khronos as pull requests on the
+ * public github repository:
+ * https://github.com/KhronosGroup/OpenGL-Registry
*/
#include <KHR/khrplatform.h>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES2/gl2.h
^
|
@@ -1,56 +1,70 @@
-#ifndef __gl2_h_
-#define __gl2_h_
-
-/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
-
-#include <GLES2/gl2platform.h>
+#ifndef __gles2_gl2_h_
+#define __gles2_gl2_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
+** Copyright 2013-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: MIT
+**
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+** https://github.com/KhronosGroup/OpenGL-Registry
+*/
-/*-------------------------------------------------------------------------
- * Data type definitions
- *-----------------------------------------------------------------------*/
+#include <GLES2/gl2platform.h>
-typedef void GLvoid;
-typedef char GLchar;
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef khronos_int8_t GLbyte;
-typedef short GLshort;
-typedef int GLint;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-typedef unsigned short GLushort;
-typedef unsigned int GLuint;
-typedef khronos_float_t GLfloat;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
+#ifndef GL_APIENTRYP
+#define GL_APIENTRYP GL_APIENTRY*
+#endif
-/* GL types for handling large vertex buffer objects */
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t GLsizeiptr;
+#ifndef GL_GLES_PROTOTYPES
+#define GL_GLES_PROTOTYPES 1
+#endif
-/* OpenGL ES core versions */
-#define GL_ES_VERSION_2_0 1
+/* Generated on date 20211115 */
-/* ClearBufferMask */
+/* Generated C header for:
+ * API: gles2
+ * Profile: common
+ * Versions considered: 2\.[0-9]
+ * Versions emitted: .*
+ * Default extensions included: None
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
+
+#ifndef GL_ES_VERSION_2_0
+#define GL_ES_VERSION_2_0 1
+#include <KHR/khrplatform.h>
+typedef khronos_int8_t GLbyte;
+typedef khronos_float_t GLclampf;
+typedef khronos_int32_t GLfixed;
+typedef khronos_int16_t GLshort;
+typedef khronos_uint16_t GLushort;
+typedef void GLvoid;
+typedef struct __GLsync *GLsync;
+typedef khronos_int64_t GLint64;
+typedef khronos_uint64_t GLuint64;
+typedef unsigned int GLenum;
+typedef unsigned int GLuint;
+typedef char GLchar;
+typedef khronos_float_t GLfloat;
+typedef khronos_ssize_t GLsizeiptr;
+typedef khronos_intptr_t GLintptr;
+typedef unsigned int GLbitfield;
+typedef int GLint;
+typedef unsigned char GLboolean;
+typedef int GLsizei;
+typedef khronos_uint8_t GLubyte;
#define GL_DEPTH_BUFFER_BIT 0x00000100
#define GL_STENCIL_BUFFER_BIT 0x00000400
#define GL_COLOR_BUFFER_BIT 0x00004000
-
-/* Boolean */
#define GL_FALSE 0
#define GL_TRUE 1
-
-/* BeginMode */
#define GL_POINTS 0x0000
#define GL_LINES 0x0001
#define GL_LINE_LOOP 0x0002
@@ -58,18 +72,6 @@
#define GL_TRIANGLES 0x0004
#define GL_TRIANGLE_STRIP 0x0005
#define GL_TRIANGLE_FAN 0x0006
-
-/* AlphaFunction (not supported in ES20) */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* BlendingFactorDest */
#define GL_ZERO 0
#define GL_ONE 1
#define GL_SRC_COLOR 0x0300
@@ -78,29 +80,15 @@
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
#define GL_DST_ALPHA 0x0304
#define GL_ONE_MINUS_DST_ALPHA 0x0305
-
-/* BlendingFactorSrc */
-/* GL_ZERO */
-/* GL_ONE */
#define GL_DST_COLOR 0x0306
#define GL_ONE_MINUS_DST_COLOR 0x0307
#define GL_SRC_ALPHA_SATURATE 0x0308
-/* GL_SRC_ALPHA */
-/* GL_ONE_MINUS_SRC_ALPHA */
-/* GL_DST_ALPHA */
-/* GL_ONE_MINUS_DST_ALPHA */
-
-/* BlendEquationSeparate */
#define GL_FUNC_ADD 0x8006
#define GL_BLEND_EQUATION 0x8009
-#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
+#define GL_BLEND_EQUATION_RGB 0x8009
#define GL_BLEND_EQUATION_ALPHA 0x883D
-
-/* BlendSubtract */
#define GL_FUNC_SUBTRACT 0x800A
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-
-/* Separate Blend Functions */
#define GL_BLEND_DST_RGB 0x80C8
#define GL_BLEND_SRC_RGB 0x80C9
#define GL_BLEND_DST_ALPHA 0x80CA
@@ -110,38 +98,19 @@
#define GL_CONSTANT_ALPHA 0x8003
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
#define GL_BLEND_COLOR 0x8005
-
-/* Buffer Objects */
#define GL_ARRAY_BUFFER 0x8892
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
#define GL_ARRAY_BUFFER_BINDING 0x8894
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-
#define GL_STREAM_DRAW 0x88E0
#define GL_STATIC_DRAW 0x88E4
#define GL_DYNAMIC_DRAW 0x88E8
-
#define GL_BUFFER_SIZE 0x8764
#define GL_BUFFER_USAGE 0x8765
-
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-
-/* CullFaceMode */
#define GL_FRONT 0x0404
#define GL_BACK 0x0405
#define GL_FRONT_AND_BACK 0x0408
-
-/* DepthFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* EnableCap */
#define GL_TEXTURE_2D 0x0DE1
#define GL_CULL_FACE 0x0B44
#define GL_BLEND 0x0BE2
@@ -152,19 +121,13 @@
#define GL_POLYGON_OFFSET_FILL 0x8037
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES2/gl2ext.h
^
|
@@ -1,1253 +1,2250 @@
-#ifndef __gl2ext_h_
-#define __gl2ext_h_
-
-/* $Revision: 18099 $ on $Date:: 2012-06-06 09:16:19 -0700 #$ */
+#ifndef __gles2_gl2ext_h_
+#define __gles2_gl2ext_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
+** Copyright 2013-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: MIT
+**
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+** https://github.com/KhronosGroup/OpenGL-Registry
+*/
#ifndef GL_APIENTRYP
-# define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/*------------------------------------------------------------------------*
- * OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_ETC1_RGB8_OES 0x8D64
+#define GL_APIENTRYP GL_APIENTRY*
#endif
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_PALETTE4_RGB8_OES 0x8B90
-#define GL_PALETTE4_RGBA8_OES 0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
-#define GL_PALETTE4_RGBA4_OES 0x8B93
-#define GL_PALETTE4_RGB5_A1_OES 0x8B94
-#define GL_PALETTE8_RGB8_OES 0x8B95
-#define GL_PALETTE8_RGBA8_OES 0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
-#define GL_PALETTE8_RGBA4_OES 0x8B98
-#define GL_PALETTE8_RGB5_A1_OES 0x8B99
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_DEPTH_COMPONENT24_OES 0x81A6
-#endif
+/* Generated on date 20220330 */
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_DEPTH_COMPONENT32_OES 0x81A7
-#endif
+/* Generated C header for:
+ * API: gles2
+ * Profile: common
+ * Versions considered: 2\.[0-9]
+ * Versions emitted: _nomatch_^
+ * Default extensions included: gles2
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
-/* GL_OES_depth_texture */
-/* No new tokens introduced by this extension. */
+#ifndef GL_KHR_blend_equation_advanced
+#define GL_KHR_blend_equation_advanced 1
+#define GL_MULTIPLY_KHR 0x9294
+#define GL_SCREEN_KHR 0x9295
+#define GL_OVERLAY_KHR 0x9296
+#define GL_DARKEN_KHR 0x9297
+#define GL_LIGHTEN_KHR 0x9298
+#define GL_COLORDODGE_KHR 0x9299
+#define GL_COLORBURN_KHR 0x929A
+#define GL_HARDLIGHT_KHR 0x929B
+#define GL_SOFTLIGHT_KHR 0x929C
+#define GL_DIFFERENCE_KHR 0x929E
+#define GL_EXCLUSION_KHR 0x92A0
+#define GL_HSL_HUE_KHR 0x92AD
+#define GL_HSL_SATURATION_KHR 0x92AE
+#define GL_HSL_COLOR_KHR 0x92AF
+#define GL_HSL_LUMINOSITY_KHR 0x92B0
+typedef void (GL_APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void);
+#endif
+#endif /* GL_KHR_blend_equation_advanced */
+
+#ifndef GL_KHR_blend_equation_advanced_coherent
+#define GL_KHR_blend_equation_advanced_coherent 1
+#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
+#endif /* GL_KHR_blend_equation_advanced_coherent */
+
+#ifndef GL_KHR_context_flush_control
+#define GL_KHR_context_flush_control 1
+#define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB
+#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x82FC
+#endif /* GL_KHR_context_flush_control */
+
+#ifndef GL_KHR_debug
+#define GL_KHR_debug 1
+typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
+#define GL_SAMPLER 0x82E6
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
+#define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245
+#define GL_DEBUG_SOURCE_API_KHR 0x8246
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
+#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249
+#define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A
+#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
+#define GL_DEBUG_TYPE_ERROR_KHR 0x824C
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
+#define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F
+#define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250
+#define GL_DEBUG_TYPE_OTHER_KHR 0x8251
+#define GL_DEBUG_TYPE_MARKER_KHR 0x8268
+#define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269
+#define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A
+#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
+#define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D
+#define GL_BUFFER_KHR 0x82E0
+#define GL_SHADER_KHR 0x82E1
+#define GL_PROGRAM_KHR 0x82E2
+#define GL_VERTEX_ARRAY_KHR 0x8074
+#define GL_QUERY_KHR 0x82E3
+#define GL_PROGRAM_PIPELINE_KHR 0x82E4
+#define GL_SAMPLER_KHR 0x82E6
+#define GL_MAX_LABEL_LENGTH_KHR 0x82E8
+#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143
+#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144
+#define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145
+#define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147
+#define GL_DEBUG_SEVERITY_LOW_KHR 0x9148
+#define GL_DEBUG_OUTPUT_KHR 0x92E0
+#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002
+#define GL_STACK_OVERFLOW_KHR 0x0503
+#define GL_STACK_UNDERFLOW_KHR 0x0504
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
+typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
+typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
+typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
+GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
+GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
+GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params);
+#endif
+#endif /* GL_KHR_debug */
+
+#ifndef GL_KHR_no_error
+#define GL_KHR_no_error 1
+#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
+#endif /* GL_KHR_no_error */
+
+#ifndef GL_KHR_parallel_shader_compile
+#define GL_KHR_parallel_shader_compile 1
+#define GL_MAX_SHADER_COMPILER_THREADS_KHR 0x91B0
+#define GL_COMPLETION_STATUS_KHR 0x91B1
+typedef void (GL_APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSKHRPROC) (GLuint count);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glMaxShaderCompilerThreadsKHR (GLuint count);
+#endif
+#endif /* GL_KHR_parallel_shader_compile */
+
+#ifndef GL_KHR_robust_buffer_access_behavior
+#define GL_KHR_robust_buffer_access_behavior 1
+#endif /* GL_KHR_robust_buffer_access_behavior */
+
+#ifndef GL_KHR_robustness
+#define GL_KHR_robustness 1
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES2/gl2platform.h
^
|
@@ -1,20 +1,17 @@
#ifndef __gl2platform_h_
#define __gl2platform_h_
-/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
-
/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
+** Copyright 2017-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: Apache-2.0
+*/
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
*
* Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
+ * Please contribute modifications back to Khronos as pull requests on the
+ * public github repository:
+ * https://github.com/KhronosGroup/OpenGL-Registry
*/
#include <KHR/khrplatform.h>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES3/gl3.h
^
|
@@ -1,39 +1,18 @@
-#ifndef __gl3_h_
-#define __gl3_h_ 1
+#ifndef __gles2_gl3_h_
+#define __gles2_gl3_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
-** Copyright (c) 2013-2016 The Khronos Group Inc.
+** Copyright 2013-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: MIT
**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
** This header is generated from the Khronos OpenGL / OpenGL ES XML
** API Registry. The current version of the Registry, generator scripts
** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision: 32749 $ on $Date: 2016-04-28 09:03:03 -0700 (Thu, 28 Apr 2016) $
+** https://github.com/KhronosGroup/OpenGL-Registry
*/
#include <GLES3/gl3platform.h>
@@ -42,7 +21,11 @@
#define GL_APIENTRYP GL_APIENTRY*
#endif
-/* Generated on date 20160428 */
+#ifndef GL_GLES_PROTOTYPES
+#define GL_GLES_PROTOTYPES 1
+#endif
+
+/* Generated on date 20211115 */
/* Generated C header for:
* API: gles2
@@ -60,8 +43,8 @@
typedef khronos_int8_t GLbyte;
typedef khronos_float_t GLclampf;
typedef khronos_int32_t GLfixed;
-typedef short GLshort;
-typedef unsigned short GLushort;
+typedef khronos_int16_t GLshort;
+typedef khronos_uint16_t GLushort;
typedef void GLvoid;
typedef struct __GLsync *GLsync;
typedef khronos_int64_t GLint64;
@@ -475,7 +458,7 @@
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
@@ -520,6 +503,7 @@
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
+#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
@@ -617,7 +601,7 @@
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
@@ -662,11 +646,12 @@
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
#endif /* GL_ES_VERSION_2_0 */
#ifndef GL_ES_VERSION_3_0
#define GL_ES_VERSION_3_0 1
-typedef unsigned short GLhalf;
+typedef khronos_uint16_t GLhalf;
#define GL_READ_BUFFER 0x0C02
#define GL_UNPACK_ROW_LENGTH 0x0CF2
#define GL_UNPACK_SKIP_ROWS 0x0CF3
@@ -1064,7 +1049,7 @@
typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);
-typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
@@ -1091,7 +1076,8 @@
typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params);
+#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src);
GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
@@ -1168,7 +1154,7 @@
GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
-GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
@@ -1195,7 +1181,8 @@
GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params);
+#endif
#endif /* GL_ES_VERSION_3_0 */
#ifdef __cplusplus
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES3/gl31.h
^
|
@@ -1,39 +1,18 @@
-#ifndef __gl31_h_
-#define __gl31_h_ 1
+#ifndef __gles2_gl31_h_
+#define __gles2_gl31_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
-** Copyright (c) 2013-2016 The Khronos Group Inc.
+** Copyright 2013-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: MIT
**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
** This header is generated from the Khronos OpenGL / OpenGL ES XML
** API Registry. The current version of the Registry, generator scripts
** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision$ on $Date$
+** https://github.com/KhronosGroup/OpenGL-Registry
*/
#include <GLES3/gl3platform.h>
@@ -42,7 +21,11 @@
#define GL_APIENTRYP GL_APIENTRY*
#endif
-/* Generated on date 20160428 */
+#ifndef GL_GLES_PROTOTYPES
+#define GL_GLES_PROTOTYPES 1
+#endif
+
+/* Generated on date 20191013 */
/* Generated C header for:
* API: gles2
@@ -60,8 +43,8 @@
typedef khronos_int8_t GLbyte;
typedef khronos_float_t GLclampf;
typedef khronos_int32_t GLfixed;
-typedef short GLshort;
-typedef unsigned short GLushort;
+typedef khronos_int16_t GLshort;
+typedef khronos_uint16_t GLushort;
typedef void GLvoid;
typedef struct __GLsync *GLsync;
typedef khronos_int64_t GLint64;
@@ -520,6 +503,7 @@
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
+#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
@@ -662,11 +646,12 @@
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
#endif /* GL_ES_VERSION_2_0 */
#ifndef GL_ES_VERSION_3_0
#define GL_ES_VERSION_3_0 1
-typedef unsigned short GLhalf;
+typedef khronos_uint16_t GLhalf;
#define GL_READ_BUFFER 0x0C02
#define GL_UNPACK_ROW_LENGTH 0x0CF2
#define GL_UNPACK_SKIP_ROWS 0x0CF3
@@ -1092,6 +1077,7 @@
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src);
GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
@@ -1196,6 +1182,7 @@
GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+#endif
#endif /* GL_ES_VERSION_3_0 */
#ifndef GL_ES_VERSION_3_1
@@ -1441,6 +1428,7 @@
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
typedef void (GL_APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
+#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect);
GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
@@ -1509,6 +1497,7 @@
GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
+#endif
#endif /* GL_ES_VERSION_3_1 */
#ifdef __cplusplus
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES3/gl32.h
^
|
@@ -1,39 +1,18 @@
-#ifndef __gl32_h_
-#define __gl32_h_ 1
+#ifndef __gles2_gl32_h_
+#define __gles2_gl32_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
-** Copyright (c) 2013-2016 The Khronos Group Inc.
+** Copyright 2013-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: MIT
**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
** This header is generated from the Khronos OpenGL / OpenGL ES XML
** API Registry. The current version of the Registry, generator scripts
** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision$ on $Date$
+** https://github.com/KhronosGroup/OpenGL-Registry
*/
#include <GLES3/gl3platform.h>
@@ -42,7 +21,11 @@
#define GL_APIENTRYP GL_APIENTRY*
#endif
-/* Generated on date 20160428 */
+#ifndef GL_GLES_PROTOTYPES
+#define GL_GLES_PROTOTYPES 1
+#endif
+
+/* Generated on date 20191013 */
/* Generated C header for:
* API: gles2
@@ -60,8 +43,8 @@
typedef khronos_int8_t GLbyte;
typedef khronos_float_t GLclampf;
typedef khronos_int32_t GLfixed;
-typedef short GLshort;
-typedef unsigned short GLushort;
+typedef khronos_int16_t GLshort;
+typedef khronos_uint16_t GLushort;
typedef void GLvoid;
typedef struct __GLsync *GLsync;
typedef khronos_int64_t GLint64;
@@ -520,6 +503,7 @@
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
+#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
@@ -662,11 +646,12 @@
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
#endif /* GL_ES_VERSION_2_0 */
#ifndef GL_ES_VERSION_3_0
#define GL_ES_VERSION_3_0 1
-typedef unsigned short GLhalf;
+typedef khronos_uint16_t GLhalf;
#define GL_READ_BUFFER 0x0C02
#define GL_UNPACK_ROW_LENGTH 0x0CF2
#define GL_UNPACK_SKIP_ROWS 0x0CF3
@@ -1092,6 +1077,7 @@
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src);
GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
@@ -1196,6 +1182,7 @@
GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+#endif
#endif /* GL_ES_VERSION_3_0 */
#ifndef GL_ES_VERSION_3_1
@@ -1441,6 +1428,7 @@
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
typedef void (GL_APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
+#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect);
GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
@@ -1509,6 +1497,7 @@
GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
+#endif
#endif /* GL_ES_VERSION_3_1 */
#ifndef GL_ES_VERSION_3_2
@@ -1764,6 +1753,7 @@
typedef void (GL_APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glBlendBarrier (void);
GL_APICALL void GL_APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
@@ -1808,6 +1798,7 @@
GL_APICALL void GL_APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
GL_APICALL void GL_APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
GL_APICALL void GL_APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+#endif
#endif /* GL_ES_VERSION_3_2 */
#ifdef __cplusplus
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/GLES3/gl3platform.h
^
|
@@ -1,20 +1,17 @@
#ifndef __gl3platform_h_
#define __gl3platform_h_
-/* $Revision: 23328 $ on $Date:: 2013-10-02 02:28:28 -0700 #$ */
-
/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
+** Copyright 2017-2020 The Khronos Group Inc.
+** SPDX-License-Identifier: Apache-2.0
+*/
/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h
*
* Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
+ * Please contribute modifications back to Khronos as pull requests on the
+ * public github repository:
+ * https://github.com/KhronosGroup/OpenGL-Registry
*/
#include <KHR/khrplatform.h>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/KHR/khrplatform.h
^
|
@@ -153,6 +153,20 @@
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
+/*
+ * To support platform where unsigned long cannot be used interchangeably with
+ * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
+ * Ideally, we could just use (u)intptr_t everywhere, but this could result in
+ * ABI breakage if khronos_uintptr_t is changed from unsigned long to
+ * unsigned long long or similar (this results in different C++ name mangling).
+ * To avoid changes for existing platforms, we restrict usage of intptr_t to
+ * platforms where the size of a pointer is larger than the size of long.
+ */
+#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
+#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
+#define KHRONOS_USE_INTPTR_T
+#endif
+#endif
#elif defined(__VMS ) || defined(__sgi)
@@ -235,14 +249,21 @@
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
* to be the only LLP64 architecture in current use.
*/
-#ifdef _WIN64
+#ifdef KHRONOS_USE_INTPTR_T
+typedef intptr_t khronos_intptr_t;
+typedef uintptr_t khronos_uintptr_t;
+#elif defined(_WIN64)
typedef signed long long int khronos_intptr_t;
typedef unsigned long long int khronos_uintptr_t;
-typedef signed long long int khronos_ssize_t;
-typedef unsigned long long int khronos_usize_t;
#else
typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t;
+#endif
+
+#if defined(_WIN64)
+typedef signed long long int khronos_ssize_t;
+typedef unsigned long long int khronos_usize_t;
+#else
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/Makefile.am
^
|
@@ -23,7 +23,6 @@
GLES3/gl3.h \
GLES3/gl31.h \
GLES3/gl32.h \
- GLES3/gl3ext.h \
GLES3/gl3platform.h
khrincludedir = $(includedir)/KHR
@@ -36,17 +35,10 @@
CL/cl_gl_ext.h \
CL/cl_gl.h \
CL/cl.h \
- CL/cl.hpp \
CL/cl_platform.h \
+ CL/cl_version.h \
CL/opencl.h
-vgincludedir = $(includedir)/VG
-vginclude_HEADERS = \
- VG/openvg.h \
- VG/vgext.h \
- VG/vgplatform.h \
- VG/vgu.h
-
uiincludedir = $(includedir)/hybris/ui
uiinclude_HEADERS = \
hybris/ui/ui_compatibility_layer.h
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/hybris/gralloc/gralloc.h
^
|
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 2018-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
#ifndef hybris_gralloc_header_include_guard__
#define hybris_gralloc_header_include_guard__
@@ -12,6 +29,7 @@
void hybris_gralloc_initialize(int framebuffer);
void hybris_gralloc_deinitialize(void);
int hybris_gralloc_release(buffer_handle_t handle, int was_allocated);
+int hybris_gralloc_import_buffer(buffer_handle_t raw_handle, buffer_handle_t* out_handle);
int hybris_gralloc_retain(buffer_handle_t handle);
int hybris_gralloc_allocate(int width, int height, int format, int usage, buffer_handle_t *handle, uint32_t *stride);
int hybris_gralloc_lock(buffer_handle_t handle, int usage, int l, int t, int w, int h, void **vaddr);
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/hybris/ui/ui.h
^
|
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef hybris_ui_header_include_guard__
+#define hybris_ui_header_include_guard__
+
+#include <stdbool.h>
+#include <hybris/ui/ui_compatibility_layer.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void hybris_ui_initialize();
+bool hybris_ui_check_for_symbol(const char *sym);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // hybris_ui_header_include_guard__
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/include/hybris/ui/ui_compatibility_layer.h
^
|
@@ -57,6 +57,31 @@
int graphic_buffer_init_check(struct graphic_buffer *buffer);
+#if ANDROID_VERSION_MAJOR>=10
+ typedef int32_t status_t;
+ typedef int32_t PixelFormat;
+
+ status_t graphic_buffer_allocator_allocate(uint32_t width, uint32_t height,
+ PixelFormat format, uint32_t layerCount, uint64_t usage,
+ buffer_handle_t* handle, uint32_t* stride,
+ uint64_t graphicBufferId, const char* requestorName);
+ status_t graphic_buffer_allocator_free(buffer_handle_t handle);
+
+ status_t graphic_buffer_mapper_import_buffer(buffer_handle_t rawHandle,
+ uint32_t width, uint32_t height, uint32_t layerCount,
+ PixelFormat format, uint64_t usage, uint32_t stride,
+ buffer_handle_t* outHandle);
+ status_t graphic_buffer_mapper_import_buffer_no_size(buffer_handle_t rawHandle,
+ buffer_handle_t* outHandle);
+
+ status_t graphic_buffer_mapper_free_buffer(buffer_handle_t handle);
+
+ status_t graphic_buffer_mapper_lock(buffer_handle_t handle, uint32_t usage, const ARect* bounds,
+ void** vaddr, int32_t* outBytesPerPixel,
+ int32_t* outBytesPerStride);
+ status_t graphic_buffer_mapper_unlock(buffer_handle_t handle);
+#endif
+
#ifdef __cplusplus
}
#endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/Makefile.am
^
|
@@ -0,0 +1 @@
+SUBDIRS = common
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/Makefile.am
^
|
@@ -0,0 +1,85 @@
+lib_LTLIBRARIES = \
+ libhybris-platformcommon.la
+
+libhybris_platformcommon_la_SOURCES = \
+ nativewindowbase.cpp \
+ platformcommon.cpp \
+ windowbuffer.cpp
+
+if WANT_WAYLAND
+
+libhybris_platformcommon_la_SOURCES += \
+ server_wlegl.cpp \
+ server_wlegl_handle.cpp \
+ server_wlegl_buffer.cpp \
+ wayland-android-protocol.c
+
+BUILT_SOURCES = wayland-android-protocol.c \
+ wayland-android-client-protocol.h \
+ wayland-android-server-protocol.h
+
+%-protocol.c : %.xml
+ $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
+
+%-server-protocol.h : %.xml
+ $(AM_V_GEN)$(WAYLAND_SCANNER) server-header < $< > $@
+
+%-client-protocol.h : %.xml
+ $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
+
+endif
+
+libhybris_platformcommon_la_CFLAGS = -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/common/
+if WANT_WAYLAND
+libhybris_platformcommon_la_CFLAGS += $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) $(ANDROID_HEADERS_CFLAGS)
+endif
+
+if WANT_MESA
+libhybris_platformcommon_la_CFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
+endif
+if WANT_TRACE
+libhybris_platformcommon_la_CFLAGS += -DDEBUG
+endif
+if WANT_DEBUG
+libhybris_platformcommon_la_CFLAGS += -ggdb -O0
+endif
+
+
+libhybris_platformcommon_la_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/egl $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/common/
+if WANT_MESA
+libhybris_platformcommon_la_CXXFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
+endif
+
+if WANT_WAYLAND
+libhybris_platformcommon_la_CXXFLAGS += $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) $(ANDROID_HEADERS_CFLAGS)
+endif
+
+if WANT_TRACE
+libhybris_platformcommon_la_CXXFLAGS += -DDEBUG
+endif
+if WANT_DEBUG
+libhybris_platformcommon_la_CXXFLAGS += -ggdb -O0
+endif
+libhybris_platformcommon_la_LDFLAGS = \
+ $(top_builddir)/common/libhybris-common.la \
+ -version-info "1":"0":"0"
+
+if HAS_ANDROID_4_2_0
+libhybris_platformcommon_la_LDFLAGS += $(top_builddir)/libsync/libsync.la
+endif
+
+if HAS_ANDROID_5_0_0
+libhybris_platformcommon_la_LDFLAGS += $(top_builddir)/libsync/libsync.la
+endif
+
+
+platformcommondir = $(includedir)/hybris/platformcommon
+platformcommon_HEADERS = \
+ support.h \
+ nativewindowbase.h
+
+if WANT_WAYLAND
+libhybris_platformcommon_la_LDFLAGS += \
+ $(WAYLAND_CLIENT_LIBS) \
+ $(WAYLAND_SERVER_LIBS)
+endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/nativewindowbase.cpp
^
|
@@ -0,0 +1,454 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_BUILD
+#include <android-config.h>
+#include "logging.h"
+#else
+#define TRACE(message, ...)
+#endif
+
+#include <string.h>
+#include <system/window.h>
+#include <system/graphics.h>
+#include <hardware/gralloc.h>
+#include "support.h"
+#include <stdarg.h>
+
+#if ANDROID_VERSION_MAJOR>=4 && ANDROID_VERSION_MINOR>=2 || ANDROID_VERSION_MAJOR>=5
+extern "C" {
+#include <sync/sync.h>
+}
+#endif
+
+#ifdef ANDROID_BUILD
+#define HYBRIS_TRACE_BEGIN(...)
+#define HYBRIS_TRACE_END(...)
+#endif
+
+#include "nativewindowbase.h"
+
+BaseNativeWindowBuffer::BaseNativeWindowBuffer()
+{
+ TRACE("%p", this);
+
+ // done in ANativeWindowBuffer::ANativeWindowBuffer
+ // common.magic = ANDROID_NATIVE_WINDOW_MAGIC;
+ // common.version = sizeof(ANativeWindow);
+ // memset(common.reserved, 0, sizeof(window->native.common.reserved));
+
+ ANativeWindowBuffer::common.decRef = _decRef;
+ ANativeWindowBuffer::common.incRef = _incRef;
+ ANativeWindowBuffer::width = 0;
+ ANativeWindowBuffer::height = 0;
+ ANativeWindowBuffer::stride = 0;
+ ANativeWindowBuffer::format = 0;
+ ANativeWindowBuffer::usage = 0;
+ ANativeWindowBuffer::handle = 0;
+
+ refcount = 0;
+}
+
+
+BaseNativeWindowBuffer::~BaseNativeWindowBuffer()
+{
+ TRACE("%p", this);
+
+ ANativeWindowBuffer::common.decRef = NULL;
+ ANativeWindowBuffer::common.incRef = NULL;
+ refcount = 0;
+}
+
+
+void BaseNativeWindowBuffer::_decRef(struct android_native_base_t* base)
+{
+ ANativeWindowBuffer* self = container_of(base, ANativeWindowBuffer, common);
+ BaseNativeWindowBuffer* bnwb = static_cast<BaseNativeWindowBuffer*>(self) ;
+
+ TRACE("%p refcount = %i",bnwb, bnwb->refcount - 1);
+
+ if (__sync_fetch_and_sub(&bnwb->refcount,1) == 1)
+ {
+ delete bnwb;
+ }
+}
+
+
+
+void BaseNativeWindowBuffer::_incRef(struct android_native_base_t* base)
+{
+ ANativeWindowBuffer* self = container_of(base, ANativeWindowBuffer, common);
+ BaseNativeWindowBuffer* bnwb= static_cast<BaseNativeWindowBuffer*>(self) ;
+
+ TRACE("%p refcount = %i", bnwb, bnwb->refcount + 1);
+ __sync_fetch_and_add(&bnwb->refcount,1);
+}
+
+ANativeWindowBuffer* BaseNativeWindowBuffer::getNativeBuffer() const
+{
+ return static_cast<ANativeWindowBuffer*>(const_cast<BaseNativeWindowBuffer*>(this));
+}
+
+BaseNativeWindow::BaseNativeWindow()
+{
+ TRACE("this=%p or A %p", this, (ANativeWindow*)this);
+ // done in ANativeWindow
+ // common.magic = ANDROID_NATIVE_WINDOW_MAGIC;
+ // common.version = sizeof(ANativeWindow);
+ // memset(common.reserved, 0, sizeof(window->native.common.reserved));
+ ANativeWindow::common.decRef = _decRef;
+ ANativeWindow::common.incRef = _incRef;
+
+ const_cast<uint32_t&>(ANativeWindow::flags) = 0;
+ const_cast<float&>(ANativeWindow::xdpi) = 0;
+ const_cast<float&>(ANativeWindow::ydpi) = 0;
+ const_cast<int&>(ANativeWindow::minSwapInterval) = 0;
+ const_cast<int&>(ANativeWindow::maxSwapInterval) = 0;
+
+ ANativeWindow::setSwapInterval = _setSwapInterval;
+
+#if ANDROID_VERSION_MAJOR>=4 && ANDROID_VERSION_MINOR>=2 || ANDROID_VERSION_MAJOR>=5
+ ANativeWindow::lockBuffer_DEPRECATED = &_lockBuffer_DEPRECATED;
+ ANativeWindow::dequeueBuffer_DEPRECATED = &_dequeueBuffer_DEPRECATED;
+ ANativeWindow::queueBuffer_DEPRECATED = &_queueBuffer_DEPRECATED;
+ ANativeWindow::cancelBuffer_DEPRECATED = &_cancelBuffer_DEPRECATED;
+ ANativeWindow::queueBuffer = &_queueBuffer;
+ ANativeWindow::dequeueBuffer = &_dequeueBuffer;
+ ANativeWindow::cancelBuffer = &_cancelBuffer;
+#else
+ ANativeWindow::lockBuffer = &_lockBuffer_DEPRECATED;
+ ANativeWindow::dequeueBuffer = &_dequeueBuffer_DEPRECATED;
+ ANativeWindow::queueBuffer = &_queueBuffer_DEPRECATED;
+ ANativeWindow::cancelBuffer = &_cancelBuffer_DEPRECATED;
+#endif
+ ANativeWindow::query = &_query;
+ ANativeWindow::perform = &_perform;
+
+ refcount = 0;
+}
+
+BaseNativeWindow::~BaseNativeWindow()
+{
+ TRACE("");
+ ANativeWindow::common.decRef = NULL;
+ ANativeWindow::common.incRef = NULL;
+ refcount = 0;
+}
+
+void BaseNativeWindow::_decRef(struct android_native_base_t* base)
+{
+ ANativeWindow* self = container_of(base, ANativeWindow, common);
+ BaseNativeWindow* bnw = static_cast<BaseNativeWindow*>(self);
+
+ TRACE("%p refcount = %i", bnw, bnw->refcount - 1);
+
+ if (__sync_fetch_and_sub(&bnw->refcount,1) == 1)
+ {
+ delete bnw;
+ }
+}
+
+void BaseNativeWindow::_incRef(struct android_native_base_t* base)
+{
+ ANativeWindow* self = container_of(base, ANativeWindow, common);
+ BaseNativeWindow* bnw = static_cast<BaseNativeWindow*>(self);
+
+ TRACE("%p refcount = %i", bnw, bnw->refcount + 1);
+
+
+ __sync_fetch_and_add(&bnw->refcount,1);
+}
+
+int BaseNativeWindow::_setSwapInterval(struct ANativeWindow* window, int interval)
+{
+ return static_cast<BaseNativeWindow*>(window)->setSwapInterval(interval);
+}
+
+int BaseNativeWindow::_dequeueBuffer_DEPRECATED(ANativeWindow* window, ANativeWindowBuffer** buffer)
+{
+ BaseNativeWindowBuffer* temp = static_cast<BaseNativeWindowBuffer*>(*buffer);
+ int fenceFd = -1;
+ int ret = static_cast<BaseNativeWindow*>(window)->dequeueBuffer(&temp, &fenceFd);
+
+ *buffer = static_cast<ANativeWindowBuffer*>(temp);
+
+#if ANDROID_VERSION_MAJOR>=4 && ANDROID_VERSION_MINOR>=2 || ANDROID_VERSION_MAJOR>=5
+ if (fenceFd >= 0)
+ {
+ sync_wait(fenceFd, -1);
+ close(fenceFd);
+ }
+#endif
+
+ return ret;
+}
+
+int BaseNativeWindow::_dequeueBuffer(struct ANativeWindow *window, ANativeWindowBuffer **buffer, int *fenceFd)
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/nativewindowbase.h
^
|
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef NATIVEWINDOWBASE_H
+#define NATIVEWINDOWBASE_H
+
+/* for ICS window.h */
+#include <string.h>
+#include <system/window.h>
+#include "support.h"
+#include <stdarg.h>
+#include <assert.h>
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+#define NO_ERROR 0L
+#define BAD_VALUE -1
+
+/**
+ * @brief A Class to do common ANativeBuffer initialization and thunk c-style
+ * callbacks into C++ method calls.
+ **/
+class BaseNativeWindowBuffer : public ANativeWindowBuffer
+{
+protected:
+ BaseNativeWindowBuffer();
+ virtual ~BaseNativeWindowBuffer() ;
+
+public:
+ /* When passing the buffer to EGL functions it's required to pass always the native
+ * buffer. This method takes care about proper casting. */
+ ANativeWindowBuffer* getNativeBuffer() const;
+
+private:
+ unsigned int refcount;
+ static void _decRef(struct android_native_base_t* base);
+ static void _incRef(struct android_native_base_t* base);
+};
+
+/**
+ * @brief A Class to do common ANativeWindow initialization and thunk c-style
+ * callbacks into C++ method calls.
+ **/
+class BaseNativeWindow : public ANativeWindow
+{
+protected:
+ BaseNativeWindow();
+ virtual ~BaseNativeWindow();
+
+ // does this require more magic?
+ unsigned int refcount;
+ static void _decRef(struct android_native_base_t* base);
+ static void _incRef(struct android_native_base_t* base);
+
+ // these have to be implemented in the concrete implementation, eg. FBDEV or offscreen window
+ virtual int setSwapInterval(int interval) = 0;
+
+ virtual int dequeueBuffer(BaseNativeWindowBuffer **buffer, int *fenceFd) = 0;
+ virtual int queueBuffer(BaseNativeWindowBuffer *buffer, int fenceFd) = 0;
+ virtual int cancelBuffer(BaseNativeWindowBuffer *buffer, int fenceFd) = 0;
+ virtual int lockBuffer(BaseNativeWindowBuffer *buffer) = 0; // DEPRECATED
+
+ virtual unsigned int type() const = 0;
+ virtual unsigned int width() const = 0;
+ virtual unsigned int height() const = 0;
+ virtual unsigned int format() const = 0;
+ virtual unsigned int defaultWidth() const = 0;
+ virtual unsigned int defaultHeight() const = 0;
+ virtual unsigned int queueLength() const = 0;
+ virtual unsigned int transformHint() const = 0;
+ virtual unsigned int getUsage() const = 0;
+ //perform interfaces
+ virtual int setBuffersFormat(int format) = 0;
+ virtual int setBuffersDimensions(int width, int height) = 0;
+ virtual int setUsage(uint64_t usage) = 0;
+ virtual int setBufferCount(int cnt) = 0;
+private:
+ static int _setSwapInterval(struct ANativeWindow* window, int interval);
+ static int _dequeueBuffer_DEPRECATED(ANativeWindow* window, ANativeWindowBuffer** buffer);
+ static const char *_native_window_operation(int what);
+ static const char *_native_query_operation(int what);
+ static int _lockBuffer_DEPRECATED(struct ANativeWindow* window, ANativeWindowBuffer* buffer);
+ static int _queueBuffer_DEPRECATED(struct ANativeWindow* window, ANativeWindowBuffer* buffer);
+ static int _query(const struct ANativeWindow* window, int what, int* value);
+ static int _perform(struct ANativeWindow* window, int operation, ... );
+ static int _cancelBuffer_DEPRECATED(struct ANativeWindow* window, ANativeWindowBuffer* buffer);
+ static int _queueBuffer(struct ANativeWindow *window, ANativeWindowBuffer *buffer, int fenceFd);
+ static int _dequeueBuffer(struct ANativeWindow *window, ANativeWindowBuffer **buffer, int *fenceFd);
+ static int _cancelBuffer(struct ANativeWindow *window, ANativeWindowBuffer *buffer, int fenceFd);
+};
+
+#endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/platformcommon.cpp
^
|
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <android-config.h>
+#include <stdlib.h>
+#include <dlfcn.h>
+#include <string.h>
+#include <stdio.h>
+#include "config.h"
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include "logging.h"
+
+#include "windowbuffer.h"
+
+#include <hybris/gralloc/gralloc.h>
+
+extern "C" void hybris_dump_buffer_to_file(ANativeWindowBuffer *buf)
+{
+ static int cnt = 0;
+ void *vaddr;
+ int ret = hybris_gralloc_lock(buf->handle, buf->usage, 0, 0, buf->width, buf->height, &vaddr);
+ (void)ret;
+ TRACE("buf:%p gralloc lock returns %i", buf, ret);
+ TRACE("buf:%p lock to vaddr %p", buf, vaddr);
+ char b[1024];
+ int bytes_pp = 0;
+
+ if (buf->format == HAL_PIXEL_FORMAT_RGBA_8888 || buf->format == HAL_PIXEL_FORMAT_BGRA_8888)
+ bytes_pp = 4;
+ else if (buf->format == HAL_PIXEL_FORMAT_RGB_565)
+ bytes_pp = 2;
+
+ snprintf(b, 1020, "vaddr.%p.%p.%i.%is%ix%ix%i", buf, vaddr, cnt, buf->width, buf->stride, buf->height, bytes_pp);
+ cnt++;
+ int fd = ::open(b, O_WRONLY|O_CREAT, S_IRWXU);
+ if(fd < 0)
+ return;
+ if (::write(fd, vaddr, buf->stride * buf->height * bytes_pp) < 0)
+ TRACE("dump buffer to file failed with error %i", errno);
+ ::close(fd);
+ hybris_gralloc_unlock(buf->handle);
+}
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/platformcommon.h
^
|
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012 Simon Busch <morphis@gravedo.de>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef PLATFORM_COMMON_H_
+#define PLATFORM_COMMON_H_
+
+/* Needed for ICS window.h */
+#include <string.h>
+#include <system/window.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void hybris_dump_buffer_to_file(struct ANativeWindowBuffer *buf);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/server_wlegl.cpp
^
|
@@ -0,0 +1,210 @@
+/*
+ * Copyright © 2012 Collabora, Ltd.
+ * Copyright © 2022 Jolla Ltd.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of the copyright holders not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. The copyright holders make
+ * no representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <android-config.h>
+#include <cstring>
+
+extern "C" {
+#include <cutils/native_handle.h>
+}
+
+#include "logging.h"
+
+#include <wayland-server.h>
+#include "wayland-android-server-protocol.h"
+#include "server_wlegl_private.h"
+#include "server_wlegl_handle.h"
+#include "server_wlegl_buffer.h"
+
+#include <hybris/gralloc/gralloc.h>
+
+static inline server_wlegl *
+server_wlegl_from(struct wl_resource *resource)
+{
+ return reinterpret_cast<server_wlegl *>(wl_resource_get_user_data(resource));
+}
+
+static void
+server_wlegl_create_handle(struct wl_client *client,
+ struct wl_resource *resource,
+ uint32_t id,
+ int32_t num_fds,
+ struct wl_array *ints)
+{
+ server_wlegl_handle *handle;
+
+ if (num_fds < 0) {
+ wl_resource_post_error(resource,
+ ANDROID_WLEGL_ERROR_BAD_VALUE,
+ "num_fds is negative: %d", num_fds);
+ return;
+ }
+
+ handle = server_wlegl_handle_create(id);
+ wl_array_copy(&handle->ints, ints);
+ handle->num_fds = num_fds;
+ wl_client_add_resource(client, &handle->resource);
+}
+
+static void
+server_wlegl_create_buffer(struct wl_client *client,
+ struct wl_resource *resource,
+ uint32_t id,
+ int32_t width,
+ int32_t height,
+ int32_t stride,
+ int32_t format,
+ int32_t usage,
+ struct wl_resource *hnd)
+{
+ server_wlegl *wlegl = server_wlegl_from(resource);
+ server_wlegl_handle *handle = server_wlegl_handle_from(hnd);
+ server_wlegl_buffer *buffer;
+ buffer_handle_t native;
+
+ if (width < 1 || height < 1) {
+ wl_resource_post_error(resource,
+ ANDROID_WLEGL_ERROR_BAD_VALUE,
+ "bad width (%d) or height (%d)",
+ width, height);
+ return;
+ }
+
+ native = server_wlegl_handle_to_native(handle);
+ if (!native) {
+ wl_resource_post_error(resource,
+ ANDROID_WLEGL_ERROR_BAD_HANDLE,
+ "fd count mismatch");
+ return;
+ }
+
+ buffer = server_wlegl_buffer_create(client, id, width, height, stride,
+ format, usage, native, wlegl);
+ // hybris_gralloc_import_buffer copied the raw handle
+ native_handle_close((native_handle_t *)native);
+ native_handle_delete((native_handle_t *)native);
+
+ if (!buffer) {
+ wl_resource_post_error(resource,
+ ANDROID_WLEGL_ERROR_BAD_HANDLE,
+ "invalid native handle");
+ return;
+ }
+}
+
+static void
+server_wlegl_get_server_buffer_handle(wl_client *client, wl_resource *res, uint32_t id, int32_t width, int32_t height, int32_t format, int32_t usage)
+{
+ if (width == 0 || height == 0) {
+ wl_resource_post_error(res, 0, "invalid buffer size: %u,%u\n", width, height);
+ return;
+ }
+
+ server_wlegl *wlegl = server_wlegl_from(res);
+
+ wl_resource *resource = wl_resource_create(client, &android_wlegl_server_buffer_handle_interface, wl_resource_get_version(res), id);
+
+ buffer_handle_t _handle;
+ int _stride;
+
+ usage |= GRALLOC_USAGE_HW_COMPOSER;
+
+ // frameworks/native/libs/gui/BufferQueueProducer.cpp:1434 (android-11.0.0_r37)
+ // TODO: do we need to specify a different default format in some cases?
+ // This avoids a crash if the pixel format is unspecified.
+ // Initially i chose HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, but the documentation
+ // for the pixel formats says about the IMPLEMENTATION_DEFINED format:
+ // "This format must never be used with any of the BufferUsage::CPU_* usage flags."
+ // (hardware/interfaces/graphics/common/1.0/types.hal).
+ // The default in android seems to be RGBA_8888 if format == 0 (unless changed,
+ // via a call to setDefaultBufferFormat), so let's just use RGBA_8888 for now such
+ // that we don't need to analyze the usage flags.
+ if (format == 0) format = HAL_PIXEL_FORMAT_RGBA_8888;
+
+ int r = hybris_gralloc_allocate(width, height, format, usage, &_handle, (uint32_t*)&_stride);
+ if (r) {
+ HYBRIS_ERROR_LOG(SERVER_WLEGL, "failed to allocate buffer\n");
+ }
+ server_wlegl_buffer *buffer = server_wlegl_buffer_create_server(client, width, height, _stride, format, usage, _handle, wlegl);
+
+ struct wl_array ints;
+ int *ints_data;
+ wl_array_init(&ints);
+ ints_data = (int*) wl_array_add(&ints, _handle->numInts * sizeof(int));
+ memcpy(ints_data, _handle->data + _handle->numFds, _handle->numInts * sizeof(int));
+
+ android_wlegl_server_buffer_handle_send_buffer_ints(resource, &ints);
+ wl_array_release(&ints);
+
+ for (int i = 0; i < _handle->numFds; i++) {
+ android_wlegl_server_buffer_handle_send_buffer_fd(resource, _handle->data[i]);
+ }
+
+ android_wlegl_server_buffer_handle_send_buffer(resource, buffer->resource, format, _stride);
+ wl_resource_destroy(resource);
+}
+
+static const struct android_wlegl_interface server_wlegl_impl = {
+ server_wlegl_create_handle,
+ server_wlegl_create_buffer,
+ server_wlegl_get_server_buffer_handle,
+};
+
+static void
+server_wlegl_bind(struct wl_client *client, void *data,
+ uint32_t version, uint32_t id)
+{
+ server_wlegl *wlegl = reinterpret_cast<server_wlegl *>(data);
+ struct wl_resource *resource;
+
+ resource = wl_resource_create(client, &android_wlegl_interface, version, id);
+ wl_resource_set_implementation(resource, &server_wlegl_impl, wlegl, 0);
+}
+
+server_wlegl *
+server_wlegl_create(struct wl_display *display)
+{
+ struct server_wlegl *wlegl;
+
+ wlegl = new server_wlegl;
+
+ wlegl->display = display;
+ wlegl->global = wl_global_create(display, &android_wlegl_interface, 2,
+ wlegl, server_wlegl_bind);
+
+ return wlegl;
+}
+
+void
+server_wlegl_destroy(server_wlegl *wlegl)
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/server_wlegl.h
^
|
@@ -0,0 +1,44 @@
+/*
+ * Copyright © 2012 Collabora, Ltd.
+ * Copyright © 2022 Jolla Ltd.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of the copyright holders not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. The copyright holders make
+ * no representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef SERVER_WLEGL_H
+#define SERVER_WLEGL_H
+
+#include <system/window.h>
+
+extern "C" {
+
+struct wl_display;
+struct wl_buffer;
+
+}
+
+struct server_wlegl;
+
+server_wlegl *
+server_wlegl_create(struct wl_display *wldpy);
+
+void
+server_wlegl_destroy(server_wlegl *wlegl);
+
+#endif /* SERVER_WLEGL_H */
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/server_wlegl_buffer.cpp
^
|
@@ -0,0 +1,109 @@
+/*
+ * Copyright © 2012 Collabora, Ltd.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of the copyright holders not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. The copyright holders make
+ * no representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <android-config.h>
+#include <cstring>
+#include <cassert>
+
+#include "server_wlegl_buffer.h"
+#include "server_wlegl_private.h"
+
+#include <hybris/gralloc/gralloc.h>
+
+static void
+destroy(struct wl_client *client, struct wl_resource *resource)
+{
+ wl_resource_destroy(resource);
+}
+
+static const struct wl_buffer_interface server_wlegl_buffer_impl = {
+ destroy
+};
+
+server_wlegl_buffer *
+server_wlegl_buffer_from(struct wl_resource *buffer)
+{
+ return static_cast<server_wlegl_buffer *>(wl_resource_get_user_data(buffer));
+}
+
+static void
+server_wlegl_buffer_dtor(struct wl_resource *resource)
+{
+ server_wlegl_buffer *buffer = server_wlegl_buffer_from(resource);
+ buffer->buf->common.decRef(&buffer->buf->common);
+ delete buffer;
+}
+
+server_wlegl_buffer *
+server_wlegl_buffer_create(wl_client *client,
+ uint32_t id,
+ int32_t width,
+ int32_t height,
+ int32_t stride,
+ int32_t format,
+ int32_t usage,
+ buffer_handle_t handle,
+ server_wlegl *wlegl)
+{
+ server_wlegl_buffer *buffer = new server_wlegl_buffer;
+ int ret;
+
+ buffer->wlegl = wlegl;
+ buffer->resource = wl_resource_create(client, &wl_buffer_interface, 1, id);
+ wl_resource_set_implementation(buffer->resource, &server_wlegl_buffer_impl, buffer, server_wlegl_buffer_dtor);
+
+ const native_handle_t* out_handle = NULL;
+ ret = hybris_gralloc_import_buffer(handle, &out_handle);
+ if (ret) {
+ delete buffer;
+ return NULL;
+ }
+
+ buffer->buf = new RemoteWindowBuffer(
+ width, height, stride, format, usage, out_handle);
+ buffer->buf->common.incRef(&buffer->buf->common);
+ return buffer;
+}
+
+server_wlegl_buffer *
+server_wlegl_buffer_create_server(wl_client *client,
+ int32_t width,
+ int32_t height,
+ int32_t stride,
+ int32_t format,
+ int32_t usage,
+ buffer_handle_t handle,
+ server_wlegl *wlegl)
+{
+ server_wlegl_buffer *buffer = new server_wlegl_buffer;
+
+ buffer->wlegl = wlegl;
+ buffer->resource = wl_resource_create(client, &wl_buffer_interface, 1, 0);
+ wl_resource_set_implementation(buffer->resource, &server_wlegl_buffer_impl, buffer, server_wlegl_buffer_dtor);
+
+ buffer->buf = new RemoteWindowBuffer(
+ width, height, stride, format, usage, handle);
+ buffer->buf->setAllocated(true);
+ buffer->buf->common.incRef(&buffer->buf->common);
+ return buffer;
+}
+
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/server_wlegl_buffer.h
^
|
(renamed from libhybris/hybris/egl/platforms/common/server_wlegl_buffer.h)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/server_wlegl_handle.cpp
^
|
(renamed from libhybris/hybris/egl/platforms/common/server_wlegl_handle.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/server_wlegl_handle.h
^
|
(renamed from libhybris/hybris/egl/platforms/common/server_wlegl_handle.h)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/server_wlegl_private.h
^
|
(renamed from libhybris/hybris/egl/platforms/common/server_wlegl_private.h)
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/support.h
^
|
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef SUPPORT_H_
+#define SUPPORT_H_
+
+#include <stddef.h>
+
+/**
+ * container_of - cast a member of a structure out to the containing structure
+ * @ptr: the pointer to the member.
+ * @type: the type of the container struct this is embedded in.
+ * @member: the name of the member within the struct.
+ *
+ */
+#define container_of(ptr, type, member) ({ \
+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
+ (type *)( (char *)__mptr - offsetof(type,member) );})
+
+#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/wayland-android.xml
^
|
(renamed from libhybris/hybris/egl/platforms/common/wayland-android.xml)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/windowbuffer.cpp
^
|
(renamed from libhybris/hybris/egl/platforms/common/windowbuffer.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/common/windowbuffer.h
^
|
(renamed from libhybris/hybris/egl/platforms/common/windowbuffer.h)
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/platforms/wayland/wayland_window_common.cpp
^
|
@@ -0,0 +1,651 @@
+/****************************************************************************************
+ **
+ ** Copyright (C) 2013-2022 Jolla Ltd.
+ ** All rights reserved.
+ **
+ ** This file is part of Wayland enablement for libhybris
+ **
+ ** You may use this file under the terms of the GNU Lesser General
+ ** Public License version 2.1 as published by the Free Software Foundation
+ ** and appearing in the file license.lgpl included in the packaging
+ ** of this file.
+ **
+ ** This library is free software; you can redistribute it and/or
+ ** modify it under the terms of the GNU Lesser General Public
+ ** License version 2.1 as published by the Free Software Foundation
+ ** and appearing in the file license.lgpl included in the packaging
+ ** of this file.
+ **
+ ** This library is distributed in the hope that it will be useful,
+ ** but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ** Lesser General Public License for more details.
+ **
+ ****************************************************************************************/
+
+
+#include <android-config.h>
+#include <hardware/gralloc.h>
+#include "wayland_window.h"
+#include <wayland-egl-backend.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include "logging.h"
+
+#if ANDROID_VERSION_MAJOR>=4 && ANDROID_VERSION_MINOR>=2 || ANDROID_VERSION_MAJOR>=5
+extern "C" {
+#include <sync/sync.h>
+}
+#endif
+
+static void
+buffer_create_sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
+{
+ struct wl_callback **created_callback = static_cast<struct wl_callback **>(data);
+
+ *created_callback = NULL;
+ wl_callback_destroy(callback);
+}
+
+static const struct wl_callback_listener buffer_create_sync_listener = {
+ buffer_create_sync_callback
+};
+
+void WaylandNativeWindowBuffer::wlbuffer_from_native_handle(struct android_wlegl *android_wlegl,
+ struct wl_display *display,
+ struct wl_event_queue *queue)
+{
+ struct wl_array ints;
+ int *ints_data;
+ struct android_wlegl_handle *wlegl_handle;
+
+ wl_array_init(&ints);
+ ints_data = (int*) wl_array_add(&ints, handle->numInts*sizeof(int));
+ memcpy(ints_data, handle->data + handle->numFds, handle->numInts*sizeof(int));
+
+ wlegl_handle = android_wlegl_create_handle(android_wlegl, handle->numFds, &ints);
+
+ wl_array_release(&ints);
+
+ for (int i = 0; i < handle->numFds; i++) {
+ android_wlegl_handle_add_fd(wlegl_handle, handle->data[i]);
+ }
+
+ wlbuffer = android_wlegl_create_buffer(android_wlegl,
+ width, height, stride,
+ format, usage, wlegl_handle);
+ wl_proxy_set_queue((struct wl_proxy *) wlbuffer, queue);
+
+ android_wlegl_handle_destroy(wlegl_handle);
+
+ creation_callback = wl_display_sync(display);
+ wl_callback_add_listener(creation_callback, &buffer_create_sync_listener, &creation_callback);
+ wl_proxy_set_queue((struct wl_proxy *)creation_callback, queue);
+}
+
+void WaylandNativeWindow::resize(unsigned int width, unsigned int height)
+{
+ lock();
+ this->m_defaultWidth = m_width = width;
+ this->m_defaultHeight = m_height = height;
+ unlock();
+}
+
+void WaylandNativeWindow::resize_callback(struct wl_egl_window *egl_window, void *)
+{
+ TRACE("%dx%d",egl_window->width,egl_window->height);
+ ((WaylandNativeWindow *) egl_window->driver_private)->resize(egl_window->width, egl_window->height);
+}
+
+void WaylandNativeWindow::destroy_window_callback(void *data)
+{
+ WaylandNativeWindow *native = (WaylandNativeWindow*)data;
+
+ native->lock();
+ native->m_window = 0;
+ native->unlock();
+}
+
+void WaylandNativeWindow::lock()
+{
+ pthread_mutex_lock(&this->mutex);
+}
+
+void WaylandNativeWindow::unlock()
+{
+ pthread_mutex_unlock(&this->mutex);
+}
+
+void
+WaylandNativeWindow::sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
+{
+ int *done = static_cast<int *>(data);
+
+ *done = 1;
+ wl_callback_destroy(callback);
+}
+
+static const struct wl_callback_listener sync_listener = {
+ WaylandNativeWindow::sync_callback
+};
+
+static void check_fatal_error(struct wl_display *display)
+{
+ int error = wl_display_get_error(display);
+
+ if (error == 0)
+ return;
+
+ fprintf(stderr, "Wayland display got fatal error %i: %s\n", error, strerror(error));
+
+ if (errno != 0)
+ fprintf(stderr, "Additionally, errno was set to %i: %s\n", errno, strerror(errno));
+
+ fprintf(stderr, "The display is now unusable, aborting.\n");
+ abort();
+}
+
+WaylandNativeWindow::WaylandNativeWindow(struct wl_egl_window *window,
+ struct wl_display *display,
+ android_wlegl *wlegl)
+ : m_android_wlegl(wlegl)
+{
+ HYBRIS_TRACE_BEGIN("wayland-platform", "create_window", "");
+ this->m_window = window;
+ this->m_window->driver_private = (void *) this;
+ this->m_display = display;
+ this->m_width = window->width;
+ this->m_height = window->height;
+ this->m_defaultWidth = window->width;
+ this->m_defaultHeight = window->height;
+ this->m_window->resize_callback = resize_callback;
+ this->m_window->destroy_window_callback = destroy_window_callback;
+ this->frame_callback = NULL;
+ this->wl_queue = wl_display_create_queue(display);
+ this->m_format = 1;
+
+ const_cast<int&>(ANativeWindow::minSwapInterval) = 0;
+ const_cast<int&>(ANativeWindow::maxSwapInterval) = 1;
+ // This is the default as per the EGL documentation
+ this->m_swap_interval = 1;
+
+ m_usage=GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE;
+ pthread_mutex_init(&mutex, NULL);
+ pthread_cond_init(&cond, NULL);
+ m_queueReads = 0;
+ m_freeBufs = 0;
+ m_damage_rects = NULL;
+ m_damage_n_rects = 0;
+ m_lastBuffer = 0;
+ WaylandNativeWindow::setBufferCount(3);
+ HYBRIS_TRACE_END("wayland-platform", "create_window", "");
+}
+
+WaylandNativeWindow::~WaylandNativeWindow()
+{
+ destroyBuffers();
+ if (frame_callback)
+ wl_callback_destroy(frame_callback);
+ wl_event_queue_destroy(wl_queue);
+ if (m_window) {
+ m_window->driver_private = NULL;
+ m_window->resize_callback = NULL;
+ m_window->destroy_window_callback = NULL;
+ }
+}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/tests/Makefile.am
^
|
@@ -21,6 +21,10 @@
if WANT_WAYLAND
bin_PROGRAMS += \
test_camera
+if HAS_VULKAN_HEADERS
+bin_PROGRAMS += \
+ test_vulkan
+endif
endif
test_dlopen_SOURCES = test_dlopen.c
@@ -59,6 +63,7 @@
-I$(top_srcdir)/include \
$(ANDROID_HEADERS_CFLAGS) \
-I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
-I$(top_srcdir)/egl/platforms/common \
-I$(top_srcdir)/egl/platforms/hwcomposer \
-I$(top_srcdir)/libsync \
@@ -94,6 +99,7 @@
-I$(top_srcdir)/include \
$(ANDROID_HEADERS_CFLAGS) \
-I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
-I$(top_srcdir)/egl/platforms/common \
-I$(top_srcdir)/egl/platforms/hwcomposer \
-I$(top_srcdir)/libsync \
@@ -106,6 +112,7 @@
-lm \
$(top_builddir)/common/libhybris-common.la \
$(top_builddir)/egl/platforms/hwcomposer/libhybris-hwcomposerwindow.la \
+ $(top_builddir)/platforms/common/libhybris-platformcommon.la \
$(top_builddir)/egl/platforms/common/libhybris-eglplatformcommon.la \
$(libegl) \
$(libglesv2) \
@@ -126,6 +133,7 @@
-I$(top_srcdir)/include \
$(ANDROID_HEADERS_CFLAGS) \
-I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
-I$(top_srcdir)/egl/platforms/common \
-I$(top_srcdir)/egl/platforms/hwcomposer \
-I$(top_srcdir)/libsync \
@@ -138,6 +146,7 @@
-lm \
$(top_builddir)/common/libhybris-common.la \
$(top_builddir)/egl/platforms/hwcomposer/libhybris-hwcomposerwindow.la \
+ $(top_builddir)/platforms/common/libhybris-platformcommon.la \
$(top_builddir)/egl/platforms/common/libhybris-eglplatformcommon.la \
$(libegl) \
$(libglesv2) \
@@ -158,6 +167,7 @@
-I$(top_srcdir)/include \
$(ANDROID_HEADERS_CFLAGS) \
-I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
-I$(top_srcdir)/egl/platforms/common \
-I$(top_srcdir)/egl/platforms/hwcomposer \
-I$(top_srcdir)/libsync \
@@ -169,6 +179,7 @@
test_hwcomposer_LDADD = \
-lm \
$(top_builddir)/common/libhybris-common.la \
+ $(top_builddir)/platforms/common/libhybris-platformcommon.la \
$(top_builddir)/egl/platforms/common/libhybris-eglplatformcommon.la \
$(libegl) \
$(libglesv2) \
@@ -245,6 +256,7 @@
-I$(top_srcdir)/include \
$(ANDROID_HEADERS_CFLAGS) \
-I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
-I$(top_srcdir)/egl/platforms/common \
-I$(top_srcdir)/egl/platforms/hwcomposer \
-I$(top_srcdir)/libsync \
@@ -256,25 +268,14 @@
test_camera_CXXFLAGS += \
-DHAS_HWCOMPOSER2_HEADERS=0
endif
-if WANT_WAYLAND_EGL
-test_camera_LDADD = \
- $(top_builddir)/common/libhybris-common.la \
- $(libegl) \
- $(libglesv2) \
- $(top_builddir)/camera/libcamera.la \
- $(top_builddir)/input/libis.la \
- $(top_builddir)/egl/platforms/common/libwayland-egl.la \
- $(WAYLAND_CLIENT_LIBS)
-else
test_camera_LDADD = \
$(top_builddir)/common/libhybris-common.la \
$(libegl) \
$(libglesv2) \
$(top_builddir)/camera/libcamera.la \
$(top_builddir)/input/libis.la \
- $(WAYLAND_EGL_LIBS)
+ $(WAYLAND_EGL_LIBS) \
$(WAYLAND_CLIENT_LIBS)
-endif
test_media_SOURCES = test_media.cpp test_common.cpp
test_media_CFLAGS = \
@@ -382,3 +383,14 @@
test_opencl_LDADD = \
$(top_builddir)/common/libhybris-common.la \
$(top_builddir)/opencl/libOpenCL.la
+
+if WANT_WAYLAND
+test_vulkan_SOURCES = test_vulkan.cpp
+test_vulkan_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ $(ANDROID_HEADERS_CFLAGS)
+test_vulkan_LDADD = \
+ $(top_builddir)/common/libhybris-common.la \
+ $(top_builddir)/vulkan/libvulkan.la \
+ $(WAYLAND_CLIENT_LIBS)
+endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/tests/test_common.cpp
^
|
@@ -17,7 +17,7 @@
*
*/
-#include "test_common.h"
+#include <android-config.h>
#include <stdio.h>
#include <stdlib.h>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/tests/test_common.h
^
|
@@ -19,11 +19,13 @@
#ifndef __LIBHYBRIS_TEST_COMMON_H
#define __LIBHYBRIS_TEST_COMMON_H
+#include "config.h"
+
#include <EGL/egl.h>
#ifdef GL_ES_VERSION_3_0
#include <GLES3/gl3.h>
-#include <GLES3/gl3ext.h>
+#include <GLES2/gl2ext.h>
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/tests/test_vulkan.cpp
^
|
@@ -0,0 +1,714 @@
+/*
+ * test_vulkan: Test Vulkan implementation
+ * Copyright (c) 2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <vector>
+
+#include <wayland-client.h>
+#include <wayland-client-protocol.h>
+#include <wayland-server.h>
+
+#define VK_USE_PLATFORM_WAYLAND_KHR 1
+#include <vulkan/vulkan.h>
+
+VkDevice device;
+VkPhysicalDevice usedPhysicalDevice;
+VkQueue graphicsQueue;
+VkQueue presentQueue;
+VkSwapchainKHR swapchain = VK_NULL_HANDLE;
+VkImage *swapchainImages = NULL;
+uint32_t imageCount;
+VkFormat swapchainImageFormat;
+VkCommandPool commandPool;
+VkCommandBuffer *commandBuffers = NULL;
+
+VkSemaphore imageAvailableSemaphore;
+VkSemaphore renderFinishedSemaphore;
+VkFence *fences = NULL;
+uint32_t graphicsFamily = 0;
+uint32_t presentFamily = 0;
+VkSurfaceKHR surface = VK_NULL_HANDLE;
+
+struct SwapchainSupportDetails {
+ VkSurfaceCapabilitiesKHR capabilities;
+ std::vector<VkSurfaceFormatKHR> formats;
+ std::vector<VkPresentModeKHR> presentModes;
+};
+
+struct wl_data {
+ struct wl_display *wldisplay = NULL;
+ struct wl_compositor *wlcompositor = NULL;
+ struct wl_surface *wlsurface;
+ struct wl_region *wlregion;
+ struct wl_shell *wlshell;
+ struct wl_shell_surface *wlshell_surface;
+ struct wl_output *wloutput;
+ uint32_t width;
+ uint32_t height;
+} wl_data;
+
+static void handle_ping(void *data, struct wl_shell_surface *shell_surface, uint32_t serial)
+{
+ wl_shell_surface_pong(shell_surface, serial);
+}
+
+static void handle_configure(void *data, struct wl_shell_surface *shell_surface,
+ uint32_t edges, int32_t width, int32_t height)
+{
+}
+
+static void handle_popup_done(void *data, struct wl_shell_surface *shell_surface)
+{
+}
+
+static const struct wl_shell_surface_listener shell_surface_listener = {
+ handle_ping,
+ handle_configure,
+ handle_popup_done
+};
+
+static void
+display_handle_geometry(void *data, struct wl_output *output, int x, int y,
+ int physical_width, int physical_height, int subpixel,
+ const char *make, const char *model, int transform)
+{
+}
+
+static void
+display_handle_mode(void *data, struct wl_output *output, uint32_t flags,
+ int width, int height, int refresh)
+{
+ struct wl_data *driverdata = (struct wl_data *)data;
+ driverdata->width = width;
+ driverdata->height = height;
+}
+
+static void
+display_handle_done(void *data, struct wl_output *output)
+{
+}
+
+static void
+display_handle_scale(void *data, struct wl_output *output, int32_t factor)
+{
+}
+
+static const struct wl_output_listener output_listener = {
+ display_handle_geometry,
+ display_handle_mode,
+ display_handle_done,
+ display_handle_scale
+};
+
+static void global_registry_handler(void *data, struct wl_registry *registry,
+ uint32_t id, const char *interface, uint32_t version)
+{
+ if (strcmp(interface, "wl_compositor") == 0) {
+ wl_data.wlcompositor = (wl_compositor *)wl_registry_bind(registry, id, &wl_compositor_interface, 1);
+ } else if (strcmp(interface, "wl_shell") == 0) {
+ wl_data.wlshell = (wl_shell *)wl_registry_bind(registry, id, &wl_shell_interface, 1);
+ } else if (strcmp(interface, "wl_output") == 0) {
+ wl_data.wloutput = (wl_output *)wl_registry_bind(registry, id, &wl_output_interface, 2);
+ wl_output_add_listener(wl_data.wloutput, &output_listener, &wl_data);
+ }
+}
+
+static void global_registry_remover(void *data, struct wl_registry *registry, uint32_t id)
+{
+}
+
+static const struct wl_registry_listener registry_listener = {
+ global_registry_handler,
+ global_registry_remover
+};
+
+static void get_server_references(void)
+{
+ wl_data.wldisplay = wl_display_connect(NULL);
+ if (wl_data.wldisplay == NULL) {
+ fprintf(stderr, "Failed to connect to display\n");
+ exit(1);
+ }
+
+ struct wl_registry *registry = wl_display_get_registry(wl_data.wldisplay);
+ wl_registry_add_listener(registry, ®istry_listener, NULL);
+
+ wl_display_dispatch(wl_data.wldisplay);
+ wl_display_roundtrip(wl_data.wldisplay);
+
+ if (wl_data.wlcompositor == NULL || wl_data.wlshell == NULL) {
+ fprintf(stderr, "Failed to find compositor or shell\n");
+ exit(1);
+ }
+}
+
+VkSurfaceFormatKHR chooseSwapSurfaceFormat(const std::vector<VkSurfaceFormatKHR>& availableFormats)
+{
+ for (const auto& availableFormat : availableFormats) {
+ if (availableFormat.format == VK_FORMAT_B8G8R8A8_SRGB
+ && availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) {
+ return availableFormat;
+ }
+ }
+
+ return availableFormats[0];
+}
+
+VkPresentModeKHR chooseSwapPresentMode(const std::vector<VkPresentModeKHR>& availablePresentModes)
+{
+ for (const auto& availablePresentMode : availablePresentModes) {
+ if (availablePresentMode == VK_PRESENT_MODE_MAILBOX_KHR) {
+ return availablePresentMode;
+ }
+ }
+
+ return VK_PRESENT_MODE_FIFO_KHR;
+}
+
+SwapchainSupportDetails querySwapchainSupport(VkPhysicalDevice device)
+{
+ SwapchainSupportDetails details;
+
+ vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device, surface, &details.capabilities);
+
+ uint32_t formatCount;
+ vkGetPhysicalDeviceSurfaceFormatsKHR(device, surface, &formatCount, NULL);
+
+ if (formatCount != 0) {
+ details.formats.resize(formatCount);
+ vkGetPhysicalDeviceSurfaceFormatsKHR(device, surface, &formatCount, details.formats.data());
+ }
+
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/ui/ui.c
^
|
@@ -17,12 +17,19 @@
#include <dlfcn.h>
#include <stddef.h>
+#include <android-version.h>
+#if ANDROID_VERSION_MAJOR>=10
+#include <android/rect.h>
+#include <cutils/native_handle.h>
+#endif
+
#include <hybris/common/binding.h>
-#include <hybris/ui/ui_compatibility_layer.h>
+#include <hybris/ui/ui.h>
#define COMPAT_LIBRARY_PATH "libui_compat_layer.so"
HYBRIS_LIBRARY_INITIALIZE(ui, COMPAT_LIBRARY_PATH);
+HYBRIS_LIRBARY_CHECK_SYMBOL(ui);
HYBRIS_IMPLEMENT_FUNCTION0(ui, struct graphic_buffer*, graphic_buffer_new);
HYBRIS_IMPLEMENT_FUNCTION4(ui, struct graphic_buffer*,
@@ -56,3 +63,30 @@
#endif
HYBRIS_IMPLEMENT_FUNCTION1(ui, int, graphic_buffer_init_check,
struct graphic_buffer*);
+
+#if ANDROID_VERSION_MAJOR>=10
+HYBRIS_IMPLEMENT_FUNCTION9(ui, status_t, graphic_buffer_allocator_allocate,
+ uint32_t, uint32_t,
+ PixelFormat, uint32_t, uint64_t,
+ buffer_handle_t*, uint32_t*,
+ uint64_t, const char*);
+HYBRIS_IMPLEMENT_FUNCTION1(ui, status_t, graphic_buffer_allocator_free,
+ buffer_handle_t);
+
+HYBRIS_IMPLEMENT_FUNCTION8(ui, status_t, graphic_buffer_mapper_import_buffer,
+ buffer_handle_t, uint32_t, uint32_t, uint32_t,
+ PixelFormat, uint64_t, uint32_t,
+ buffer_handle_t*);
+
+HYBRIS_IMPLEMENT_FUNCTION2(ui, status_t, graphic_buffer_mapper_import_buffer_no_size,
+ buffer_handle_t, buffer_handle_t*);
+
+HYBRIS_IMPLEMENT_FUNCTION1(ui, status_t, graphic_buffer_mapper_free_buffer,
+ buffer_handle_t);
+
+HYBRIS_IMPLEMENT_FUNCTION6(ui, status_t, graphic_buffer_mapper_lock,
+ buffer_handle_t, uint32_t, const ARect*,
+ void**, int32_t*, int32_t*);
+HYBRIS_IMPLEMENT_FUNCTION1(ui, status_t, graphic_buffer_mapper_unlock,
+ buffer_handle_t);
+#endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/Makefile.am
^
|
@@ -0,0 +1,33 @@
+if HAS_VULKAN_HEADERS
+
+SUBDIRS = platforms
+
+lib_LTLIBRARIES = \
+ libvulkan.la
+
+libvulkan_la_SOURCES = \
+ vulkan.c \
+ ws.c
+
+libvulkan_la_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/common $(ANDROID_HEADERS_CFLAGS) -DPKGLIBDIR="\"$(pkglibdir)/\""
+if WANT_TRACE
+libvulkan_la_CFLAGS += -DDEBUG
+endif
+if WANT_DEBUG
+libvulkan_la_CFLAGS += -ggdb -O0
+endif
+
+libvulkan_la_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/common $(ANDROID_HEADERS_CFLAGS) -DPKGLIBDIR="\"$(pkglibdir)/\""
+if WANT_TRACE
+libvulkan_la_CXXFLAGS += -DDEBUG
+endif
+if WANT_DEBUG
+libvulkan_la_CXXFLAGS += -ggdb -O0
+endif
+libvulkan_la_LDFLAGS = \
+ -ldl \
+ $(top_builddir)/common/libhybris-common.la \
+ $(top_builddir)/hardware/libhardware.la \
+ -version-info 3:183:2
+
+endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/Makefile.am
^
|
@@ -0,0 +1,7 @@
+
+SUBDIRS = common null
+
+if WANT_WAYLAND
+SUBDIRS += wayland
+endif
+
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/common/Makefile.am
^
|
@@ -0,0 +1,44 @@
+lib_LTLIBRARIES = \
+ libhybris-vulkanplatformcommon.la
+
+libhybris_vulkanplatformcommon_la_SOURCES = \
+ vulkanplatformcommon.cpp
+
+libhybris_vulkanplatformcommon_la_CFLAGS = -I$(top_srcdir)/include $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/vulkan -I$(top_srcdir)/common/ -I$(top_srcdir)/platforms/common/
+if WANT_WAYLAND
+libhybris_vulkanplatformcommon_la_CFLAGS += $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) $(ANDROID_HEADERS_CFLAGS)
+endif
+
+if WANT_TRACE
+libhybris_vulkanplatformcommon_la_CFLAGS += -DDEBUG
+endif
+if WANT_DEBUG
+libhybris_vulkanplatformcommon_la_CFLAGS += -ggdb -O0
+endif
+
+libhybris_vulkanplatformcommon_la_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/vulkan $(ANDROID_HEADERS_CFLAGS) -I$(top_srcdir)/common/ -I$(top_srcdir)/platforms/common/
+
+if WANT_WAYLAND
+libhybris_vulkanplatformcommon_la_CXXFLAGS += $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) $(ANDROID_HEADERS_CFLAGS)
+endif
+
+if WANT_TRACE
+libhybris_vulkanplatformcommon_la_CXXFLAGS += -DDEBUG
+endif
+if WANT_DEBUG
+libhybris_vulkanplatformcommon_la_CXXFLAGS += -ggdb -O0
+endif
+libhybris_vulkanplatformcommon_la_LDFLAGS = \
+ $(top_builddir)/common/libhybris-common.la \
+ $(top_builddir)/platforms/common/libhybris-platformcommon.la \
+ -version-info 1:0:0
+
+if HAS_ANDROID_5_0_0
+libhybris_vulkanplatformcommon_la_LDFLAGS += $(top_builddir)/libsync/libsync.la
+endif
+
+if WANT_WAYLAND
+libhybris_vulkanplatformcommon_la_LDFLAGS += \
+ $(WAYLAND_CLIENT_LIBS) \
+ $(WAYLAND_SERVER_LIBS)
+endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/common/vulkanplatformcommon.cpp
^
|
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <ws.h>
+
+static struct ws_vulkan_interface *my_vulkan_interface;
+
+extern "C" void vulkanplatformcommon_init(struct ws_vulkan_interface *vulkan_iface)
+{
+ my_vulkan_interface = vulkan_iface;
+}
+
+extern "C" void *hybris_android_vulkan_dlsym(const char *symbol)
+{
+ return (*my_vulkan_interface->android_vulkan_dlsym)(symbol);
+}
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/common/vulkanplatformcommon.h
^
|
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __VULKANPLATFORMCOMMON_H
+#define __VULKANPLATFORMCOMMON_H
+
+void vulkanplatformcommon_init(struct ws_vulkan_interface *vulkan_iface);
+#endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/null/Makefile.am
^
|
@@ -0,0 +1,25 @@
+pkglib_LTLIBRARIES = vulkanplatform_null.la
+
+vulkanplatform_null_la_SOURCES = vulkanplatform_null.c
+vulkanplatform_null_la_CFLAGS = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/vulkan \
+ -I$(top_srcdir)/vulkan/platforms/common \
+ -I$(top_builddir)/vulkan/platforms/common \
+ $(ANDROID_HEADERS_CFLAGS) \
+ $(WAYLAND_SERVER_CFLAGS)
+
+vulkanplatform_null_la_LDFLAGS = \
+ -avoid-version -module -shared -export-dynamic \
+ $(top_builddir)/vulkan/platforms/common/libhybris-vulkanplatformcommon.la \
+ $(top_builddir)/gralloc/libgralloc.la \
+ $(WAYLAND_SERVER_LIBS)
+
+if WANT_DEBUG
+vulkanplatform_null_la_CFLAGS += -I$(top_srcdir)/common -ggdb -O0
+endif
+
+if WANT_TRACE
+vulkanplatform_null_la_CFLAGS += -DDEBUG
+endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/null/vulkanplatform_null.c
^
|
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <android-config.h>
+#include <ws.h>
+
+#include <vulkanplatformcommon.h>
+
+#include <vulkan/vulkan.h>
+
+#include <hybris/common/binding.h>
+
+static VkResult (*_vkEnumerateInstanceExtensionProperties)(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) = NULL;
+static VkResult (*_vkCreateInstance)(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance) = NULL;
+static PFN_vkVoidFunction (*_vkGetInstanceProcAddr)(VkInstance instance, const char *pName) = NULL;
+
+static void nullws_init_module(struct ws_vulkan_interface *vulkan_iface)
+{
+ vulkanplatformcommon_init(vulkan_iface);
+}
+
+static VkResult nullws_vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties)
+{
+ if (_vkEnumerateInstanceExtensionProperties == NULL) {
+ _vkEnumerateInstanceExtensionProperties = (VkResult (*)(const char*, uint32_t*, VkExtensionProperties*))
+ (*_vkGetInstanceProcAddr)(NULL, "vkEnumerateInstanceExtensionProperties");
+ }
+ return (*_vkEnumerateInstanceExtensionProperties)(pLayerName, pPropertyCount, pProperties);
+}
+
+VkResult nullws_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
+{
+ if (_vkCreateInstance == NULL) {
+ _vkCreateInstance = (VkResult (*)(const VkInstanceCreateInfo *, const VkAllocationCallbacks *, VkInstance *))
+ (*_vkGetInstanceProcAddr)(NULL, "vkCreateInstance");
+ }
+ return (*_vkCreateInstance)(pCreateInfo, pAllocator, pInstance);
+}
+
+#ifdef WANT_WAYLAND
+static VkResult nullws_vkCreateWaylandSurfaceKHR(VkInstance instance,
+ const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface)
+{
+ return VK_ERROR_OUT_OF_HOST_MEMORY;
+}
+
+static VkBool32 nullws_vkGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display)
+{
+ return VK_FALSE;
+}
+
+static void nullws_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator)
+{
+}
+#endif
+
+static void nullws_vkSetInstanceProcAddrFunc(PFN_vkVoidFunction addr)
+{
+ if (_vkGetInstanceProcAddr == NULL)
+ _vkGetInstanceProcAddr = (PFN_vkVoidFunction (*)(VkInstance, const char*))addr;
+}
+
+struct ws_module ws_module_info = {
+ nullws_init_module,
+ nullws_vkEnumerateInstanceExtensionProperties,
+ nullws_vkCreateInstance,
+#ifdef WANT_WAYLAND
+ nullws_vkCreateWaylandSurfaceKHR,
+ nullws_vkGetPhysicalDeviceWaylandPresentationSupportKHR,
+ nullws_vkDestroySurfaceKHR,
+#endif
+ nullws_vkSetInstanceProcAddrFunc,
+};
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/wayland/Makefile.am
^
|
@@ -0,0 +1,46 @@
+pkglib_LTLIBRARIES = vulkanplatform_wayland.la
+
+vulkanplatform_wayland_la_SOURCES = vulkanplatform_wayland.cpp wayland_window.cpp $(top_srcdir)/platforms/wayland/wayland_window_common.cpp
+vulkanplatform_wayland_la_CXXFLAGS = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/platforms/common \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/vulkan \
+ -I$(top_srcdir)/vulkan/platforms/common \
+ -I$(top_builddir)/vulkan/platforms/common \
+ $(ANDROID_HEADERS_CFLAGS) \
+ $(WAYLAND_CLIENT_CFLAGS) \
+ $(WAYLAND_EGL_CFLAGS)
+
+if WANT_DEBUG
+vulkanplatform_wayland_la_CXXFLAGS += -I$(top_srcdir)/common
+endif
+
+if WANT_TRACE
+vulkanplatform_wayland_la_CXXFLAGS += -DDEBUG
+endif
+
+if WANT_DEBUG
+vulkanplatform_wayland_la_CXXFLAGS += -ggdb -O0
+endif
+
+if !WANT_WL_SERVERSIDE_BUFFERS
+vulkanplatform_wayland_la_CXXFLAGS += -DHYBRIS_NO_SERVER_SIDE_BUFFERS
+endif
+
+vulkanplatform_wayland_la_LDFLAGS = \
+ -avoid-version -module -shared -export-dynamic \
+ $(top_builddir)/platforms/common/libhybris-platformcommon.la \
+ $(top_builddir)/vulkan/platforms/common/libhybris-vulkanplatformcommon.la \
+ $(top_builddir)/gralloc/libgralloc.la \
+ $(WAYLAND_CLIENT_LIBS) \
+ $(WAYLAND_EGL_LIBS)
+
+if HAS_ANDROID_4_2_0
+vulkanplatform_wayland_la_LDFLAGS += $(top_builddir)/libsync/libsync.la
+endif
+
+if HAS_ANDROID_5_0_0
+vulkanplatform_wayland_la_LDFLAGS += $(top_builddir)/libsync/libsync.la
+endif
+
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/wayland/vulkanplatform_wayland.cpp
^
|
@@ -0,0 +1,303 @@
+/*
+ * Copyright (c) 2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <android-config.h>
+#include <assert.h>
+#include <algorithm>
+#include <map>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ws.h"
+
+#define VK_USE_PLATFORM_ANDROID_KHR 1
+#define VK_USE_PLATFORM_WAYLAND_KHR 1
+extern "C" {
+#include <vulkanplatformcommon.h>
+};
+#include <vulkanhybris.h>
+
+extern "C" {
+#include <wayland-client.h>
+#include <wayland-egl.h>
+}
+
+#include <vulkan/vulkan.h>
+
+#include <hybris/gralloc/gralloc.h>
+#include <hybris/common/binding.h>
+#include "logging.h"
+#include "server_wlegl_buffer.h"
+#include "wayland-android-client-protocol.h"
+#include "wayland_window.h"
+
+struct WaylandDisplay {
+ wl_display *wl_dpy;
+ wl_event_queue *queue;
+ wl_registry *registry;
+ android_wlegl *wlegl;
+ WaylandNativeWindow *window;
+};
+
+static bool init_done = false;
+
+/* Keep track of active Vulkan window surfaces */
+static std::map<VkSurfaceKHR,struct WaylandDisplay *> _surface_window_map;
+
+int vulkan_wayland_has_mapping(VkSurfaceKHR surface)
+{
+ return (_surface_window_map.find(surface) != _surface_window_map.end());
+}
+
+void vulkan_wayland_push_mapping(VkSurfaceKHR surface, struct WaylandDisplay *wdpy)
+{
+ assert(!vulkan_wayland_has_mapping(surface));
+
+ _surface_window_map[surface] = wdpy;
+}
+
+struct WaylandDisplay *vulkan_wayland_pop_mapping(VkSurfaceKHR surface)
+{
+ std::map<VkSurfaceKHR, struct WaylandDisplay *>::iterator it;
+ it = _surface_window_map.find(surface);
+
+ /* Caller must check with vulkan_helper_has_mapping() before */
+ assert(it != _surface_window_map.end());
+
+ struct WaylandDisplay *result = it->second;
+ _surface_window_map.erase(it);
+ return result;
+}
+
+static VkResult (*_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) = NULL;
+static PFN_vkVoidFunction (*_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator) = NULL;
+static VkResult (*_vkEnumerateInstanceExtensionProperties)(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) = NULL;
+static VkResult (*_vkCreateInstance)(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance) = NULL;
+static PFN_vkVoidFunction (*_vkGetInstanceProcAddr)(VkInstance instance, const char *pName) = NULL;
+
+extern "C" void waylandws_init_module(struct ws_vulkan_interface *vulkan_iface)
+{
+ if (init_done) {
+ return;
+ }
+ hybris_gralloc_initialize(0);
+ vulkanplatformcommon_init(vulkan_iface);
+ init_done = true;
+}
+
+static void registry_handle_global(void *data, wl_registry *registry, uint32_t name, const char *interface, uint32_t version)
+{
+ WaylandDisplay *dpy = (WaylandDisplay *)data;
+
+ if (strcmp(interface, "android_wlegl") == 0) {
+ dpy->wlegl = static_cast<struct android_wlegl *>(wl_registry_bind(registry, name, &android_wlegl_interface, std::min(2u, version)));
+ }
+}
+
+static const wl_registry_listener registry_listener = {
+ registry_handle_global
+};
+
+static void callback_done(void *data, wl_callback *cb, uint32_t d)
+{
+ WaylandDisplay *dpy = (WaylandDisplay *)data;
+
+ wl_callback_destroy(cb);
+ if (!dpy->wlegl) {
+ fprintf(stderr, "Fatal: the server doesn't advertise the android_wlegl global!");
+ abort();
+ }
+}
+
+static const wl_callback_listener callback_listener = {
+ callback_done
+};
+
+void freeWaylandDisplay(WaylandDisplay *wdpy)
+{
+ int ret = 0;
+ // We still have the sync callback on flight, wait for it to arrive
+ while (ret == 0 && !wdpy->wlegl) {
+ ret = wl_display_dispatch_queue(wdpy->wl_dpy, wdpy->queue);
+ }
+ assert(ret >= 0);
+ android_wlegl_destroy(wdpy->wlegl);
+ wl_registry_destroy(wdpy->registry);
+ wl_event_queue_destroy(wdpy->queue);
+ delete wdpy;
+}
+
+static VkResult waylandws_vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties)
+{
+ VkResult res;
+
+ if (_vkEnumerateInstanceExtensionProperties == NULL) {
+ _vkEnumerateInstanceExtensionProperties = (VkResult (*)(const char*, uint32_t*, VkExtensionProperties*))
+ (*_vkGetInstanceProcAddr)(NULL, "vkEnumerateInstanceExtensionProperties");
+ }
+
+ res = (*_vkEnumerateInstanceExtensionProperties)(pLayerName, pPropertyCount, pProperties);
+ if (res == VK_SUCCESS && *pPropertyCount > 0 && pProperties != NULL) {
+ // Find and replace Android surface extension with wayland surface extension
+ uint32_t i;
+ for (i = 0; i < *pPropertyCount; i++) {
+ if (strcmp(pProperties[i].extensionName, VK_KHR_ANDROID_SURFACE_EXTENSION_NAME) == 0) {
+ strncpy(pProperties[i].extensionName, VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME, VK_MAX_EXTENSION_NAME_SIZE);
+ }
+ }
+ }
+ return res;
+}
+
+VkResult waylandws_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
+{
+ VkInstanceCreateInfo createInfo = *pCreateInfo;
+ VkResult result;
+ // Temporary array to replace wayland surface extension with Android surface extension
+ char **enabledExtensions = (char **)malloc(pCreateInfo->enabledExtensionCount * sizeof(char *));
+ uint32_t i;
+
+ if (_vkCreateInstance == NULL) {
+ _vkCreateInstance = (VkResult (*)(const VkInstanceCreateInfo *, const VkAllocationCallbacks *, VkInstance *))
+ (*_vkGetInstanceProcAddr)(NULL, "vkCreateInstance");
+ }
+
+ for (i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
+ enabledExtensions[i] = (char *)malloc(VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
+ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME) == 0) {
+ strncpy(enabledExtensions[i], VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, VK_MAX_EXTENSION_NAME_SIZE);
+ } else {
+ strncpy(enabledExtensions[i], pCreateInfo->ppEnabledExtensionNames[i], VK_MAX_EXTENSION_NAME_SIZE);
+ }
+ }
+ createInfo.ppEnabledExtensionNames = enabledExtensions;
+
+ // Call actual vkCreateInstance
+ result = (*_vkCreateInstance)(&createInfo, pAllocator, pInstance);
+
+ // Free temporary array
+ for (i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
+ free(enabledExtensions[i]);
+ }
+ free(enabledExtensions);
+
+ return result;
+}
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/wayland/wayland_window.cpp
^
|
@@ -0,0 +1,309 @@
+/****************************************************************************************
+ **
+ ** Copyright (C) 2013-2022 Jolla Ltd.
+ ** All rights reserved.
+ **
+ ** This file is part of Wayland enablement for libhybris
+ **
+ ** You may use this file under the terms of the GNU Lesser General
+ ** Public License version 2.1 as published by the Free Software Foundation
+ ** and appearing in the file license.lgpl included in the packaging
+ ** of this file.
+ **
+ ** This library is free software; you can redistribute it and/or
+ ** modify it under the terms of the GNU Lesser General Public
+ ** License version 2.1 as published by the Free Software Foundation
+ ** and appearing in the file license.lgpl included in the packaging
+ ** of this file.
+ **
+ ** This library is distributed in the hope that it will be useful,
+ ** but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ** Lesser General Public License for more details.
+ **
+ ****************************************************************************************/
+
+
+#include <android-config.h>
+#include <hardware/gralloc.h>
+#include "wayland_window.h"
+#include <wayland-egl-backend.h>
+#include <assert.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "logging.h"
+#include <vulkanhybris.h>
+
+#if ANDROID_VERSION_MAJOR>=4 && ANDROID_VERSION_MINOR>=2 || ANDROID_VERSION_MAJOR>=5
+extern "C" {
+#include <sync/sync.h>
+}
+#endif
+
+static void
+wl_buffer_release(void *data, struct wl_buffer *buffer)
+{
+ WaylandNativeWindow *win = static_cast<WaylandNativeWindow *>(data);
+ win->releaseBuffer(buffer);
+}
+
+static struct wl_buffer_listener wl_buffer_listener = {
+ wl_buffer_release
+};
+
+static void
+wayland_frame_callback(void *data, struct wl_callback *callback, uint32_t time)
+{
+ WaylandNativeWindow *surface = static_cast<WaylandNativeWindow *>(data);
+ surface->frame();
+ wl_callback_destroy(callback);
+}
+
+static const struct wl_callback_listener frame_listener = {
+ wayland_frame_callback
+};
+
+void WaylandNativeWindow::destroyWlEGLWindow()
+{
+ wl_egl_window_destroy(m_window);
+}
+
+int WaylandNativeWindow::postBuffer(ANativeWindowBuffer* buffer)
+{
+ TRACE("");
+ WaylandNativeWindowBuffer *wnb = NULL;
+
+ lock();
+ std::list<WaylandNativeWindowBuffer *>::iterator it = post_registered.begin();
+ for (; it != post_registered.end(); ++it)
+ {
+ if ((*it)->other == buffer)
+ {
+ wnb = (*it);
+ break;
+ }
+ }
+ unlock();
+ if (!wnb)
+ {
+ wnb = new WaylandNativeWindowBuffer(buffer);
+
+ wnb->common.incRef(&wnb->common);
+ buffer->common.incRef(&buffer->common);
+ }
+
+ int ret = 0;
+
+ lock();
+ wnb->busy = 1;
+ ret = readQueue(false);
+
+ if (ret < 0) {
+ unlock();
+ return ret;
+ }
+
+ if (wnb->wlbuffer == NULL)
+ {
+ wnb->wlbuffer_from_native_handle(m_android_wlegl, m_display, wl_queue);
+ TRACE("%p add listener with %p inside", wnb, wnb->wlbuffer);
+ wl_buffer_add_listener(wnb->wlbuffer, &wl_buffer_listener, this);
+ wl_proxy_set_queue((struct wl_proxy *) wnb->wlbuffer, this->wl_queue);
+ post_registered.push_back(wnb);
+ }
+ TRACE("%p DAMAGE AREA: %dx%d", wnb, wnb->width, wnb->height);
+ wl_surface_attach(m_window->surface, wnb->wlbuffer, 0, 0);
+ wl_surface_damage(m_window->surface, 0, 0, wnb->width, wnb->height);
+ wl_surface_commit(m_window->surface);
+ wl_display_flush(m_display);
+
+ posted.push_back(wnb);
+ unlock();
+
+ return NO_ERROR;
+}
+
+int WaylandNativeWindow::dequeueBuffer(BaseNativeWindowBuffer **buffer, int *fenceFd){
+ HYBRIS_TRACE_BEGIN("wayland-platform", "dequeueBuffer", "");
+
+ WaylandNativeWindowBuffer *wnb=NULL;
+ TRACE("%p", buffer);
+
+ lock();
+ readQueue(false);
+
+ HYBRIS_TRACE_BEGIN("wayland-platform", "dequeueBuffer_wait_for_buffer", "");
+
+ HYBRIS_TRACE_COUNTER("wayland-platform", "m_freeBufs", "%i", m_freeBufs);
+
+ while (m_freeBufs==0) {
+ HYBRIS_TRACE_COUNTER("wayland-platform", "m_freeBufs", "%i", m_freeBufs);
+ readQueue(true);
+ }
+
+ std::list<WaylandNativeWindowBuffer *>::iterator it = m_bufList.begin();
+ for (; it != m_bufList.end(); ++it)
+ {
+ if ((*it)->busy)
+ continue;
+ if ((*it)->youngest == 1)
+ continue;
+ break;
+ }
+
+ if (it==m_bufList.end()) {
+ HYBRIS_TRACE_BEGIN("wayland-platform", "dequeueBuffer_worst_case_scenario", "");
+ HYBRIS_TRACE_END("wayland-platform", "dequeueBuffer_worst_case_scenario", "");
+
+ it = m_bufList.begin();
+ for (; it != m_bufList.end() && (*it)->busy; ++it)
+ {}
+
+ }
+ if (it==m_bufList.end()) {
+ *buffer = 0;
+ *fenceFd = -1;
+ unlock();
+ HYBRIS_TRACE_BEGIN("wayland-platform", "dequeueBuffer_no_free_buffers", "");
+ HYBRIS_TRACE_END("wayland-platform", "dequeueBuffer_no_free_buffers", "");
+ TRACE("%p: no free buffers", buffer);
+ return NO_ERROR;
+ }
+
+ wnb = *it;
+ assert(wnb!=NULL);
+ HYBRIS_TRACE_END("wayland-platform", "dequeueBuffer_wait_for_buffer", "");
+
+ /* If the buffer doesn't match the window anymore, re-allocate */
+ if (wnb->width != m_width || wnb->height != m_height
+ || wnb->format != m_format || wnb->usage != m_usage)
+ {
+ TRACE("wnb:%p,win:%p %i,%i %i,%i x%x,x%x x%x,x%" PRIx64,
+ wnb,m_window,
+ wnb->width,m_width, wnb->height,m_height,
+ wnb->format,m_format, wnb->usage, m_usage);
+ destroyBuffer(wnb);
+ m_bufList.erase(it);
+ wnb = addBuffer();
+ }
+
+ wnb->busy = 1;
+ *buffer = wnb;
+ --m_freeBufs;
+
+ HYBRIS_TRACE_COUNTER("wayland-platform", "m_freeBufs", "%i", m_freeBufs);
+ HYBRIS_TRACE_BEGIN("wayland-platform", "dequeueBuffer_gotBuffer", "-%p", wnb);
+ HYBRIS_TRACE_END("wayland-platform", "dequeueBuffer_gotBuffer", "-%p", wnb);
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/platforms/wayland/wayland_window.h
^
|
@@ -0,0 +1,217 @@
+/****************************************************************************************
+ **
+ ** Copyright (C) 2013-2022 Jolla Ltd.
+ ** All rights reserved.
+ **
+ ** This file is part of Wayland enablement for libhybris
+ **
+ ** You may use this file under the terms of the GNU Lesser General
+ ** Public License version 2.1 as published by the Free Software Foundation
+ ** and appearing in the file license.lgpl included in the packaging
+ ** of this file.
+ **
+ ** This library is free software; you can redistribute it and/or
+ ** modify it under the terms of the GNU Lesser General Public
+ ** License version 2.1 as published by the Free Software Foundation
+ ** and appearing in the file license.lgpl included in the packaging
+ ** of this file.
+ **
+ ** This library is distributed in the hope that it will be useful,
+ ** but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ** Lesser General Public License for more details.
+ **
+ ****************************************************************************************/
+
+#ifndef WAYLAND_WINDOW_H
+#define WAYLAND_WINDOW_H
+#include "nativewindowbase.h"
+
+#include <hybris/gralloc/gralloc.h>
+
+extern "C" {
+
+#include <wayland-client.h>
+#include <wayland-egl.h>
+#include "wayland-android-client-protocol.h"
+#include <pthread.h>
+}
+
+#include <list>
+
+class WaylandNativeWindowBuffer : public BaseNativeWindowBuffer
+{
+public:
+ WaylandNativeWindowBuffer() : wlbuffer(0), busy(0), youngest(0), other(0), creation_callback(0) {}
+ WaylandNativeWindowBuffer(ANativeWindowBuffer *other)
+ {
+ ANativeWindowBuffer::width = other->width;
+ ANativeWindowBuffer::height = other->height;
+ ANativeWindowBuffer::format = other->format;
+ ANativeWindowBuffer::usage = other->usage;
+ ANativeWindowBuffer::handle = other->handle;
+ ANativeWindowBuffer::stride = other->stride;
+ this->wlbuffer = NULL;
+ this->creation_callback = NULL;
+ this->busy = 0;
+ this->other = other;
+ this->youngest = 0;
+ }
+
+ struct wl_buffer *wlbuffer;
+ int busy;
+ int youngest;
+ ANativeWindowBuffer *other;
+ struct wl_callback *creation_callback;
+
+ void wlbuffer_from_native_handle(struct android_wlegl *android_wlegl,
+ struct wl_display *display,
+ struct wl_event_queue *queue);
+
+ virtual void init(struct android_wlegl *android_wlegl,
+ struct wl_display *display,
+ struct wl_event_queue *queue) {}
+};
+
+#ifdef HYBRIS_NO_SERVER_SIDE_BUFFERS
+
+class ClientWaylandBuffer : public WaylandNativeWindowBuffer
+{
+friend class WaylandNativeWindow;
+protected:
+ ClientWaylandBuffer()
+ {}
+
+ ClientWaylandBuffer( unsigned int width,
+ unsigned int height,
+ unsigned int format,
+ unsigned int usage)
+ {
+ // Base members
+ ANativeWindowBuffer::width = width;
+ ANativeWindowBuffer::height = height;
+ ANativeWindowBuffer::format = format;
+ ANativeWindowBuffer::usage = usage;
+ this->wlbuffer = NULL;
+ this->creation_callback = NULL;
+ this->busy = 0;
+ this->other = NULL;
+ int alloc_ok = hybris_gralloc_allocate(this->width ? this->width : 1, this->height ? this->height : 1,
+ this->format, this->usage,
+ &this->handle, (uint32_t*)&this->stride);
+ assert(alloc_ok == 0);
+ this->youngest = 0;
+ this->common.incRef(&this->common);
+ }
+
+ ~ClientWaylandBuffer()
+ {
+ hybris_gralloc_release(this->handle, 1);
+ }
+
+ void init(struct android_wlegl *android_wlegl,
+ struct wl_display *display,
+ struct wl_event_queue *queue) override;
+
+protected:
+ void* vaddr;
+
+public:
+
+};
+
+#else
+
+class ServerWaylandBuffer : public WaylandNativeWindowBuffer
+{
+public:
+ ServerWaylandBuffer(unsigned int w, unsigned int h, int _format, int _usage, android_wlegl *android_wlegl, struct wl_event_queue *queue);
+ ~ServerWaylandBuffer();
+ void init(struct android_wlegl *android_wlegl,
+ struct wl_display *display,
+ struct wl_event_queue *queue) override;
+
+ struct wl_array ints;
+ struct wl_array fds;
+ wl_buffer *m_buf;
+};
+
+#endif // HYBRIS_NO_SERVER_SIDE_BUFFERS
+
+class WaylandNativeWindow : public BaseNativeWindow {
+public:
+ WaylandNativeWindow(struct wl_egl_window *window, struct wl_display *display, android_wlegl *wlegl);
+ ~WaylandNativeWindow();
+ void destroyWlEGLWindow();
+
+ void lock();
+ void unlock();
+ void frame();
+ void resize(unsigned int width, unsigned int height);
+ void releaseBuffer(struct wl_buffer *buffer);
+ int postBuffer(ANativeWindowBuffer *buffer);
+
+ virtual int setSwapInterval(int interval);
+
+ static void sync_callback(void *data, struct wl_callback *callback, uint32_t serial);
+ static void registry_handle_global(void *data, struct wl_registry *registry, uint32_t name,
+ const char *interface, uint32_t version);
+ static void resize_callback(struct wl_egl_window *egl_window, void *);
+ static void destroy_window_callback(void *data);
+ struct wl_event_queue *wl_queue;
+
+protected:
+ // overloads from BaseNativeWindow
+ virtual int dequeueBuffer(BaseNativeWindowBuffer **buffer, int *fenceFd);
+ virtual int lockBuffer(BaseNativeWindowBuffer* buffer);
+ virtual int queueBuffer(BaseNativeWindowBuffer* buffer, int fenceFd);
+ virtual int cancelBuffer(BaseNativeWindowBuffer* buffer, int fenceFd);
+ virtual unsigned int type() const;
+ virtual unsigned int width() const;
+ virtual unsigned int height() const;
+ virtual unsigned int format() const;
+ virtual unsigned int defaultWidth() const;
+ virtual unsigned int defaultHeight() const;
+ virtual unsigned int queueLength() const;
+ virtual unsigned int transformHint() const;
+ virtual unsigned int getUsage() const;
+ // perform calls
+ virtual int setUsage(uint64_t usage);
+ virtual int setBuffersFormat(int format);
+ virtual int setBuffersDimensions(int width, int height);
+ virtual int setBufferCount(int cnt);
+
+private:
+ WaylandNativeWindowBuffer *addBuffer();
+ void destroyBuffer(WaylandNativeWindowBuffer *);
+ void destroyBuffers();
+ void presentBuffer(WaylandNativeWindowBuffer *wnb);
+ int readQueue(bool block);
+
+ std::list<WaylandNativeWindowBuffer *> m_bufList;
+ std::list<WaylandNativeWindowBuffer *> fronted;
+ std::list<WaylandNativeWindowBuffer *> posted;
+ std::list<WaylandNativeWindowBuffer *> post_registered;
+ struct wl_egl_window *m_window;
+ struct wl_display *m_display;
+ WaylandNativeWindowBuffer *m_lastBuffer;
+ int m_width;
+ int m_height;
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/vulkan.c
^
|
@@ -0,0 +1,587 @@
+/*
+ * Copyright (c) 2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+/* For RTLD_DEFAULT */
+#define _GNU_SOURCE
+
+#define VK_USE_PLATFORM_ANDROID_KHR 1
+#define VK_USE_PLATFORM_WAYLAND_KHR 1
+
+#include <vulkan/vulkan.h>
+#include <dlfcn.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <hybris/common/binding.h>
+#include <hybris/common/floating_point_abi.h>
+#include "config.h"
+#include "logging.h"
+#include "ws.h"
+
+static void *vulkan_handle = NULL;
+
+/*
+ * This generates a function that when first called overwrites it's plt entry with new address.
+ * Subsequent calls jump directly at the target function in the android library.
+ * This means effectively 0 call overhead after the first call.
+ */
+
+#define VULKAN_IDLOAD(sym) \
+ __asm__ (".type " #sym ", %gnu_indirect_function"); \
+typeof(sym) * sym ## _dispatch (void) __asm__ (#sym);\
+typeof(sym) * sym ## _dispatch (void) \
+{ \
+ if (!vulkan_handle) _init_androidvulkan(); \
+ return (void *) android_dlsym(vulkan_handle, #sym); \
+}
+
+static void _init_androidvulkan()
+{
+ vulkan_handle = (void *) android_dlopen(getenv("LIBVULKAN") ? getenv("LIBVULKAN") : "libvulkan.so", RTLD_LAZY);
+}
+
+static inline void hybris_vulkan_initialize()
+{
+ _init_androidvulkan();
+}
+
+static void * _android_vulkan_dlsym(const char *symbol)
+{
+ if (vulkan_handle == NULL)
+ _init_androidvulkan();
+
+ return android_dlsym(vulkan_handle, symbol);
+}
+
+struct ws_vulkan_interface hybris_vulkan_interface = {
+ _android_vulkan_dlsym,
+};
+
+static PFN_vkVoidFunction (*_vkGetInstanceProcAddr)(VkInstance instance, const char* pName) = NULL;
+
+/* Use IDLOAD approach also for float functions, since vulkan uses the aapcs-vfp calling convention even on android */
+
+VkResult vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance)
+{
+ if (_vkGetInstanceProcAddr == NULL) {
+ HYBRIS_DLSYSM(vulkan, &_vkGetInstanceProcAddr, "vkGetInstanceProcAddr");
+ }
+ ws_vkSetInstanceProcAddrFunc((PFN_vkVoidFunction)_vkGetInstanceProcAddr);
+
+ return ws_vkCreateInstance(pCreateInfo, pAllocator, pInstance);
+}
+
+VULKAN_IDLOAD(vkDestroyInstance);
+VULKAN_IDLOAD(vkEnumeratePhysicalDevices);
+VULKAN_IDLOAD(vkGetPhysicalDeviceFeatures);
+VULKAN_IDLOAD(vkGetPhysicalDeviceFormatProperties);
+VULKAN_IDLOAD(vkGetPhysicalDeviceImageFormatProperties);
+VULKAN_IDLOAD(vkGetPhysicalDeviceProperties);
+VULKAN_IDLOAD(vkGetPhysicalDeviceQueueFamilyProperties);
+VULKAN_IDLOAD(vkGetPhysicalDeviceMemoryProperties);
+
+VkResult vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties)
+{
+ if (_vkGetInstanceProcAddr == NULL) {
+ HYBRIS_DLSYSM(vulkan, &_vkGetInstanceProcAddr, "vkGetInstanceProcAddr");
+ }
+ ws_vkSetInstanceProcAddrFunc((PFN_vkVoidFunction)_vkGetInstanceProcAddr);
+
+ return ws_vkEnumerateInstanceExtensionProperties(pLayerName, pPropertyCount, pProperties);
+}
+
+#ifdef WANT_WAYLAND
+VkResult vkCreateWaylandSurfaceKHR(VkInstance instance,
+ const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface)
+{
+ return ws_vkCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface);
+}
+
+VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display)
+{
+ return ws_vkGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display);
+}
+
+void vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator)
+{
+ ws_vkDestroySurfaceKHR(instance, surface, pAllocator);
+}
+#else
+VULKAN_IDLOAD(vkDestroySurfaceKHR);
+#endif
+
+PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance instance, const char* pName)
+{
+ if (_vkGetInstanceProcAddr == NULL) {
+ HYBRIS_DLSYSM(vulkan, &_vkGetInstanceProcAddr, "vkGetInstanceProcAddr");
+ }
+
+ if (!strcmp(pName, "vkEnumerateInstanceExtensionProperties")) {
+ return (PFN_vkVoidFunction)vkEnumerateInstanceExtensionProperties;
+ } else if (!strcmp(pName, "vkCreateInstance")) {
+ return (PFN_vkVoidFunction)vkCreateInstance;
+ } else if (!strcmp(pName, "vkGetInstanceProcAddr")) {
+ return (PFN_vkVoidFunction)vkGetInstanceProcAddr;
+#ifdef WANT_WAYLAND
+ } else if (!strcmp(pName, "vkCreateWaylandSurfaceKHR")) {
+ return (PFN_vkVoidFunction)vkCreateWaylandSurfaceKHR;
+ } else if (!strcmp(pName, "vkGetPhysicalDeviceWaylandPresentationSupportKHR")) {
+ return (PFN_vkVoidFunction)vkGetPhysicalDeviceWaylandPresentationSupportKHR;
+ } else if (!strcmp(pName, "vkDestroySurfaceKHR")) {
+ return (PFN_vkVoidFunction)vkDestroySurfaceKHR;
+#endif
+ }
+
+ return (*_vkGetInstanceProcAddr)(instance, pName);
+}
+
+VULKAN_IDLOAD(vkGetDeviceProcAddr);
+VULKAN_IDLOAD(vkCreateDevice);
+VULKAN_IDLOAD(vkDestroyDevice);
+VULKAN_IDLOAD(vkEnumerateDeviceExtensionProperties);
+VULKAN_IDLOAD(vkEnumerateInstanceLayerProperties);
+VULKAN_IDLOAD(vkEnumerateDeviceLayerProperties);
+VULKAN_IDLOAD(vkGetDeviceQueue);
+VULKAN_IDLOAD(vkQueueSubmit);
+VULKAN_IDLOAD(vkQueueWaitIdle);
+VULKAN_IDLOAD(vkDeviceWaitIdle);
+VULKAN_IDLOAD(vkAllocateMemory);
+VULKAN_IDLOAD(vkFreeMemory);
+VULKAN_IDLOAD(vkMapMemory);
+VULKAN_IDLOAD(vkUnmapMemory);
+VULKAN_IDLOAD(vkFlushMappedMemoryRanges);
+VULKAN_IDLOAD(vkInvalidateMappedMemoryRanges);
+VULKAN_IDLOAD(vkGetDeviceMemoryCommitment);
+VULKAN_IDLOAD(vkBindBufferMemory);
+VULKAN_IDLOAD(vkBindImageMemory);
+VULKAN_IDLOAD(vkGetBufferMemoryRequirements);
+VULKAN_IDLOAD(vkGetImageMemoryRequirements);
+VULKAN_IDLOAD(vkGetImageSparseMemoryRequirements);
+VULKAN_IDLOAD(vkGetPhysicalDeviceSparseImageFormatProperties);
+VULKAN_IDLOAD(vkQueueBindSparse);
+VULKAN_IDLOAD(vkCreateFence);
+VULKAN_IDLOAD(vkDestroyFence);
+VULKAN_IDLOAD(vkResetFences);
+VULKAN_IDLOAD(vkGetFenceStatus);
+VULKAN_IDLOAD(vkWaitForFences);
+VULKAN_IDLOAD(vkCreateSemaphore);
+VULKAN_IDLOAD(vkDestroySemaphore);
+VULKAN_IDLOAD(vkCreateEvent);
+VULKAN_IDLOAD(vkDestroyEvent);
+VULKAN_IDLOAD(vkGetEventStatus);
+VULKAN_IDLOAD(vkSetEvent);
+VULKAN_IDLOAD(vkResetEvent);
+VULKAN_IDLOAD(vkCreateQueryPool);
+VULKAN_IDLOAD(vkDestroyQueryPool);
+VULKAN_IDLOAD(vkGetQueryPoolResults);
+VULKAN_IDLOAD(vkCreateBuffer);
+VULKAN_IDLOAD(vkDestroyBuffer);
+VULKAN_IDLOAD(vkCreateBufferView);
+VULKAN_IDLOAD(vkDestroyBufferView);
+VULKAN_IDLOAD(vkCreateImage);
+VULKAN_IDLOAD(vkDestroyImage);
+VULKAN_IDLOAD(vkGetImageSubresourceLayout);
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/vulkanhybris.h
^
|
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012 Simon Busch <morphis@gravedo.de>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef VULKAN_HYBRIS_H_
+#define VULKAN_HYBRIS_H_
+
+#include "platformcommon.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *hybris_android_vulkan_dlsym(const char *symbol);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/ws.c
^
|
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ws.h"
+
+#include <assert.h>
+#include <dlfcn.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/auxv.h>
+
+static struct ws_module *ws = NULL;
+
+static void _init_ws()
+{
+ if (ws == NULL) {
+ char ws_name[2048];
+ char *vulkan_platform;
+
+ vulkan_platform=getenv("HYBRIS_VULKANPLATFORM");
+
+ if (vulkan_platform == NULL)
+ vulkan_platform = "wayland";
+
+ const char *vulkanplatform_dir = PKGLIBDIR;
+ const char *user_vulkanplatform_dir = getauxval(AT_SECURE)
+ ? NULL
+ : getenv("HYBRIS_VULKANPLATFORM_DIR");
+ if (user_vulkanplatform_dir)
+ vulkanplatform_dir = user_vulkanplatform_dir;
+
+ snprintf(ws_name, 2048, "%s/vulkanplatform_%s.so", vulkanplatform_dir, vulkan_platform);
+
+ void *wsmod = (void *) dlopen(ws_name, RTLD_LAZY);
+ if (wsmod == NULL) {
+ fprintf(stderr, "ERROR: %s\n\t%s\n", ws_name, dlerror());
+ assert(0);
+ }
+ ws = dlsym(wsmod, "ws_module_info");
+ assert(ws != NULL);
+ ws->init_module(&hybris_vulkan_interface);
+ }
+}
+
+VkResult ws_vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties)
+{
+ _init_ws();
+ return ws->vkEnumerateInstanceExtensionProperties(pLayerName, pPropertyCount, pProperties);
+}
+
+VkResult ws_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
+{
+ _init_ws();
+ return ws->vkCreateInstance(pCreateInfo, pAllocator, pInstance);
+}
+
+#ifdef WANT_WAYLAND
+VkResult ws_vkCreateWaylandSurfaceKHR(VkInstance instance,
+ const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface)
+{
+ _init_ws();
+ return ws->vkCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface);
+}
+
+VkBool32 ws_vkGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display)
+{
+ _init_ws();
+ return ws->vkGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display);
+}
+
+void ws_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator)
+{
+ _init_ws();
+ ws->vkDestroySurfaceKHR(instance, surface, pAllocator);
+}
+#endif
+
+void ws_vkSetInstanceProcAddrFunc(PFN_vkVoidFunction addr)
+{
+ _init_ws();
+ return ws->vkSetInstanceProcAddrFunc(addr);
+}
+
+// vim:ts=4:sw=4:noexpandtab
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/hybris/vulkan/ws.h
^
|
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2013-2022 Jolla Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __LIBHYBRIS_VULKAN_WS_H
+#define __LIBHYBRIS_VULKAN_WS_H
+
+#define VK_USE_PLATFORM_ANDROID_KHR 1
+#define VK_USE_PLATFORM_WAYLAND_KHR 1
+
+#include "config.h"
+#include <vulkan/vulkan.h>
+
+struct ws_vulkan_interface {
+ void * (*android_vulkan_dlsym)(const char *symbol);
+};
+
+/* Defined in vulkan.c */
+extern struct ws_vulkan_interface hybris_vulkan_interface;
+
+struct ws_module {
+ void (*init_module)(struct ws_vulkan_interface *vulkan_interface);
+
+ VkResult (*vkEnumerateInstanceExtensionProperties)(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties);
+ VkResult (*vkCreateInstance)(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance);
+#ifdef WANT_WAYLAND
+ VkResult (*vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+ VkBool32 (*vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
+ void (*vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator);
+#endif
+ void (*vkSetInstanceProcAddrFunc)(PFN_vkVoidFunction addr);
+};
+
+VkResult ws_vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties);
+VkResult ws_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance);
+#ifdef WANT_WAYLAND
+VkResult ws_vkCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+VkBool32 ws_vkGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
+void ws_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator);
+#endif
+void ws_vkSetInstanceProcAddrFunc(PFN_vkVoidFunction addr);
+#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.48.tar.bz2/libhybris/utils/load_sym_files.py
^
|
@@ -84,8 +84,9 @@
if not lib.startswith(libdir):
continue
- p = subprocess.Popen("objdump -h " + lib , shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
- for header in p.stdout.read().decode('ascii').split("\n"):
+ outs = subprocess.check_output(["objdump", "-h", lib])
+
+ for header in outs.decode('ascii').split("\n"):
#6 .text 00044ef7 00017f80 00017f80 00017f80 2**4
t = re.match("\s*[0-9]+\s+\.text\s+([0-9A-Fa-f]+\s+){3}([0-9A-Fa-f]+)", header)
if t:
|