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_IMMED_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 #include "nv50/nv50_stateobj_tex.h"
19 struct nvc0_blend_stateobj
{
20 struct pipe_blend_state pipe
;
25 struct nvc0_rasterizer_stateobj
{
26 struct pipe_rasterizer_state pipe
;
31 struct nvc0_zsa_stateobj
{
32 struct pipe_depth_stencil_alpha_state pipe
;
37 struct nvc0_vertex_element
{
38 struct pipe_vertex_element pipe
;
42 struct nvc0_vertex_stateobj
{
43 struct translate
*translate
;
44 unsigned num_elements
;
45 uint32_t instance_elts
;
46 uint32_t instance_bufs
;
47 boolean need_conversion
; /* e.g. VFETCH cannot convert f64 to f32 */
49 unsigned vtx_per_packet_max
;
50 struct nvc0_vertex_element element
[0];
53 /* will have to lookup index -> location qualifier from nvc0_program */
54 struct nvc0_transform_feedback_state
{
56 uint8_t varying_count
[4];
57 uint8_t varying_index
[0];