summaryrefslogtreecommitdiff
path: root/src/gallium/include
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-05-02 16:46:31 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-05-02 16:46:31 +0100
commita73ae3d5eb8419feab5aea26573aa41b72f941eb (patch)
tree74fa3e6004be0ef5d266680bd57c2fccec521a4e /src/gallium/include
parent4a159132082429d5492f5298c2ccb0df551c9f65 (diff)
gallium: Add texture usage flags, special-case allocation of display targets
For many envirionments it's necessary to allocate display targets in a window-system friendly manner. Add facilities so that a driver can tell if a texture is likely to be used to generate a display surface and if use special allocation paths if necessary. Hook up softpipe to call into the winsys->surface_alloc_storage() routine in this case, though we probably want to change that interface slightly also.
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_state.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 277ee4b319..d7565dff96 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -284,6 +284,10 @@ struct pipe_surface
};
+#define PIPE_TEXTURE_USAGE_RENDER_TARGET 0x1
+#define PIPE_TEXTURE_USAGE_DISPLAY_TARGET 0x2 /* ie a backbuffer */
+#define PIPE_TEXTURE_USAGE_SAMPLER 0x4
+
/**
* Texture object.
*/
@@ -300,7 +304,7 @@ struct pipe_texture
unsigned last_level:8; /**< Index of last mipmap level present/defined */
unsigned compressed:1;
- unsigned usage;
+ unsigned tex_usage; /* PIPE_TEXTURE_USAGE_* */
/* These are also refcounted:
*/