mesa: whitespace fixes, 80-column wrapping, etc.
This commit is contained in:
@@ -1713,6 +1713,7 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
|
|||||||
ctx->Driver.FlushMappedBufferRange(ctx, target, offset, length, bufObj);
|
ctx->Driver.FlushMappedBufferRange(ctx, target, offset, length, bufObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if FEATURE_APPLE_object_purgeable
|
#if FEATURE_APPLE_object_purgeable
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_BufferObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
_mesa_BufferObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
||||||
@@ -1746,6 +1747,7 @@ _mesa_BufferObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
_mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
@@ -1774,6 +1776,7 @@ _mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_TextureObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
_mesa_TextureObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
@@ -1802,6 +1805,7 @@ _mesa_TextureObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GLenum GLAPIENTRY
|
GLenum GLAPIENTRY
|
||||||
_mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
_mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
@@ -1817,11 +1821,12 @@ _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
|||||||
switch (option) {
|
switch (option) {
|
||||||
case GL_VOLATILE_APPLE:
|
case GL_VOLATILE_APPLE:
|
||||||
case GL_RELEASED_APPLE:
|
case GL_RELEASED_APPLE:
|
||||||
|
/* legal */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
"glObjectPurgeable(name = 0x%x) invalid option: %d", name, option);
|
"glObjectPurgeable(name = 0x%x) invalid option: %d",
|
||||||
|
name, option);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1832,14 +1837,15 @@ _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
|||||||
return _mesa_RenderObjectPurgeable (ctx, name, option);
|
return _mesa_RenderObjectPurgeable (ctx, name, option);
|
||||||
case GL_BUFFER_OBJECT_APPLE:
|
case GL_BUFFER_OBJECT_APPLE:
|
||||||
return _mesa_BufferObjectPurgeable (ctx, name, option);
|
return _mesa_BufferObjectPurgeable (ctx, name, option);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
"glObjectPurgeable(name = 0x%x) invalid type: %d", name, objectType);
|
"glObjectPurgeable(name = 0x%x) invalid type: %d",
|
||||||
|
name, objectType);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
_mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
@@ -1855,7 +1861,8 @@ _mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
|||||||
|
|
||||||
if (! bufObj->Purgeable) {
|
if (! bufObj->Purgeable) {
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||||
"glObjectUnpurgeable(name = 0x%x) object is already \"unpurged\"", name);
|
"glObjectUnpurgeable(name = 0x%x) object is "
|
||||||
|
" already \"unpurged\"", name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1868,6 +1875,7 @@ _mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
_mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
@@ -1883,7 +1891,8 @@ _mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
|||||||
|
|
||||||
if (! bufObj->Purgeable) {
|
if (! bufObj->Purgeable) {
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||||
"glObjectUnpurgeable(name = 0x%x) object is already \"unpurged\"", name);
|
"glObjectUnpurgeable(name = 0x%x) object is "
|
||||||
|
" already \"unpurged\"", name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1896,6 +1905,7 @@ _mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
_mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
@@ -1911,7 +1921,8 @@ _mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
|||||||
|
|
||||||
if (! bufObj->Purgeable) {
|
if (! bufObj->Purgeable) {
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||||
"glObjectUnpurgeable(name = 0x%x) object is already \"unpurged\"", name);
|
"glObjectUnpurgeable(name = 0x%x) object is"
|
||||||
|
" already \"unpurged\"", name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1924,6 +1935,7 @@ _mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GLenum GLAPIENTRY
|
GLenum GLAPIENTRY
|
||||||
_mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
_mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
@@ -1939,33 +1951,34 @@ _mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
|||||||
switch (option) {
|
switch (option) {
|
||||||
case GL_RETAINED_APPLE:
|
case GL_RETAINED_APPLE:
|
||||||
case GL_UNDEFINED_APPLE:
|
case GL_UNDEFINED_APPLE:
|
||||||
|
/* legal */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
"glObjectUnpurgeable(name = 0x%x) invalid option: %d", name, option);
|
"glObjectUnpurgeable(name = 0x%x) invalid option: %d",
|
||||||
|
name, option);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (objectType) {
|
switch (objectType) {
|
||||||
case GL_BUFFER_OBJECT_APPLE:
|
case GL_BUFFER_OBJECT_APPLE:
|
||||||
return _mesa_BufferObjectUnpurgeable(ctx, name, option);
|
return _mesa_BufferObjectUnpurgeable(ctx, name, option);
|
||||||
|
|
||||||
case GL_TEXTURE:
|
case GL_TEXTURE:
|
||||||
return _mesa_TextureObjectUnpurgeable(ctx, name, option);
|
return _mesa_TextureObjectUnpurgeable(ctx, name, option);
|
||||||
|
|
||||||
case GL_RENDERBUFFER_EXT:
|
case GL_RENDERBUFFER_EXT:
|
||||||
return _mesa_RenderObjectUnpurgeable(ctx, name, option);
|
return _mesa_RenderObjectUnpurgeable(ctx, name, option);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
"glObjectUnpurgeable(name = 0x%x) invalid type: %d", name, objectType);
|
"glObjectUnpurgeable(name = 0x%x) invalid type: %d",
|
||||||
|
name, objectType);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_mesa_GetBufferObjectParameterivAPPLE(GLcontext *ctx, GLuint name, GLenum pname, GLint* params)
|
_mesa_GetBufferObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
|
||||||
|
GLenum pname, GLint* params)
|
||||||
{
|
{
|
||||||
struct gl_buffer_object *bufObj;
|
struct gl_buffer_object *bufObj;
|
||||||
|
|
||||||
@@ -1980,16 +1993,18 @@ _mesa_GetBufferObjectParameterivAPPLE(GLcontext *ctx, GLuint name, GLenum pname,
|
|||||||
case GL_PURGEABLE_APPLE:
|
case GL_PURGEABLE_APPLE:
|
||||||
*params = bufObj->Purgeable;
|
*params = bufObj->Purgeable;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
"glGetObjectParameteriv(name = 0x%x) invalid enum: %d", name, pname);
|
"glGetObjectParameteriv(name = 0x%x) invalid enum: %d",
|
||||||
|
name, pname);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_mesa_GetRenderObjectParameterivAPPLE(GLcontext *ctx, GLuint name, GLenum pname, GLint* params)
|
_mesa_GetRenderObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
|
||||||
|
GLenum pname, GLint* params)
|
||||||
{
|
{
|
||||||
struct gl_renderbuffer *bufObj;
|
struct gl_renderbuffer *bufObj;
|
||||||
|
|
||||||
@@ -2004,16 +2019,18 @@ _mesa_GetRenderObjectParameterivAPPLE(GLcontext *ctx, GLuint name, GLenum pname,
|
|||||||
case GL_PURGEABLE_APPLE:
|
case GL_PURGEABLE_APPLE:
|
||||||
*params = bufObj->Purgeable;
|
*params = bufObj->Purgeable;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
"glGetObjectParameteriv(name = 0x%x) invalid enum: %d", name, pname);
|
"glGetObjectParameteriv(name = 0x%x) invalid enum: %d",
|
||||||
|
name, pname);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_mesa_GetTextureObjectParameterivAPPLE(GLcontext *ctx, GLuint name, GLenum pname, GLint* params)
|
_mesa_GetTextureObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
|
||||||
|
GLenum pname, GLint* params)
|
||||||
{
|
{
|
||||||
struct gl_texture_object *bufObj;
|
struct gl_texture_object *bufObj;
|
||||||
|
|
||||||
@@ -2028,16 +2045,18 @@ _mesa_GetTextureObjectParameterivAPPLE(GLcontext *ctx, GLuint name, GLenum pname
|
|||||||
case GL_PURGEABLE_APPLE:
|
case GL_PURGEABLE_APPLE:
|
||||||
*params = bufObj->Purgeable;
|
*params = bufObj->Purgeable;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
"glGetObjectParameteriv(name = 0x%x) invalid enum: %d", name, pname);
|
"glGetObjectParameteriv(name = 0x%x) invalid enum: %d",
|
||||||
|
name, pname);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint* params)
|
_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname,
|
||||||
|
GLint* params)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
|
||||||
@@ -2051,18 +2070,17 @@ _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GL
|
|||||||
case GL_TEXTURE:
|
case GL_TEXTURE:
|
||||||
_mesa_GetTextureObjectParameterivAPPLE (ctx, name, pname, params);
|
_mesa_GetTextureObjectParameterivAPPLE (ctx, name, pname, params);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GL_BUFFER_OBJECT_APPLE:
|
case GL_BUFFER_OBJECT_APPLE:
|
||||||
_mesa_GetBufferObjectParameterivAPPLE (ctx, name, pname, params);
|
_mesa_GetBufferObjectParameterivAPPLE (ctx, name, pname, params);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GL_RENDERBUFFER_EXT:
|
case GL_RENDERBUFFER_EXT:
|
||||||
_mesa_GetRenderObjectParameterivAPPLE (ctx, name, pname, params);
|
_mesa_GetRenderObjectParameterivAPPLE (ctx, name, pname, params);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
"glGetObjectParameteriv(name = 0x%x) invalid type: %d", name, objectType);
|
"glGetObjectParameteriv(name = 0x%x) invalid type: %d",
|
||||||
|
name, objectType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif /* FEATURE_APPLE_object_purgeable */
|
||||||
|
Reference in New Issue
Block a user