1 /* 2 * Copyright © 2013 Rob Clark <[email protected]> 3 * SPDX-License-Identifier: MIT 4 * 5 * Authors: 6 * Rob Clark <[email protected]> 7 */ 8 9 #ifndef FD3_PROGRAM_H_ 10 #define FD3_PROGRAM_H_ 11 12 #include "pipe/p_context.h" 13 #include "freedreno_context.h" 14 15 #include "ir3/ir3_cache.h" 16 #include "ir3/ir3_shader.h" 17 18 struct fd3_emit; 19 20 struct fd3_program_state { 21 struct ir3_program_state base; 22 const struct ir3_shader_variant *bs; /* VS for when emit->binning */ 23 const struct ir3_shader_variant *vs; 24 const struct ir3_shader_variant *fs; /* FS for when !emit->binning */ 25 }; 26 27 static inline struct fd3_program_state * fd3_program_state(struct ir3_program_state * state)28fd3_program_state(struct ir3_program_state *state) 29 { 30 return (struct fd3_program_state *)state; 31 } 32 33 void fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit, int nr, 34 struct pipe_surface **bufs); 35 36 void fd3_prog_init(struct pipe_context *pctx); 37 38 bool fd3_needs_manual_clipping(const struct ir3_shader *, 39 const struct pipe_rasterizer_state *); 40 41 #endif /* FD3_PROGRAM_H_ */ 42