projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
radeonsi: use u_default_transfer_inline_write
[mesa.git]
/
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 1c8636d1d56b9695038117a455b9c01611cc937f..533d6252e259b5ae2cbffd2956e46f989698e3c3 100644
(file)
--- a/
src/gallium/drivers/softpipe/sp_texture.h
+++ b/
src/gallium/drivers/softpipe/sp_texture.h
@@
-30,11
+30,7
@@
#include "pipe/p_state.h"
#include "pipe/p_state.h"
-#include "pipe/p_video_state.h"
-
-
-#define SP_MAX_TEXTURE_2D_LEVELS 13 /* 4K x 4K */
-#define SP_MAX_TEXTURE_3D_LEVELS 9 /* 512 x 512 x 512 */
+#include "sp_limits.h"
struct pipe_context;
struct pipe_context;
@@
-42,31
+38,39
@@
struct pipe_screen;
struct softpipe_context;
struct softpipe_context;
-struct softpipe_texture
+/**
+ * Subclass of pipe_resource.
+ */
+struct softpipe_resource
{
{
- struct pipe_
textur
e base;
+ struct pipe_
resourc
e base;
unsigned long level_offset[SP_MAX_TEXTURE_2D_LEVELS];
unsigned stride[SP_MAX_TEXTURE_2D_LEVELS];
/**
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;
/**
*/
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;
*/
void *data;
/* True if texture images are power-of-two in all dimensions:
*/
boolean pot;
+ boolean userBuffer;
unsigned timestamp;
};
unsigned timestamp;
};
+
+/**
+ * Subclass of pipe_transfer.
+ */
struct softpipe_transfer
{
struct pipe_transfer base;
struct softpipe_transfer
{
struct pipe_transfer base;
@@
-74,21
+78,12
@@
struct softpipe_transfer
unsigned long offset;
};
unsigned long offset;
};
-struct softpipe_video_surface
-{
- struct pipe_video_surface base;
-
- /* The data is held here:
- */
- struct pipe_texture *tex;
-};
-
/** cast wrappers */
/** cast wrappers */
-static INLINE struct softpipe_
textur
e *
-softpipe_
texture(struct pipe_textur
e *pt)
+static INLINE struct softpipe_
resourc
e *
+softpipe_
resource(struct pipe_resourc
e *pt)
{
{
- return (struct softpipe_
textur
e *) pt;
+ return (struct softpipe_
resourc
e *) pt;
}
static INLINE struct softpipe_transfer *
}
static INLINE struct softpipe_transfer *
@@
-97,15
+92,12
@@
softpipe_transfer(struct pipe_transfer *pt)
return (struct softpipe_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);
extern void
softpipe_init_screen_texture_funcs(struct pipe_screen *screen);
+extern void
+softpipe_init_texture_funcs(struct pipe_context *pipe);
+
#endif /* SP_TEXTURE */
#endif /* SP_TEXTURE */