summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r--src/mesa/drivers/common/meta.c138
1 files changed, 69 insertions, 69 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 8d9a037f92d..f4995db594e 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -164,7 +164,7 @@ struct save_state
GLuint EnvMode; /* unit[0] only */
/** MESA_META_VERTEX */
- struct gl_array_object *ArrayObj;
+ struct gl_array_object *VAO;
struct gl_buffer_object *ArrayBufferObj;
/** MESA_META_VIEWPORT */
@@ -221,7 +221,7 @@ struct temp_texture
*/
struct blit_state
{
- GLuint ArrayObj;
+ GLuint VAO;
GLuint VBO;
GLuint DepthFP;
GLuint ShaderProg;
@@ -235,7 +235,7 @@ struct blit_state
*/
struct clear_state
{
- GLuint ArrayObj;
+ GLuint VAO;
GLuint VBO;
GLuint ShaderProg;
GLint ColorLocation;
@@ -252,7 +252,7 @@ struct clear_state
*/
struct copypix_state
{
- GLuint ArrayObj;
+ GLuint VAO;
GLuint VBO;
};
@@ -262,7 +262,7 @@ struct copypix_state
*/
struct drawpix_state
{
- GLuint ArrayObj;
+ GLuint VAO;
GLuint StencilFP; /**< Fragment program for drawing stencil images */
GLuint DepthFP; /**< Fragment program for drawing depth images */
@@ -274,7 +274,7 @@ struct drawpix_state
*/
struct bitmap_state
{
- GLuint ArrayObj;
+ GLuint VAO;
GLuint VBO;
struct temp_texture Tex; /**< separate texture from other meta ops */
};
@@ -295,7 +295,7 @@ struct glsl_sampler {
*/
struct gen_mipmap_state
{
- GLuint ArrayObj;
+ GLuint VAO;
GLuint VBO;
GLuint FBO;
GLuint Sampler;
@@ -313,7 +313,7 @@ struct gen_mipmap_state
*/
struct decompress_state
{
- GLuint ArrayObj;
+ GLuint VAO;
GLuint VBO, FBO, RBO, Sampler;
GLint Width, Height;
};
@@ -323,7 +323,7 @@ struct decompress_state
*/
struct drawtex_state
{
- GLuint ArrayObj;
+ GLuint VAO;
GLuint VBO;
};
@@ -729,8 +729,8 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
if (state & MESA_META_VERTEX) {
/* save vertex array object state */
- _mesa_reference_array_object(ctx, &save->ArrayObj,
- ctx->Array.ArrayObj);
+ _mesa_reference_array_object(ctx, &save->VAO,
+ ctx->Array.VAO);
_mesa_reference_buffer_object(ctx, &save->ArrayBufferObj,
ctx->Array.ArrayBufferObj);
/* set some default state? */
@@ -1095,8 +1095,8 @@ _mesa_meta_end(struct gl_context *ctx)
_mesa_reference_buffer_object(ctx, &save->ArrayBufferObj, NULL);
/* restore vertex array object */
- _mesa_BindVertexArray(save->ArrayObj->Name);
- _mesa_reference_array_object(ctx, &save->ArrayObj, NULL);
+ _mesa_BindVertexArray(save->VAO->Name);
+ _mesa_reference_array_object(ctx, &save->VAO, NULL);
}
if (state & MESA_META_VIEWPORT) {
@@ -1463,12 +1463,12 @@ setup_ff_blit_framebuffer(struct blit_state *blit)
};
struct vertex verts[4];
- if (blit->ArrayObj == 0) {
+ if (blit->VAO == 0) {
/* one-time setup */
/* create vertex array object */
- _mesa_GenVertexArrays(1, &blit->ArrayObj);
- _mesa_BindVertexArray(blit->ArrayObj);
+ _mesa_GenVertexArrays(1, &blit->VAO);
+ _mesa_BindVertexArray(blit->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &blit->VBO);
@@ -1510,11 +1510,11 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx,
assert(_mesa_is_desktop_gl(ctx) || texture_2d);
/* Check if already initialized */
- if (blit->ArrayObj == 0) {
+ if (blit->VAO == 0) {
/* create vertex array object */
- _mesa_GenVertexArrays(1, &blit->ArrayObj);
- _mesa_BindVertexArray(blit->ArrayObj);
+ _mesa_GenVertexArrays(1, &blit->VAO);
+ _mesa_BindVertexArray(blit->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &blit->VBO);
@@ -1687,7 +1687,7 @@ blitframebuffer_texture(struct gl_context *ctx,
setup_ff_blit_framebuffer(&ctx->Meta->Blit);
}
- _mesa_BindVertexArray(blit->ArrayObj);
+ _mesa_BindVertexArray(blit->VAO);
_mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, blit->VBO);
_mesa_GenSamplers(1, &sampler);
@@ -1872,7 +1872,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
setup_ff_blit_framebuffer(blit);
}
- _mesa_BindVertexArray(blit->ArrayObj);
+ _mesa_BindVertexArray(blit->VAO);
_mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, blit->VBO);
/* Continue with "normal" approach which involves copying the src rect
@@ -2002,9 +2002,9 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
static void
meta_glsl_blit_cleanup(struct blit_state *blit)
{
- if (blit->ArrayObj) {
- _mesa_DeleteVertexArrays(1, &blit->ArrayObj);
- blit->ArrayObj = 0;
+ if (blit->VAO) {
+ _mesa_DeleteVertexArrays(1, &blit->VAO);
+ blit->VAO = 0;
_mesa_DeleteBuffers(1, &blit->VBO);
blit->VBO = 0;
}
@@ -2049,12 +2049,12 @@ _mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers)
_mesa_meta_begin(ctx, metaSave);
- if (clear->ArrayObj == 0) {
+ if (clear->VAO == 0) {
/* one-time setup */
/* create vertex array object */
- _mesa_GenVertexArrays(1, &clear->ArrayObj);
- _mesa_BindVertexArray(clear->ArrayObj);
+ _mesa_GenVertexArrays(1, &clear->VAO);
+ _mesa_BindVertexArray(clear->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &clear->VBO);
@@ -2067,7 +2067,7 @@ _mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers)
_mesa_EnableClientState(GL_COLOR_ARRAY);
}
else {
- _mesa_BindVertexArray(clear->ArrayObj);
+ _mesa_BindVertexArray(clear->VAO);
_mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, clear->VBO);
}
@@ -2182,12 +2182,12 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
GLuint vs, gs = 0, fs;
bool has_integer_textures;
- if (clear->ArrayObj != 0)
+ if (clear->VAO != 0)
return;
/* create vertex array object */
- _mesa_GenVertexArrays(1, &clear->ArrayObj);
- _mesa_BindVertexArray(clear->ArrayObj);
+ _mesa_GenVertexArrays(1, &clear->VAO);
+ _mesa_BindVertexArray(clear->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &clear->VBO);
@@ -2291,10 +2291,10 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
static void
meta_glsl_clear_cleanup(struct clear_state *clear)
{
- if (clear->ArrayObj == 0)
+ if (clear->VAO == 0)
return;
- _mesa_DeleteVertexArrays(1, &clear->ArrayObj);
- clear->ArrayObj = 0;
+ _mesa_DeleteVertexArrays(1, &clear->VAO);
+ clear->VAO = 0;
_mesa_DeleteBuffers(1, &clear->VBO);
clear->VBO = 0;
_mesa_DeleteObjectARB(clear->ShaderProg);
@@ -2359,7 +2359,7 @@ _mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers)
ctx->Color.ClearColor.f);
}
- _mesa_BindVertexArray(clear->ArrayObj);
+ _mesa_BindVertexArray(clear->VAO);
_mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, clear->VBO);
/* GL_COLOR_BUFFER_BIT */
@@ -2472,12 +2472,12 @@ _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY,
MESA_META_VERTEX |
MESA_META_VIEWPORT));
- if (copypix->ArrayObj == 0) {
+ if (copypix->VAO == 0) {
/* one-time setup */
/* create vertex array object */
- _mesa_GenVertexArrays(1, &copypix->ArrayObj);
- _mesa_BindVertexArray(copypix->ArrayObj);
+ _mesa_GenVertexArrays(1, &copypix->VAO);
+ _mesa_BindVertexArray(copypix->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &copypix->VBO);
@@ -2492,7 +2492,7 @@ _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY,
_mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY);
}
else {
- _mesa_BindVertexArray(copypix->ArrayObj);
+ _mesa_BindVertexArray(copypix->VAO);
_mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, copypix->VBO);
}
@@ -2548,9 +2548,9 @@ _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY,
static void
meta_drawpix_cleanup(struct drawpix_state *drawpix)
{
- if (drawpix->ArrayObj != 0) {
- _mesa_DeleteVertexArrays(1, &drawpix->ArrayObj);
- drawpix->ArrayObj = 0;
+ if (drawpix->VAO != 0) {
+ _mesa_DeleteVertexArrays(1, &drawpix->VAO);
+ drawpix->VAO = 0;
}
if (drawpix->StencilFP != 0) {
@@ -2844,11 +2844,11 @@ _mesa_meta_DrawPixels(struct gl_context *ctx,
verts[3].t = tex->Ttop;
}
- if (drawpix->ArrayObj == 0) {
+ if (drawpix->VAO == 0) {
/* one-time setup: create vertex array object */
- _mesa_GenVertexArrays(1, &drawpix->ArrayObj);
+ _mesa_GenVertexArrays(1, &drawpix->VAO);
}
- _mesa_BindVertexArray(drawpix->ArrayObj);
+ _mesa_BindVertexArray(drawpix->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &vbo);
@@ -3020,12 +3020,12 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
MESA_META_VERTEX |
MESA_META_VIEWPORT));
- if (bitmap->ArrayObj == 0) {
+ if (bitmap->VAO == 0) {
/* one-time setup */
/* create vertex array object */
- _mesa_GenVertexArrays(1, &bitmap->ArrayObj);
- _mesa_BindVertexArray(bitmap->ArrayObj);
+ _mesa_GenVertexArrays(1, &bitmap->VAO);
+ _mesa_BindVertexArray(bitmap->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &bitmap->VBO);
@@ -3042,7 +3042,7 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
_mesa_EnableClientState(GL_COLOR_ARRAY);
}
else {
- _mesa_BindVertexArray(bitmap->ArrayObj);
+ _mesa_BindVertexArray(bitmap->VAO);
_mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, bitmap->VBO);
}
@@ -3386,11 +3386,11 @@ setup_ff_generate_mipmap(struct gen_mipmap_state *mipmap)
GLfloat x, y, tex[3];
};
- if (mipmap->ArrayObj == 0) {
+ if (mipmap->VAO == 0) {
/* one-time setup */
/* create vertex array object */
- _mesa_GenVertexArrays(1, &mipmap->ArrayObj);
- _mesa_BindVertexArray(mipmap->ArrayObj);
+ _mesa_GenVertexArrays(1, &mipmap->VAO);
+ _mesa_BindVertexArray(mipmap->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &mipmap->VBO);
@@ -3469,11 +3469,11 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
void *mem_ctx;
/* Check if already initialized */
- if (mipmap->ArrayObj == 0) {
+ if (mipmap->VAO == 0) {
/* create vertex array object */
- _mesa_GenVertexArrays(1, &mipmap->ArrayObj);
- _mesa_BindVertexArray(mipmap->ArrayObj);
+ _mesa_GenVertexArrays(1, &mipmap->VAO);
+ _mesa_BindVertexArray(mipmap->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &mipmap->VBO);
@@ -3572,10 +3572,10 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
static void
meta_glsl_generate_mipmap_cleanup(struct gen_mipmap_state *mipmap)
{
- if (mipmap->ArrayObj == 0)
+ if (mipmap->VAO == 0)
return;
- _mesa_DeleteVertexArrays(1, &mipmap->ArrayObj);
- mipmap->ArrayObj = 0;
+ _mesa_DeleteVertexArrays(1, &mipmap->VAO);
+ mipmap->VAO = 0;
_mesa_DeleteBuffers(1, &mipmap->VBO);
mipmap->VBO = 0;
@@ -3651,7 +3651,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
_mesa_set_enable(ctx, target, GL_TRUE);
}
- _mesa_BindVertexArray(mipmap->ArrayObj);
+ _mesa_BindVertexArray(mipmap->VAO);
_mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, mipmap->VBO);
samplerSave = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler ?
@@ -3970,8 +3970,8 @@ meta_decompress_cleanup(struct decompress_state *decompress)
_mesa_DeleteRenderbuffers(1, &decompress->RBO);
}
- if (decompress->ArrayObj != 0) {
- _mesa_DeleteVertexArrays(1, &decompress->ArrayObj);
+ if (decompress->VAO != 0) {
+ _mesa_DeleteVertexArrays(1, &decompress->VAO);
_mesa_DeleteBuffers(1, &decompress->VBO);
}
@@ -4076,10 +4076,10 @@ decompress_texture_image(struct gl_context *ctx,
}
/* setup VBO data */
- if (decompress->ArrayObj == 0) {
+ if (decompress->VAO == 0) {
/* create vertex array object */
- _mesa_GenVertexArrays(1, &decompress->ArrayObj);
- _mesa_BindVertexArray(decompress->ArrayObj);
+ _mesa_GenVertexArrays(1, &decompress->VAO);
+ _mesa_BindVertexArray(decompress->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &decompress->VBO);
@@ -4094,7 +4094,7 @@ decompress_texture_image(struct gl_context *ctx,
_mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY);
}
else {
- _mesa_BindVertexArray(decompress->ArrayObj);
+ _mesa_BindVertexArray(decompress->VAO);
_mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, decompress->VBO);
}
@@ -4289,13 +4289,13 @@ _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
MESA_META_VERTEX |
MESA_META_VIEWPORT));
- if (drawtex->ArrayObj == 0) {
+ if (drawtex->VAO == 0) {
/* one-time setup */
GLint active_texture;
/* create vertex array object */
- _mesa_GenVertexArrays(1, &drawtex->ArrayObj);
- _mesa_BindVertexArray(drawtex->ArrayObj);
+ _mesa_GenVertexArrays(1, &drawtex->VAO);
+ _mesa_BindVertexArray(drawtex->VAO);
/* create vertex array buffer */
_mesa_GenBuffers(1, &drawtex->VBO);
@@ -4319,7 +4319,7 @@ _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
_mesa_ClientActiveTexture(GL_TEXTURE0 + active_texture);
}
else {
- _mesa_BindVertexArray(drawtex->ArrayObj);
+ _mesa_BindVertexArray(drawtex->VAO);
_mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, drawtex->VBO);
}