From 4617981ec72f7985941bee4b03c534d97ff96bc6 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 5 Feb 2009 19:41:18 +0100 Subject: gallium: No longer allow CPU mapping surfaces directly. Instead, a new pipe_transfer object has to be created and mapped for transferring data between the CPU and a texture. This gives the driver more flexibility for textures in address spaces that aren't CPU accessible. This is a first pass; softpipe/xlib builds and runs glxgears, but it only shows a black window. Looks like something's off related to the Z buffer, so the depth test always fails. --- src/gallium/drivers/softpipe/sp_texture.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/softpipe/sp_texture.h') diff --git a/src/gallium/drivers/softpipe/sp_texture.h b/src/gallium/drivers/softpipe/sp_texture.h index c1636920cd..893aa7d11d 100644 --- a/src/gallium/drivers/softpipe/sp_texture.h +++ b/src/gallium/drivers/softpipe/sp_texture.h @@ -51,14 +51,27 @@ struct softpipe_texture boolean modified; }; +struct softpipe_transfer +{ + struct pipe_transfer base; + + unsigned long offset; +}; + -/** cast wrapper */ +/** cast wrappers */ static INLINE struct softpipe_texture * softpipe_texture(struct pipe_texture *pt) { return (struct softpipe_texture *) pt; } +static INLINE struct softpipe_transfer * +softpipe_transfer(struct pipe_transfer *pt) +{ + return (struct softpipe_transfer *) pt; +} + extern void softpipe_init_texture_funcs( struct softpipe_context *softpipe ); -- cgit v1.2.3