freedreno/a3xx/compiler: refactor trans_samp()
[mesa.git] / src / gallium / drivers / freedreno / freedreno_state.h
index 422f0ced4848f1507b0f5249ddcdace68627fe6b..859299b3ad3ee3bc14338053f48c65d7bf847c04 100644 (file)
 #define FREEDRENO_STATE_H_
 
 #include "pipe/p_context.h"
+#include "freedreno_context.h"
 
-struct fd_vertexbuf_stateobj;
-struct fd_zsa_stateobj;
-struct fd_framebuffer_stateobj;
-struct fd_ringbuffer;
+static inline bool fd_depth_enabled(struct fd_context *ctx)
+{
+       return ctx->zsa && ctx->zsa->depth.enabled;
+}
 
-void fd_state_init(struct pipe_context *pctx);
+static inline bool fd_stencil_enabled(struct fd_context *ctx)
+{
+       return ctx->zsa && ctx->zsa->stencil[0].enabled;
+}
+
+static inline bool fd_logicop_enabled(struct fd_context *ctx)
+{
+       return ctx->blend && ctx->blend->logicop_enable;
+}
 
-struct fd_vertex_buf {
-       unsigned offset, size;
-       struct pipe_resource *prsc;
-};
+static inline bool fd_blend_enabled(struct fd_context *ctx, unsigned n)
+{
+       return ctx->blend && ctx->blend->rt[n].blend_enable;
+}
 
-void fd_emit_vertex_bufs(struct fd_ringbuffer *ring, uint32_t val,
-               struct fd_vertex_buf *vbufs, uint32_t n);
-void fd_state_emit(struct pipe_context *pctx, uint32_t dirty);
-void fd_state_emit_setup(struct pipe_context *pctx);
+void fd_state_init(struct pipe_context *pctx);
 
 #endif /* FREEDRENO_STATE_H_ */