aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_resource.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-02-20 13:51:03 +0800
committerChia-I Wu <[email protected]>2014-02-22 22:45:13 +0800
commit4afb8a7fb5a5f0581ba1bbf608033e69dab6dbb3 (patch)
tree183327e1b6546a7b3138b9a7d322e2e3dccde43e /src/gallium/drivers/ilo/ilo_resource.h
parentcb8a0d2be1a50e2aa1cb82a33535f68d278ed8ca (diff)
ilo: better readability and doc for texture flags
Improve comments for the flags, and explicitly separate their uses in slice flags and resolve flags.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_resource.h')
-rw-r--r--src/gallium/drivers/ilo/ilo_resource.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_resource.h b/src/gallium/drivers/ilo/ilo_resource.h
index fb4fde77d08..d7bc5f9be71 100644
--- a/src/gallium/drivers/ilo/ilo_resource.h
+++ b/src/gallium/drivers/ilo/ilo_resource.h
@@ -34,13 +34,45 @@
#include "ilo_screen.h"
enum ilo_texture_flags {
+ /*
+ * Possible writers of a texture. There can be at most one writer at any
+ * time.
+ *
+ * Wine set in resolve flags (in ilo_blit_resolve_slices()), they indicate
+ * the new writer. When set in slice flags (ilo_texture_slice::flags),
+ * they indicate the writer since last resolve.
+ */
ILO_TEXTURE_RENDER_WRITE = 1 << 0,
ILO_TEXTURE_BLT_WRITE = 1 << 1,
ILO_TEXTURE_CPU_WRITE = 1 << 2,
+
+ /*
+ * Possible readers of a texture. There may be multiple readers at any
+ * time.
+ *
+ * When set in resolve flags, they indicate the new readers. They are
+ * never set in slice flags.
+ */
ILO_TEXTURE_RENDER_READ = 1 << 3,
ILO_TEXTURE_BLT_READ = 1 << 4,
ILO_TEXTURE_CPU_READ = 1 << 5,
+
+ /*
+ * Set when the texture is cleared.
+ *
+ * When set in resolve flags, the new writer will clear. When set in slice
+ * flags, the slice has been cleared.
+ */
ILO_TEXTURE_CLEAR = 1 << 6,
+
+ /*
+ * Set when HiZ can be enabled.
+ *
+ * It is never set in resolve flags. When set in slice flags, the slice
+ * can have HiZ enabled. It is to be noted that this bit is always set for
+ * either all or none of the slices in a level, allowing quick check in
+ * case of layered rendering.
+ */
ILO_TEXTURE_HIZ = 1 << 7,
};