summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_state.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-04-16 16:27:50 +0800
committerChia-I Wu <[email protected]>2013-04-26 16:16:42 +0800
commit89d1702b9b31488ae95a4364b4161b9186d5220b (patch)
tree2be866f35987a1b4af1767d4730c7b2a2fd48124 /src/gallium/drivers/ilo/ilo_state.h
parent520af667971faccf8996f67a1ff8a3d9c6efa4a4 (diff)
ilo: hook up pipe context state functions
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.h')
-rw-r--r--src/gallium/drivers/ilo/ilo_state.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.h b/src/gallium/drivers/ilo/ilo_state.h
index cab1a2b926a..e8db6cbc048 100644
--- a/src/gallium/drivers/ilo/ilo_state.h
+++ b/src/gallium/drivers/ilo/ilo_state.h
@@ -30,9 +30,95 @@
#include "ilo_common.h"
+/**
+ * States that we track.
+ *
+ * XXX Do we want to count each sampler or vertex buffer as a state? If that
+ * is the case, there are simply not enough bits.
+ *
+ * XXX We want to treat primitive type and depth clear value as states, but
+ * there are not enough bits.
+ */
+enum ilo_state {
+ ILO_STATE_BLEND,
+ ILO_STATE_FRAGMENT_SAMPLERS,
+ ILO_STATE_VERTEX_SAMPLERS,
+ ILO_STATE_GEOMETRY_SAMPLERS,
+ ILO_STATE_COMPUTE_SAMPLERS,
+ ILO_STATE_RASTERIZER,
+ ILO_STATE_DEPTH_STENCIL_ALPHA,
+ ILO_STATE_FS,
+ ILO_STATE_VS,
+ ILO_STATE_GS,
+ ILO_STATE_VERTEX_ELEMENTS,
+ ILO_STATE_BLEND_COLOR,
+ ILO_STATE_STENCIL_REF,
+ ILO_STATE_SAMPLE_MASK,
+ ILO_STATE_CLIP,
+ ILO_STATE_CONSTANT_BUFFER,
+ ILO_STATE_FRAMEBUFFER,
+ ILO_STATE_POLY_STIPPLE,
+ ILO_STATE_SCISSOR,
+ ILO_STATE_VIEWPORT,
+ ILO_STATE_FRAGMENT_SAMPLER_VIEWS,
+ ILO_STATE_VERTEX_SAMPLER_VIEWS,
+ ILO_STATE_GEOMETRY_SAMPLER_VIEWS,
+ ILO_STATE_COMPUTE_SAMPLER_VIEWS,
+ ILO_STATE_SHADER_RESOURCES,
+ ILO_STATE_VERTEX_BUFFERS,
+ ILO_STATE_INDEX_BUFFER,
+ ILO_STATE_STREAM_OUTPUT_TARGETS,
+ ILO_STATE_COMPUTE,
+ ILO_STATE_COMPUTE_RESOURCES,
+ ILO_STATE_GLOBAL_BINDING,
+
+ ILO_STATE_COUNT,
+};
+
+/**
+ * Dirty flags of the states.
+ */
+enum ilo_dirty_flags {
+ ILO_DIRTY_BLEND = 1 << ILO_STATE_BLEND,
+ ILO_DIRTY_FRAGMENT_SAMPLERS = 1 << ILO_STATE_FRAGMENT_SAMPLERS,
+ ILO_DIRTY_VERTEX_SAMPLERS = 1 << ILO_STATE_VERTEX_SAMPLERS,
+ ILO_DIRTY_GEOMETRY_SAMPLERS = 1 << ILO_STATE_GEOMETRY_SAMPLERS,
+ ILO_DIRTY_COMPUTE_SAMPLERS = 1 << ILO_STATE_COMPUTE_SAMPLERS,
+ ILO_DIRTY_RASTERIZER = 1 << ILO_STATE_RASTERIZER,
+ ILO_DIRTY_DEPTH_STENCIL_ALPHA = 1 << ILO_STATE_DEPTH_STENCIL_ALPHA,
+ ILO_DIRTY_FS = 1 << ILO_STATE_FS,
+ ILO_DIRTY_VS = 1 << ILO_STATE_VS,
+ ILO_DIRTY_GS = 1 << ILO_STATE_GS,
+ ILO_DIRTY_VERTEX_ELEMENTS = 1 << ILO_STATE_VERTEX_ELEMENTS,
+ ILO_DIRTY_BLEND_COLOR = 1 << ILO_STATE_BLEND_COLOR,
+ ILO_DIRTY_STENCIL_REF = 1 << ILO_STATE_STENCIL_REF,
+ ILO_DIRTY_SAMPLE_MASK = 1 << ILO_STATE_SAMPLE_MASK,
+ ILO_DIRTY_CLIP = 1 << ILO_STATE_CLIP,
+ ILO_DIRTY_CONSTANT_BUFFER = 1 << ILO_STATE_CONSTANT_BUFFER,
+ ILO_DIRTY_FRAMEBUFFER = 1 << ILO_STATE_FRAMEBUFFER,
+ ILO_DIRTY_POLY_STIPPLE = 1 << ILO_STATE_POLY_STIPPLE,
+ ILO_DIRTY_SCISSOR = 1 << ILO_STATE_SCISSOR,
+ ILO_DIRTY_VIEWPORT = 1 << ILO_STATE_VIEWPORT,
+ ILO_DIRTY_FRAGMENT_SAMPLER_VIEWS = 1 << ILO_STATE_FRAGMENT_SAMPLER_VIEWS,
+ ILO_DIRTY_VERTEX_SAMPLER_VIEWS = 1 << ILO_STATE_VERTEX_SAMPLER_VIEWS,
+ ILO_DIRTY_GEOMETRY_SAMPLER_VIEWS = 1 << ILO_STATE_GEOMETRY_SAMPLER_VIEWS,
+ ILO_DIRTY_COMPUTE_SAMPLER_VIEWS = 1 << ILO_STATE_COMPUTE_SAMPLER_VIEWS,
+ ILO_DIRTY_SHADER_RESOURCES = 1 << ILO_STATE_SHADER_RESOURCES,
+ ILO_DIRTY_VERTEX_BUFFERS = 1 << ILO_STATE_VERTEX_BUFFERS,
+ ILO_DIRTY_INDEX_BUFFER = 1 << ILO_STATE_INDEX_BUFFER,
+ ILO_DIRTY_STREAM_OUTPUT_TARGETS = 1 << ILO_STATE_STREAM_OUTPUT_TARGETS,
+ ILO_DIRTY_COMPUTE = 1 << ILO_STATE_COMPUTE,
+ ILO_DIRTY_COMPUTE_RESOURCES = 1 << ILO_STATE_COMPUTE_RESOURCES,
+ ILO_DIRTY_GLOBAL_BINDING = 1 << ILO_STATE_GLOBAL_BINDING,
+ ILO_DIRTY_ALL = 0xffffffff,
+};
+
struct ilo_context;
void
ilo_init_state_functions(struct ilo_context *ilo);
+void
+ilo_finalize_states(struct ilo_context *ilo);
+
#endif /* ILO_STATE_H */