summaryrefslogtreecommitdiff
path: root/src/mesa/main/dlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/dlist.h')
-rw-r--r--src/mesa/main/dlist.h93
1 files changed, 31 insertions, 62 deletions
diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h
index 6a7d418b4ca..8af3b8196e8 100644
--- a/src/mesa/main/dlist.h
+++ b/src/mesa/main/dlist.h
@@ -37,68 +37,38 @@
struct gl_context;
/**
- * Describes the location and size of a glBitmap image in a texture atlas.
- */
-struct gl_bitmap_glyph
-{
- unsigned short x, y, w, h; /**< position and size in the texture */
- float xorig, yorig; /**< bitmap origin */
- float xmove, ymove; /**< rasterpos move */
-};
-
-
-/**
- * Describes a set of glBitmap display lists which live in a texture atlas.
- * The idea is when we see a code sequence of glListBase(b), glCallLists(n)
- * we're probably drawing bitmap font glyphs. We try to put all the bitmap
- * glyphs into one texture map then render the glCallLists as a textured
- * quadstrip.
+ * Display list node.
+ *
+ * Display list instructions are stored as sequences of "nodes". Nodes
+ * are allocated in blocks. Each block has BLOCK_SIZE nodes. Blocks
+ * are linked together with a pointer.
+ *
+ * Each instruction in the display list is stored as a sequence of
+ * contiguous nodes in memory.
+ * Each node is the union of a variety of data types.
+ *
+ * Note, all of these members should be 4 bytes in size or less for the
+ * sake of compact display lists. We store 8-byte pointers in a pair of
+ * these nodes using the save/get_pointer() functions below.
*/
-struct gl_bitmap_atlas
+union gl_dlist_node
{
- GLint Id;
- bool complete; /**< Is the atlas ready to use? */
- bool incomplete; /**< Did we fail to construct this atlas? */
-
- unsigned numBitmaps;
- unsigned texWidth, texHeight;
- struct gl_texture_object *texObj;
- struct gl_texture_image *texImage;
-
- unsigned glyphHeight;
-
- struct gl_bitmap_glyph *glyphs;
+ struct {
+ uint16_t opcode; /* dlist.c : enum Opcode */
+ uint16_t InstSize;
+ };
+ GLboolean b;
+ GLbitfield bf;
+ GLubyte ub;
+ GLshort s;
+ GLushort us;
+ GLint i;
+ GLuint ui;
+ GLenum e;
+ GLfloat f;
+ GLsizei si;
};
-void
-_mesa_delete_bitmap_atlas(struct gl_context *ctx,
- struct gl_bitmap_atlas *atlas);
-
-
-GLboolean GLAPIENTRY
-_mesa_IsList(GLuint list);
-
-void GLAPIENTRY
-_mesa_DeleteLists(GLuint list, GLsizei range);
-
-GLuint GLAPIENTRY
-_mesa_GenLists(GLsizei range);
-
-void GLAPIENTRY
-_mesa_NewList(GLuint name, GLenum mode);
-
-void GLAPIENTRY
-_mesa_EndList(void);
-
-void GLAPIENTRY
-_mesa_CallList(GLuint list);
-
-void GLAPIENTRY
-_mesa_CallLists(GLsizei n, GLenum type, const GLvoid *lists);
-
-void GLAPIENTRY
-_mesa_ListBase(GLuint base);
-
struct gl_display_list *
_mesa_lookup_list(struct gl_context *ctx, GLuint list, bool locked);
@@ -113,14 +83,13 @@ void
_mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist);
void
-_mesa_initialize_save_table(const struct gl_context *);
+_mesa_init_dispatch_save(const struct gl_context *);
void
-_mesa_install_dlist_vtxfmt(struct _glapi_table *disp,
- const GLvertexformat *vfmt);
+_mesa_init_display_list(struct gl_context * ctx);
void
-_mesa_init_display_list(struct gl_context * ctx);
+_mesa_init_dispatch_save_begin_end(struct gl_context *ctx);
bool
_mesa_get_list(struct gl_context *ctx, GLuint list,