Commit b0e93551 by Nicolas Capens Committed by Nicolas Capens

Update to the latest Khronos headers.

BUG=18110152 Change-Id: Ie623104ccf7ca8d8a7646a8563cf79f17762e137 Reviewed-on: https://swiftshader-review.googlesource.com/1270Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 1e7c4fec
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define __eglplatform_h_ #define __eglplatform_h_
/* /*
** Copyright (c) 2007-2009 The Khronos Group Inc. ** Copyright (c) 2007-2013 The Khronos Group Inc.
** **
** Permission is hereby granted, free of charge, to any person obtaining a ** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the ** copy of this software and/or associated documentation files (the
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
/* Platform-specific types and definitions for egl.h /* Platform-specific types and definitions for egl.h
* $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $ * $Revision: 23432 $ on $Date: 2013-10-09 00:57:24 -0700 (Wed, 09 Oct 2013) $
* *
* Adopters may modify khrplatform.h and this file to suit their platform. * 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 * You are encouraged to submit all modifications to the Khronos group so that
...@@ -83,13 +83,17 @@ typedef int EGLNativeDisplayType; ...@@ -83,13 +83,17 @@ typedef int EGLNativeDisplayType;
typedef void *EGLNativeWindowType; typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType; typedef void *EGLNativePixmapType;
#elif defined(WL_EGL_PLATFORM) #elif defined(__ANDROID__) || defined(ANDROID)
typedef struct wl_display *EGLNativeDisplayType; #include <android/native_window.h>
typedef struct wl_egl_pixmap *EGLNativePixmapType;
typedef struct wl_egl_window *EGLNativeWindowType;
#elif defined(__unix__) && !defined(ANDROID) struct egl_native_pixmap_t;
typedef struct ANativeWindow* EGLNativeWindowType;
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
typedef void* EGLNativeDisplayType;
#elif defined(__unix__)
/* X11 (tentative) */ /* X11 (tentative) */
#include <X11/Xlib.h> #include <X11/Xlib.h>
...@@ -99,14 +103,6 @@ typedef Display *EGLNativeDisplayType; ...@@ -99,14 +103,6 @@ typedef Display *EGLNativeDisplayType;
typedef Pixmap EGLNativePixmapType; typedef Pixmap EGLNativePixmapType;
typedef Window EGLNativeWindowType; typedef Window EGLNativeWindowType;
#elif defined(ANDROID)
struct egl_native_pixmap_t;
typedef struct ANativeWindow* EGLNativeWindowType;
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
typedef void* EGLNativeDisplayType;
#else #else
#error "Platform not recognized" #error "Platform not recognized"
#endif #endif
......
This source diff could not be displayed because it is too large. You can view the blob instead.
#ifndef __gl2platform_h_ #ifndef __gl2platform_h_
#define __gl2platform_h_ #define __gl2platform_h_
/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ /* $Revision: 23328 $ on $Date:: 2013-10-02 02:28:28 -0700 #$ */
/* /*
* This document is licensed under the SGI Free Software B License Version * This document is licensed under the SGI Free Software B License Version
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/* Khronos platform-specific types and definitions. /* Khronos platform-specific types and definitions.
* *
* $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
* *
* Adopters may modify this file to suit their platform. Adopters are * Adopters may modify this file to suit their platform. Adopters are
* encouraged to submit platform specific modifications to the Khronos * encouraged to submit platform specific modifications to the Khronos
...@@ -114,8 +114,6 @@ ...@@ -114,8 +114,6 @@
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
/* Win32 but not WinCE */ /* Win32 but not WinCE */
# define KHRONOS_APIENTRY __stdcall # define KHRONOS_APIENTRY __stdcall
#elif defined(__GNUC__) && defined(__i386__)
# define KHRONOS_APIENTRY __attribute__((__force_align_arg_pointer__))
#else #else
# define KHRONOS_APIENTRY # define KHRONOS_APIENTRY
#endif #endif
...@@ -223,10 +221,23 @@ typedef signed char khronos_int8_t; ...@@ -223,10 +221,23 @@ typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t; typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t; typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t; typedef unsigned short int khronos_uint16_t;
/*
* Types that differ between LLP64 and LP64 architectures - in LLP64,
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
* to be the only LLP64 architecture in current use.
*/
#ifdef _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 signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t; typedef unsigned long int khronos_uintptr_t;
typedef signed long int khronos_ssize_t; typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t; typedef unsigned long int khronos_usize_t;
#endif
#if KHRONOS_SUPPORT_FLOAT #if KHRONOS_SUPPORT_FLOAT
/* /*
......
...@@ -46,7 +46,7 @@ GLuint Shader::getHandle() const ...@@ -46,7 +46,7 @@ GLuint Shader::getHandle() const
return mHandle; return mHandle;
} }
void Shader::setSource(GLsizei count, const char **string, const GLint *length) void Shader::setSource(GLsizei count, const char *const *string, const GLint *length)
{ {
delete[] mSource; delete[] mSource;
int totalLength = 0; int totalLength = 0;
......
...@@ -75,7 +75,7 @@ public: ...@@ -75,7 +75,7 @@ public:
GLuint getHandle() const; GLuint getHandle() const;
void deleteSource(); void deleteSource();
void setSource(GLsizei count, const char **string, const GLint *length); void setSource(GLsizei count, const char *const *string, const GLint *length);
int getInfoLogLength() const; int getInfoLogLength() const;
void getInfoLog(GLsizei bufSize, GLsizei *length, char *infoLog); void getInfoLog(GLsizei bufSize, GLsizei *length, char *infoLog);
int getSourceLength() const; int getSourceLength() const;
......
...@@ -4545,7 +4545,7 @@ void GL_APIENTRY glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryf ...@@ -4545,7 +4545,7 @@ void GL_APIENTRY glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryf
} }
} }
void GL_APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) void GL_APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
{ {
TRACE("(GLuint shader = %d, GLsizei count = %d, const GLchar** string = 0x%0.8p, const GLint* length = 0x%0.8p)", TRACE("(GLuint shader = %d, GLsizei count = %d, const GLchar** string = 0x%0.8p, const GLint* length = 0x%0.8p)",
shader, count, string, length); shader, count, string, length);
......
...@@ -244,7 +244,7 @@ namespace gl ...@@ -244,7 +244,7 @@ namespace gl
bool IsStencilTexture(GLenum format) bool IsStencilTexture(GLenum format)
{ {
if(format == GL_STENCIL_INDEX || if(format == GL_STENCIL_INDEX_OES ||
format == GL_DEPTH_STENCIL_OES) format == GL_DEPTH_STENCIL_OES)
{ {
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment