diff options
author | Eric Anholt <eric@anholt.net> | 2007-12-15 16:12:17 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-12-16 11:26:19 -0800 |
commit | c0b4257aa9ba783674ccf7162799385734dff211 (patch) | |
tree | 33d0bbdcd5f2b31660420e82f4b9f99b0e5790ca /src/mesa/drivers/dri/i965/intel_context.h | |
parent | 659baa3f25275b622dad626992af60f3c9ea6d66 (diff) |
[965] Move to using shared texture management code.
This removes the delayed texture upload optimization from 965, in exchange for
bringing us closer to PBO support. It also disables SGIS_generate_mipmap,
which didn't seem to be working before anyway, according to the lodbias demo.
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_context.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.h | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index c1ad504af4..583ef42166 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -35,6 +35,7 @@ #include "texmem.h" #include "intel_screen.h" +#include "intel_tex_obj.h" #include "i830_common.h" #include "tnl/t_vertex.h" @@ -67,27 +68,6 @@ extern void intelFallback( struct intel_context *intel, GLuint bit, GLboolean mo #define INTEL_WRITE_FULL 0x2 #define INTEL_READ 0x4 -struct intel_texture_object -{ - struct gl_texture_object base; /* The "parent" object */ - - /* The mipmap tree must include at least these levels once - * validated: - */ - GLuint firstLevel; - GLuint lastLevel; - - GLuint dirty_images[6]; - GLuint dirty; - - /* On validation any active images held in main memory or in other - * regions will be copied to this region and the old storage freed. - */ - struct intel_mipmap_tree *mt; -}; - - - struct intel_context { GLcontext ctx; /* the parent class */ @@ -308,32 +288,6 @@ static inline void * __memcpy(void * to, const void * from, size_t n) #endif -/* The system memcpy (at least on ubuntu 5.10) has problems copying - * to agp (writecombined) memory from a source which isn't 64-byte - * aligned - there is a 4x performance falloff. - * - * The x86 __memcpy is immune to this but is slightly slower - * (10%-ish) than the system memcpy. - * - * The sse_memcpy seems to have a slight cliff at 64/32 bytes, but - * isn't much faster than x86_memcpy for agp copies. - * - * TODO: switch dynamically. - */ -static inline void *do_memcpy( void *dest, const void *src, size_t n ) -{ - if ( (((unsigned long)src) & 63) || - (((unsigned long)dest) & 63)) { - return __memcpy(dest, src, n); - } - else - return memcpy(dest, src, n); -} - - - - - /* ================================================================ * Debugging: */ @@ -495,15 +449,5 @@ static inline struct intel_context *intel_context( GLcontext *ctx ) return (struct intel_context *)ctx; } -static inline struct intel_texture_object *intel_texture_object( struct gl_texture_object *obj ) -{ - return (struct intel_texture_object *)obj; -} - -static inline struct intel_texture_image *intel_texture_image( struct gl_texture_image *img ) -{ - return (struct intel_texture_image *)img; -} - #endif |