2 #ifndef __NV50_STATEOBJ_H__
3 #define __NV50_STATEOBJ_H__
5 #include "pipe/p_state.h"
7 #define NV50_SCISSORS_CLIPPING
9 #define SB_BEGIN_3D(so, m, s) \
10 (so)->state[(so)->size++] = NV50_FIFO_PKHDR(NV50_3D(m), s)
12 #define SB_BEGIN_3D_(so, m, s) \
13 (so)->state[(so)->size++] = NV50_FIFO_PKHDR(SUBC_3D(m), s)
15 #define SB_DATA(so, u) (so)->state[(so)->size++] = (u)
17 #include "nv50/nv50_stateobj_tex.h"
19 struct nv50_blend_stateobj
{
20 struct pipe_blend_state pipe
;
22 uint32_t state
[84]; // TODO: allocate less if !independent_blend_enable
25 struct nv50_rasterizer_stateobj
{
26 struct pipe_rasterizer_state pipe
;
31 struct nv50_zsa_stateobj
{
32 struct pipe_depth_stencil_alpha_state pipe
;
37 struct nv50_constbuf
{
39 struct pipe_resource
*buf
;
42 uint32_t size
; /* max 65536 */
44 boolean user
; /* should only be TRUE if u.data is valid and non-NULL */
47 struct nv50_vertex_element
{
48 struct pipe_vertex_element pipe
;
52 struct nv50_vertex_stateobj
{
53 uint32_t min_instance_div
[PIPE_MAX_ATTRIBS
];
54 uint16_t vb_access_size
[PIPE_MAX_ATTRIBS
];
55 struct translate
*translate
;
56 unsigned num_elements
;
57 uint32_t instance_elts
;
58 uint32_t instance_bufs
;
59 boolean need_conversion
;
61 unsigned packet_vertex_limit
;
62 struct nv50_vertex_element element
[0];
65 struct nv50_so_target
{
66 struct pipe_stream_output_target pipe
;
67 struct pipe_query
*pq
;
72 static INLINE
struct nv50_so_target
*
73 nv50_so_target(struct pipe_stream_output_target
*ptarg
)
75 return (struct nv50_so_target
*)ptarg
;