aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_program.h
blob: 239890bd89aa94286f823fb48a11fbac7ac81bcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

#ifndef __NVC0_PROGRAM_H__
#define __NVC0_PROGRAM_H__

#include "pipe/p_state.h"

#define NVC0_CAP_MAX_PROGRAM_TEMPS 128

#define NVC0_SHADER_HEADER_SIZE (20 * 4)

struct nvc0_program {
   struct pipe_shader_state pipe;

   ubyte type;
   boolean translated;
   uint8_t max_gpr;

   uint32_t *code;
   uint32_t *immd_data;
   unsigned code_base;
   unsigned code_size;
   unsigned immd_base;
   unsigned immd_size; /* size of immediate array data */
   unsigned parm_size; /* size of non-bindable uniforms (c0[]) */

   uint32_t hdr[20];
   uint32_t flags[2];

   struct {
      uint8_t edgeflag;
      uint8_t num_ucps;
      uint8_t out_pos[PIPE_MAX_SHADER_OUTPUTS];
   } vp;
   struct {
      uint8_t early_z;
      uint8_t in_pos[PIPE_MAX_SHADER_INPUTS];
   } fp;
   struct {
      uint32_t tess_mode; /* ~0 if defined by the other stage */
      uint32_t input_patch_size;
   } tp;

   void *relocs;

   struct nouveau_resource *res;
};

#endif