mesa: rename functions to follow Mesa conventions
This commit is contained in:
@@ -1538,7 +1538,7 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
|
|||||||
|
|
||||||
#if FEATURE_APPLE_object_purgeable
|
#if FEATURE_APPLE_object_purgeable
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_BufferObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
buffer_object_purgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
struct gl_buffer_object *bufObj;
|
struct gl_buffer_object *bufObj;
|
||||||
GLenum retval;
|
GLenum retval;
|
||||||
@@ -1571,7 +1571,7 @@ _mesa_BufferObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
|||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_RenderObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
renderbuffer_purgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
struct gl_renderbuffer *bufObj;
|
struct gl_renderbuffer *bufObj;
|
||||||
GLenum retval;
|
GLenum retval;
|
||||||
@@ -1600,7 +1600,7 @@ _mesa_RenderObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
|||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_TextureObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
texture_object_purgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
struct gl_texture_object *bufObj;
|
struct gl_texture_object *bufObj;
|
||||||
GLenum retval;
|
GLenum retval;
|
||||||
@@ -1656,13 +1656,13 @@ _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
|||||||
|
|
||||||
switch (objectType) {
|
switch (objectType) {
|
||||||
case GL_TEXTURE:
|
case GL_TEXTURE:
|
||||||
retval = _mesa_TextureObjectPurgeable (ctx, name, option);
|
retval = texture_object_purgeable(ctx, name, option);
|
||||||
break;
|
break;
|
||||||
case GL_RENDERBUFFER_EXT:
|
case GL_RENDERBUFFER_EXT:
|
||||||
retval = _mesa_RenderObjectPurgeable (ctx, name, option);
|
retval = renderbuffer_purgeable(ctx, name, option);
|
||||||
break;
|
break;
|
||||||
case GL_BUFFER_OBJECT_APPLE:
|
case GL_BUFFER_OBJECT_APPLE:
|
||||||
retval = _mesa_BufferObjectPurgeable (ctx, name, option);
|
retval = buffer_object_purgeable(ctx, name, option);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
@@ -1681,7 +1681,7 @@ _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
|||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_BufferObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
buffer_object_unpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
struct gl_buffer_object *bufObj;
|
struct gl_buffer_object *bufObj;
|
||||||
GLenum retval;
|
GLenum retval;
|
||||||
@@ -1711,7 +1711,7 @@ _mesa_BufferObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option
|
|||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_RenderObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
renderbuffer_unpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
struct gl_renderbuffer *bufObj;
|
struct gl_renderbuffer *bufObj;
|
||||||
GLenum retval;
|
GLenum retval;
|
||||||
@@ -1741,7 +1741,7 @@ _mesa_RenderObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option
|
|||||||
|
|
||||||
|
|
||||||
static GLenum
|
static GLenum
|
||||||
_mesa_TextureObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
texture_object_unpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
|
||||||
{
|
{
|
||||||
struct gl_texture_object *bufObj;
|
struct gl_texture_object *bufObj;
|
||||||
GLenum retval;
|
GLenum retval;
|
||||||
@@ -1796,11 +1796,11 @@ _mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
|||||||
|
|
||||||
switch (objectType) {
|
switch (objectType) {
|
||||||
case GL_BUFFER_OBJECT_APPLE:
|
case GL_BUFFER_OBJECT_APPLE:
|
||||||
return _mesa_BufferObjectUnpurgeable(ctx, name, option);
|
return buffer_object_unpurgeable(ctx, name, option);
|
||||||
case GL_TEXTURE:
|
case GL_TEXTURE:
|
||||||
return _mesa_TextureObjectUnpurgeable(ctx, name, option);
|
return texture_object_unpurgeable(ctx, name, option);
|
||||||
case GL_RENDERBUFFER_EXT:
|
case GL_RENDERBUFFER_EXT:
|
||||||
return _mesa_RenderObjectUnpurgeable(ctx, name, option);
|
return renderbuffer_unpurgeable(ctx, name, option);
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
"glObjectUnpurgeable(name = 0x%x) invalid type: %d",
|
"glObjectUnpurgeable(name = 0x%x) invalid type: %d",
|
||||||
@@ -1811,12 +1811,10 @@ _mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_mesa_GetBufferObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
|
get_buffer_object_parameteriv(struct gl_context *ctx, GLuint name,
|
||||||
GLenum pname, GLint* params)
|
GLenum pname, GLint *params)
|
||||||
{
|
{
|
||||||
struct gl_buffer_object *bufObj;
|
struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, name);
|
||||||
|
|
||||||
bufObj = _mesa_lookup_bufferobj(ctx, name);
|
|
||||||
if (!bufObj) {
|
if (!bufObj) {
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||||
"glGetObjectParameteriv(name = 0x%x) invalid object", name);
|
"glGetObjectParameteriv(name = 0x%x) invalid object", name);
|
||||||
@@ -1837,13 +1835,11 @@ _mesa_GetBufferObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_mesa_GetRenderObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
|
get_renderbuffer_parameteriv(struct gl_context *ctx, GLuint name,
|
||||||
GLenum pname, GLint* params)
|
GLenum pname, GLint *params)
|
||||||
{
|
{
|
||||||
struct gl_renderbuffer *bufObj;
|
struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx, name);
|
||||||
|
if (!rb) {
|
||||||
bufObj = _mesa_lookup_renderbuffer(ctx, name);
|
|
||||||
if (!bufObj) {
|
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||||
"glObjectUnpurgeable(name = 0x%x)", name);
|
"glObjectUnpurgeable(name = 0x%x)", name);
|
||||||
return;
|
return;
|
||||||
@@ -1851,7 +1847,7 @@ _mesa_GetRenderObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
|
|||||||
|
|
||||||
switch (pname) {
|
switch (pname) {
|
||||||
case GL_PURGEABLE_APPLE:
|
case GL_PURGEABLE_APPLE:
|
||||||
*params = bufObj->Purgeable;
|
*params = rb->Purgeable;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
@@ -1863,13 +1859,11 @@ _mesa_GetRenderObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_mesa_GetTextureObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
|
get_texture_object_parameteriv(struct gl_context *ctx, GLuint name,
|
||||||
GLenum pname, GLint* params)
|
GLenum pname, GLint *params)
|
||||||
{
|
{
|
||||||
struct gl_texture_object *bufObj;
|
struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, name);
|
||||||
|
if (!texObj) {
|
||||||
bufObj = _mesa_lookup_texture(ctx, name);
|
|
||||||
if (!bufObj) {
|
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||||
"glObjectUnpurgeable(name = 0x%x)", name);
|
"glObjectUnpurgeable(name = 0x%x)", name);
|
||||||
return;
|
return;
|
||||||
@@ -1877,7 +1871,7 @@ _mesa_GetTextureObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
|
|||||||
|
|
||||||
switch (pname) {
|
switch (pname) {
|
||||||
case GL_PURGEABLE_APPLE:
|
case GL_PURGEABLE_APPLE:
|
||||||
*params = bufObj->Purgeable;
|
*params = texObj->Purgeable;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
@@ -1890,7 +1884,7 @@ _mesa_GetTextureObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
|
|||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname,
|
_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname,
|
||||||
GLint* params)
|
GLint *params)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
|
||||||
@@ -1902,13 +1896,13 @@ _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname,
|
|||||||
|
|
||||||
switch (objectType) {
|
switch (objectType) {
|
||||||
case GL_TEXTURE:
|
case GL_TEXTURE:
|
||||||
_mesa_GetTextureObjectParameterivAPPLE (ctx, name, pname, params);
|
get_texture_object_parameteriv(ctx, name, pname, params);
|
||||||
break;
|
break;
|
||||||
case GL_BUFFER_OBJECT_APPLE:
|
case GL_BUFFER_OBJECT_APPLE:
|
||||||
_mesa_GetBufferObjectParameterivAPPLE (ctx, name, pname, params);
|
get_buffer_object_parameteriv(ctx, name, pname, params);
|
||||||
break;
|
break;
|
||||||
case GL_RENDERBUFFER_EXT:
|
case GL_RENDERBUFFER_EXT:
|
||||||
_mesa_GetRenderObjectParameterivAPPLE (ctx, name, pname, params);
|
get_renderbuffer_parameteriv(ctx, name, pname, params);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
|
Reference in New Issue
Block a user