freedreno/a3xx/compiler: refactor trans_samp()
[mesa.git] / src / gallium / drivers / freedreno / freedreno_state.h
index c966bdcc51d213a9553e96724e44ce45c3dac8b1..859299b3ad3ee3bc14338053f48c65d7bf847c04 100644 (file)
 
 static inline bool fd_depth_enabled(struct fd_context *ctx)
 {
-       return ctx->zsa->depth.enabled;
+       return ctx->zsa && ctx->zsa->depth.enabled;
 }
 
 static inline bool fd_stencil_enabled(struct fd_context *ctx)
 {
-       return ctx->zsa->stencil[0].enabled;
+       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;
+}
+
+static inline bool fd_blend_enabled(struct fd_context *ctx, unsigned n)
+{
+       return ctx->blend && ctx->blend->rt[n].blend_enable;
 }
 
 void fd_state_init(struct pipe_context *pctx);