Path: blob/21.2-virgl/src/gallium/drivers/nouveau/nvc0/nvc0_program.h
4574 views
1#ifndef __NVC0_PROGRAM_H__2#define __NVC0_PROGRAM_H__34#include "pipe/p_state.h"56#define NVC0_CAP_MAX_PROGRAM_TEMPS 128789struct nvc0_transform_feedback_state {10uint32_t stride[4];11uint8_t stream[4];12uint8_t varying_count[4];13uint8_t varying_index[4][128];14};151617#define GF100_SHADER_HEADER_SIZE (20 * 4)18#define TU102_SHADER_HEADER_SIZE (32 * 4)19#define NVC0_MAX_SHADER_HEADER_SIZE TU102_SHADER_HEADER_SIZE2021struct nvc0_program {22struct pipe_shader_state pipe;2324ubyte type;25bool translated;26bool need_tls;27uint8_t num_gprs;2829uint32_t *code;30unsigned code_base;31unsigned code_size;32unsigned parm_size; /* size of non-bindable uniforms (c0[]) */3334uint32_t hdr[NVC0_MAX_SHADER_HEADER_SIZE/4];35uint32_t flags[2];3637struct {38uint32_t clip_mode; /* clip/cull selection */39uint8_t clip_enable; /* mask of defined clip planes */40uint8_t cull_enable; /* mask of defined cull distances */41uint8_t num_ucps; /* also set to max if ClipDistance is used */42uint8_t edgeflag; /* attribute index of edgeflag input */43bool need_vertex_id;44bool need_draw_parameters;45bool layer_viewport_relative; /* also applies go gp and tp */46} vp;47struct {48uint8_t early_z;49uint8_t colors;50uint8_t color_interp[2];51bool sample_mask_in;52bool force_persample_interp;53bool flatshade;54bool reads_framebuffer;55bool post_depth_coverage;56bool msaa;57} fp;58struct {59uint32_t tess_mode; /* ~0 if defined by the other stage */60} tp;61struct {62uint32_t lmem_size; /* local memory (TGSI PRIVATE resource) size */63uint32_t smem_size; /* shared memory (TGSI LOCAL resource) size */64} cp;65uint8_t num_barriers;6667void *relocs;68void *fixups;6970struct nvc0_transform_feedback_state *tfb;7172struct nouveau_heap *mem;73};7475void76nvc0_program_sp_start_id(struct nvc0_context *, int, struct nvc0_program *);77#endif787980