X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Ffreedreno%2Fa3xx%2Ffd3_emit.h;h=42483f6c39b33b4aa5cd8c1bd75ade10f452a1a8;hb=1469ccb7464836c752fa2664c36d8fae7e80606c;hp=a397c8705a36ca8a71fbb62176420b048a6d43c8;hpb=d595987ea3d1706fecb9f6416031ec8b27c95a9e;p=mesa.git diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h index a397c8705a3..42483f6c39b 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h @@ -32,20 +32,18 @@ #include "pipe/p_context.h" #include "freedreno_context.h" -#include "fd3_util.h" +#include "fd3_format.h" #include "fd3_program.h" #include "ir3_shader.h" struct fd_ringbuffer; -enum adreno_state_block; -void fd3_emit_constant(struct fd_ringbuffer *ring, - enum adreno_state_block sb, +void fd3_emit_const(struct fd_ringbuffer *ring, enum shader_t type, uint32_t regid, uint32_t offset, uint32_t sizedwords, const uint32_t *dwords, struct pipe_resource *prsc); void fd3_emit_gmem_restore_tex(struct fd_ringbuffer *ring, - struct pipe_surface *psurf); + struct pipe_surface **psurf, int bufs); /* grouped together emit-state for prog/vertex/state emit: */ struct fd3_emit { @@ -54,6 +52,9 @@ struct fd3_emit { const struct pipe_draw_info *info; struct ir3_shader_key key; uint32_t dirty; + + uint32_t sprite_coord_enable; + bool sprite_coord_mode; bool rasterflat; /* cached to avoid repeated lookups of same variants: */ @@ -87,4 +88,17 @@ void fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, void fd3_emit_restore(struct fd_context *ctx); +void fd3_emit_init(struct pipe_context *pctx); + +static inline void +fd3_emit_cache_flush(struct fd_context *ctx, struct fd_ringbuffer *ring) +{ + fd_wfi(ctx, ring); + OUT_PKT0(ring, REG_A3XX_UCHE_CACHE_INVALIDATE0_REG, 2); + OUT_RING(ring, A3XX_UCHE_CACHE_INVALIDATE0_REG_ADDR(0)); + OUT_RING(ring, A3XX_UCHE_CACHE_INVALIDATE1_REG_ADDR(0) | + A3XX_UCHE_CACHE_INVALIDATE1_REG_OPCODE(INVALIDATE) | + A3XX_UCHE_CACHE_INVALIDATE1_REG_ENTIRE_CACHE); +} + #endif /* FD3_EMIT_H */