From d81d2aeca8ee43ddec39a043a5acb4cb44be70ac Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 7 May 2004 17:30:31 +0000 Subject: Add support for the 3rd and 4th texture units. The actual number of available units is configurable via the texture_units option. --- src/mesa/drivers/dri/i830/i830_context.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/mesa/drivers/dri/i830/i830_context.h') diff --git a/src/mesa/drivers/dri/i830/i830_context.h b/src/mesa/drivers/dri/i830/i830_context.h index 95c2e925e2..6dcaf1febe 100644 --- a/src/mesa/drivers/dri/i830/i830_context.h +++ b/src/mesa/drivers/dri/i830/i830_context.h @@ -63,6 +63,8 @@ typedef void (*i830_tri_func)(i830ContextPtr, i830Vertex *, i830Vertex *, typedef void (*i830_line_func)(i830ContextPtr, i830Vertex *, i830Vertex *); typedef void (*i830_point_func)(i830ContextPtr, i830Vertex *); +#define I830_MAX_TEXTURE_UNITS 4 + #define I830_FALLBACK_TEXTURE 0x1 #define I830_FALLBACK_DRAW_BUFFER 0x2 #define I830_FALLBACK_READ_BUFFER 0x4 @@ -80,14 +82,14 @@ struct i830_context_t /*From I830 stuff*/ int TextureMode; GLuint renderindex; - GLuint TexBlendWordsUsed[I830_TEXBLEND_COUNT]; - GLuint TexBlend[I830_TEXBLEND_COUNT][I830_TEXBLEND_SIZE]; - GLuint Init_TexBlend[I830_TEXBLEND_COUNT][I830_TEXBLEND_SIZE]; - GLuint Init_TexBlendWordsUsed[I830_TEXBLEND_COUNT]; - GLuint Init_TexBlendColorPipeNum[I830_TEXBLEND_COUNT]; - GLuint TexBlendColorPipeNum[I830_TEXBLEND_COUNT]; + GLuint TexBlendWordsUsed[I830_MAX_TEXTURE_UNITS]; + GLuint TexBlend[I830_MAX_TEXTURE_UNITS][I830_TEXBLEND_SIZE]; + GLuint Init_TexBlend[I830_MAX_TEXTURE_UNITS][I830_TEXBLEND_SIZE]; + GLuint Init_TexBlendWordsUsed[I830_MAX_TEXTURE_UNITS]; + GLuint Init_TexBlendColorPipeNum[I830_MAX_TEXTURE_UNITS]; + GLuint TexBlendColorPipeNum[I830_MAX_TEXTURE_UNITS]; GLuint Init_BufferSetup[I830_DEST_SETUP_SIZE]; - GLuint LodBias[2]; + GLuint LodBias[I830_MAX_TEXTURE_UNITS]; GLenum palette_format; GLuint palette[256]; @@ -124,7 +126,7 @@ struct i830_context_t driTexHeap * texture_heaps[1]; driTextureObject swapped; - struct i830_texture_object_t *CurrentTexObj[2]; + struct i830_texture_object_t *CurrentTexObj[I830_MAX_TEXTURE_UNITS]; /* Rasterization and vertex state: */ @@ -217,6 +219,11 @@ struct i830_context_t __DRIscreenPrivate *driScreen; i830ScreenPrivate *i830Screen; I830SAREAPtr sarea; + + /** + * Configuration cache + */ + driOptionCache optionCache; }; -- cgit v1.2.3