2 #ifndef __NVC0_STATEOBJ_H__
3 #define __NVC0_STATEOBJ_H__
5 #include "pipe/p_state.h"
7 #define SB_BEGIN_3D(so, m, s) \
8 (so)->state[(so)->size++] = \
9 (0x2 << 28) | ((s) << 16) | (NVC0_SUBCH_3D << 13) | ((NVC0_3D_##m) >> 2)
11 #define SB_OUT_3D(so, m, d) \
12 (so)->state[(so)->size++] = \
13 (0x8 << 28) | ((d) << 16) | (NVC0_SUBCH_3D << 13) | ((NVC0_3D_##m) >> 2)
15 #define SB_DATA(so, u) (so)->state[(so)->size++] = (u)
17 struct nvc0_blend_stateobj
{
18 struct pipe_blend_state pipe
;
23 struct nvc0_tsc_entry
{
28 static INLINE
struct nvc0_tsc_entry
*
29 nvc0_tsc_entry(void *hwcso
)
31 return (struct nvc0_tsc_entry
*)hwcso
;
34 struct nvc0_tic_entry
{
35 struct pipe_sampler_view pipe
;
40 static INLINE
struct nvc0_tic_entry
*
41 nvc0_tic_entry(struct pipe_sampler_view
*view
)
43 return (struct nvc0_tic_entry
*)view
;
46 struct nvc0_rasterizer_stateobj
{
47 struct pipe_rasterizer_state pipe
;
52 struct nvc0_zsa_stateobj
{
53 struct pipe_depth_stencil_alpha_state pipe
;
58 struct nvc0_vertex_element
{
59 struct pipe_vertex_element pipe
;
63 struct nvc0_vertex_stateobj
{
64 struct translate
*translate
;
65 unsigned num_elements
;
66 uint32_t instance_bits
;
68 unsigned vtx_per_packet_max
;
69 struct nvc0_vertex_element element
[1];
72 /* will have to lookup index -> location qualifier from nvc0_program */
73 struct nvc0_tfb_state
{
74 uint8_t varying_count
[4];
76 uint8_t varying_indices
[1];