mesa/vbo: Move src/mesa/vbo/vbo_exec_array.c -> src/mesa/main/draw.c
The array type draw is no longer directly dependent on the vbo module. Thus move array type draws into mesa/main/draw.c. Rename symbols starting with vbo_* to _mesa_* and apply some reindenting to make it consistent. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
parent
952a5da584
commit
f726c61cc1
|
@ -71,6 +71,7 @@ header = """/**
|
|||
#include "main/depth.h"
|
||||
#include "main/debug_output.h"
|
||||
#include "main/dlist.h"
|
||||
#include "main/draw.h"
|
||||
#include "main/drawpix.h"
|
||||
#include "main/drawtex.h"
|
||||
#include "main/rastpos.h"
|
||||
|
@ -131,7 +132,6 @@ header = """/**
|
|||
#include "main/formatquery.h"
|
||||
#include "main/dispatch.h"
|
||||
#include "main/vdpau.h"
|
||||
#include "vbo/vbo.h"
|
||||
|
||||
|
||||
/**
|
||||
|
@ -152,7 +152,7 @@ _mesa_initialize_exec_table(struct gl_context *ctx)
|
|||
|
||||
assert(ctx->Version > 0);
|
||||
|
||||
vbo_initialize_exec_dispatch(ctx, exec);
|
||||
_mesa_initialize_exec_dispatch(ctx, exec);
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -66,6 +66,8 @@ MAIN_FILES = \
|
|||
main/depth.h \
|
||||
main/dlist.c \
|
||||
main/dlist.h \
|
||||
main/draw.c \
|
||||
main/draw.h \
|
||||
main/drawpix.c \
|
||||
main/drawpix.h \
|
||||
main/drawtex.c \
|
||||
|
@ -405,7 +407,6 @@ VBO_FILES = \
|
|||
vbo/vbo_attrib_tmp.h \
|
||||
vbo/vbo_context.c \
|
||||
vbo/vbo_exec_api.c \
|
||||
vbo/vbo_exec_array.c \
|
||||
vbo/vbo_exec.c \
|
||||
vbo/vbo_exec_draw.c \
|
||||
vbo/vbo_exec_eval.c \
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* mesa 3-D graphics library
|
||||
*
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Array type draw functions, the main workhorse of any OpenGL API
|
||||
* \author Keith Whitwell
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DRAW_H
|
||||
#define DRAW_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "main/glheader.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct gl_context;
|
||||
|
||||
struct _mesa_prim
|
||||
{
|
||||
GLuint mode:8; /**< GL_POINTS, GL_LINES, GL_QUAD_STRIP, etc */
|
||||
GLuint indexed:1;
|
||||
GLuint begin:1;
|
||||
GLuint end:1;
|
||||
GLuint is_indirect:1;
|
||||
GLuint pad:20;
|
||||
|
||||
GLuint start;
|
||||
GLuint count;
|
||||
GLint basevertex;
|
||||
GLuint num_instances;
|
||||
GLuint base_instance;
|
||||
GLuint draw_id;
|
||||
|
||||
GLsizeiptr indirect_offset;
|
||||
};
|
||||
|
||||
/* Would like to call this a "vbo_index_buffer", but this would be
|
||||
* confusing as the indices are not neccessarily yet in a non-null
|
||||
* buffer object.
|
||||
*/
|
||||
struct _mesa_index_buffer
|
||||
{
|
||||
GLuint count;
|
||||
unsigned index_size;
|
||||
struct gl_buffer_object *obj;
|
||||
const void *ptr;
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
_mesa_initialize_exec_dispatch(const struct gl_context *ctx,
|
||||
struct _glapi_table *exec);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -115,6 +115,8 @@ files_libmesa_common = files(
|
|||
'main/depth.h',
|
||||
'main/dlist.c',
|
||||
'main/dlist.h',
|
||||
'main/draw.c',
|
||||
'main/draw.h',
|
||||
'main/drawpix.c',
|
||||
'main/drawpix.h',
|
||||
'main/drawtex.c',
|
||||
|
@ -330,7 +332,6 @@ files_libmesa_common = files(
|
|||
'vbo/vbo_attrib_tmp.h',
|
||||
'vbo/vbo_context.c',
|
||||
'vbo/vbo_exec_api.c',
|
||||
'vbo/vbo_exec_array.c',
|
||||
'vbo/vbo_exec.c',
|
||||
'vbo/vbo_exec_draw.c',
|
||||
'vbo/vbo_exec_eval.c',
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
#include "main/glheader.h"
|
||||
#include "main/draw.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -40,39 +41,6 @@ extern "C" {
|
|||
|
||||
struct gl_context;
|
||||
|
||||
struct _mesa_prim
|
||||
{
|
||||
GLuint mode:8; /**< GL_POINTS, GL_LINES, GL_QUAD_STRIP, etc */
|
||||
GLuint indexed:1;
|
||||
GLuint begin:1;
|
||||
GLuint end:1;
|
||||
GLuint is_indirect:1;
|
||||
GLuint pad:20;
|
||||
|
||||
GLuint start;
|
||||
GLuint count;
|
||||
GLint basevertex;
|
||||
GLuint num_instances;
|
||||
GLuint base_instance;
|
||||
GLuint draw_id;
|
||||
|
||||
GLsizeiptr indirect_offset;
|
||||
};
|
||||
|
||||
/* Would like to call this a "vbo_index_buffer", but this would be
|
||||
* confusing as the indices are not neccessarily yet in a non-null
|
||||
* buffer object.
|
||||
*/
|
||||
struct _mesa_index_buffer
|
||||
{
|
||||
GLuint count;
|
||||
unsigned index_size;
|
||||
struct gl_buffer_object *obj;
|
||||
const void *ptr;
|
||||
};
|
||||
|
||||
|
||||
|
||||
GLboolean
|
||||
_vbo_CreateContext(struct gl_context *ctx);
|
||||
|
||||
|
|
Loading…
Reference in New Issue