summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_texture.h')
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.h32
1 files changed, 9 insertions, 23 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.h b/src/gallium/drivers/softpipe/sp_texture.h
index c0e6ba8a86..500f42fb0f 100644
--- a/src/gallium/drivers/softpipe/sp_texture.h
+++ b/src/gallium/drivers/softpipe/sp_texture.h
@@ -30,7 +30,6 @@
#include "pipe/p_state.h"
-#include "pipe/p_video_state.h"
#define SP_MAX_TEXTURE_2D_LEVELS 13 /* 4K x 4K */
@@ -42,27 +41,28 @@ struct pipe_screen;
struct softpipe_context;
-struct softpipe_texture
+struct softpipe_resource
{
- struct pipe_texture base;
+ struct pipe_resource base;
unsigned long level_offset[SP_MAX_TEXTURE_2D_LEVELS];
unsigned stride[SP_MAX_TEXTURE_2D_LEVELS];
/**
- * Display target, for textures with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET
- * usage.
+ * Display target, only valid for PIPE_TEXTURE_2D with the
+ * PIPE_BIND_DISPLAY_TARGET usage.
*/
struct sw_displaytarget *dt;
/**
- * Malloc'ed data for regular textures, or a mapping to dt above.
+ * Malloc'ed data for regular buffers and textures, or a mapping to dt above.
*/
void *data;
/* True if texture images are power-of-two in all dimensions:
*/
boolean pot;
+ boolean userBuffer;
unsigned timestamp;
};
@@ -74,21 +74,13 @@ struct softpipe_transfer
unsigned long offset;
};
-struct softpipe_video_surface
-{
- struct pipe_video_surface base;
-
- /* The data is held here:
- */
- struct pipe_texture *tex;
-};
/** cast wrappers */
-static INLINE struct softpipe_texture *
-softpipe_texture(struct pipe_texture *pt)
+static INLINE struct softpipe_resource *
+softpipe_resource(struct pipe_resource *pt)
{
- return (struct softpipe_texture *) pt;
+ return (struct softpipe_resource *) pt;
}
static INLINE struct softpipe_transfer *
@@ -97,12 +89,6 @@ softpipe_transfer(struct pipe_transfer *pt)
return (struct softpipe_transfer *) pt;
}
-static INLINE struct softpipe_video_surface *
-softpipe_video_surface(struct pipe_video_surface *pvs)
-{
- return (struct softpipe_video_surface *) pvs;
-}
-
extern void
softpipe_init_screen_texture_funcs(struct pipe_screen *screen);