2 #ifndef __NVC0_STATEOBJ_H__
3 #define __NVC0_STATEOBJ_H__
5 #include "pipe/p_state.h"
7 #define NVC0_SCISSORS_CLIPPING
9 #define SB_BEGIN_3D(so, m, s) \
10 (so)->state[(so)->size++] = \
11 (0x2 << 28) | ((s) << 16) | (NVC0_SUBCH_3D << 13) | ((NVC0_3D_##m) >> 2)
13 #define SB_IMMED_3D(so, m, d) \
14 (so)->state[(so)->size++] = \
15 (0x8 << 28) | ((d) << 16) | (NVC0_SUBCH_3D << 13) | ((NVC0_3D_##m) >> 2)
17 #define SB_DATA(so, u) (so)->state[(so)->size++] = (u)
19 struct nvc0_blend_stateobj
{
20 struct pipe_blend_state pipe
;
25 struct nvc0_tsc_entry
{
30 static INLINE
struct nvc0_tsc_entry
*
31 nvc0_tsc_entry(void *hwcso
)
33 return (struct nvc0_tsc_entry
*)hwcso
;
36 struct nvc0_tic_entry
{
37 struct pipe_sampler_view pipe
;
42 static INLINE
struct nvc0_tic_entry
*
43 nvc0_tic_entry(struct pipe_sampler_view
*view
)
45 return (struct nvc0_tic_entry
*)view
;
48 struct nvc0_rasterizer_stateobj
{
49 struct pipe_rasterizer_state pipe
;
54 struct nvc0_zsa_stateobj
{
55 struct pipe_depth_stencil_alpha_state pipe
;
60 struct nvc0_vertex_element
{
61 struct pipe_vertex_element pipe
;
65 struct nvc0_vertex_stateobj
{
66 struct translate
*translate
;
67 unsigned num_elements
;
68 uint32_t instance_elts
;
69 uint32_t instance_bufs
;
70 boolean need_conversion
; /* e.g. VFETCH cannot convert f64 to f32 */
72 unsigned vtx_per_packet_max
;
73 struct nvc0_vertex_element element
[0];
76 /* will have to lookup index -> location qualifier from nvc0_program */
77 struct nvc0_transform_feedback_state
{
79 uint8_t varying_count
[4];
80 uint8_t varying_index
[0];