1 #ifndef __NV40_STATE_H__
2 #define __NV40_STATE_H__
4 #include "pipe/p_state.h"
5 #include "pipe/p_video_state.h"
6 #include "tgsi/tgsi_scan.h"
8 struct nv40_sampler_state
{
16 struct nv40_vertex_program_exec
{
18 boolean has_branch_offset
;
22 struct nv40_vertex_program_data
{
23 int index
; /* immediates == -1 */
27 struct nv40_vertex_program
{
28 struct pipe_shader_state pipe
;
30 struct draw_vertex_shader
*draw
;
34 struct pipe_clip_state ucp
;
36 struct nv40_vertex_program_exec
*insns
;
38 struct nv40_vertex_program_data
*consts
;
41 struct nouveau_resource
*exec
;
43 struct nouveau_resource
*data
;
45 unsigned data_start_min
;
50 struct nouveau_stateobj
*so
;
53 struct nv40_fragment_program_data
{
58 struct nv40_fragment_program
{
59 struct pipe_shader_state pipe
;
60 struct tgsi_shader_info info
;
68 struct nv40_fragment_program_data
*consts
;
71 struct pipe_buffer
*buffer
;
74 struct nouveau_stateobj
*so
;
78 struct pipe_texture base
;
79 struct nouveau_bo
*bo
;
81 struct pipe_buffer
*buffer
;
87 } level
[PIPE_MAX_TEXTURE_LEVELS
];
90 struct nv40_video_surface
{
91 struct pipe_video_surface base
;
92 struct pipe_texture
*tex
;
96 static INLINE
struct nv40_video_surface
*
97 nv40_video_surface(struct pipe_video_surface
*sfc
)
99 return (struct nv40_video_surface
*)sfc
;