1bf215546Sopenharmony_ci#ifndef __NV50_CONTEXT_H__ 2bf215546Sopenharmony_ci#define __NV50_CONTEXT_H__ 3bf215546Sopenharmony_ci 4bf215546Sopenharmony_ci#include "pipe/p_context.h" 5bf215546Sopenharmony_ci#include "pipe/p_defines.h" 6bf215546Sopenharmony_ci#include "pipe/p_state.h" 7bf215546Sopenharmony_ci 8bf215546Sopenharmony_ci#include "util/u_memory.h" 9bf215546Sopenharmony_ci#include "util/u_math.h" 10bf215546Sopenharmony_ci#include "util/u_inlines.h" 11bf215546Sopenharmony_ci#include "util/u_dynarray.h" 12bf215546Sopenharmony_ci 13bf215546Sopenharmony_ci#include "nv50/nv50_winsys.h" 14bf215546Sopenharmony_ci#include "nv50/nv50_stateobj.h" 15bf215546Sopenharmony_ci#include "nv50/nv50_screen.h" 16bf215546Sopenharmony_ci#include "nv50/nv50_program.h" 17bf215546Sopenharmony_ci#include "nv50/nv50_resource.h" 18bf215546Sopenharmony_ci#include "nv50/nv50_transfer.h" 19bf215546Sopenharmony_ci#include "nv50/nv50_query.h" 20bf215546Sopenharmony_ci 21bf215546Sopenharmony_ci#include "nouveau_context.h" 22bf215546Sopenharmony_ci#include "nouveau_debug.h" 23bf215546Sopenharmony_ci#include "nv_object.xml.h" 24bf215546Sopenharmony_ci#include "nv_m2mf.xml.h" 25bf215546Sopenharmony_ci#include "nv50/nv50_3ddefs.xml.h" 26bf215546Sopenharmony_ci#include "nv50/nv50_3d.xml.h" 27bf215546Sopenharmony_ci#include "nv50/nv50_2d.xml.h" 28bf215546Sopenharmony_ci#include "nv50/nv50_compute.xml.h" 29bf215546Sopenharmony_ci 30bf215546Sopenharmony_ci// NOTE: the VS/GS/FS order is based on how command methods are laid out for 31bf215546Sopenharmony_ci// TSC/TIC setting. 32bf215546Sopenharmony_ci#define NV50_SHADER_STAGE_VERTEX 0 33bf215546Sopenharmony_ci#define NV50_SHADER_STAGE_GEOMETRY 1 34bf215546Sopenharmony_ci#define NV50_SHADER_STAGE_FRAGMENT 2 35bf215546Sopenharmony_ci#define NV50_SHADER_STAGE_COMPUTE 3 36bf215546Sopenharmony_ci#define NV50_MAX_SHADER_STAGES 4 37bf215546Sopenharmony_ci 38bf215546Sopenharmony_ci#define NV50_MAX_3D_SHADER_STAGES 3 39bf215546Sopenharmony_ci 40bf215546Sopenharmony_ci#define NV50_NEW_3D_BLEND (1 << 0) 41bf215546Sopenharmony_ci#define NV50_NEW_3D_RASTERIZER (1 << 1) 42bf215546Sopenharmony_ci#define NV50_NEW_3D_ZSA (1 << 2) 43bf215546Sopenharmony_ci#define NV50_NEW_3D_VERTPROG (1 << 3) 44bf215546Sopenharmony_ci#define NV50_NEW_3D_GMTYPROG (1 << 6) 45bf215546Sopenharmony_ci#define NV50_NEW_3D_FRAGPROG (1 << 7) 46bf215546Sopenharmony_ci#define NV50_NEW_3D_BLEND_COLOUR (1 << 8) 47bf215546Sopenharmony_ci#define NV50_NEW_3D_STENCIL_REF (1 << 9) 48bf215546Sopenharmony_ci#define NV50_NEW_3D_CLIP (1 << 10) 49bf215546Sopenharmony_ci#define NV50_NEW_3D_SAMPLE_MASK (1 << 11) 50bf215546Sopenharmony_ci#define NV50_NEW_3D_FRAMEBUFFER (1 << 12) 51bf215546Sopenharmony_ci#define NV50_NEW_3D_STIPPLE (1 << 13) 52bf215546Sopenharmony_ci#define NV50_NEW_3D_SCISSOR (1 << 14) 53bf215546Sopenharmony_ci#define NV50_NEW_3D_VIEWPORT (1 << 15) 54bf215546Sopenharmony_ci#define NV50_NEW_3D_ARRAYS (1 << 16) 55bf215546Sopenharmony_ci#define NV50_NEW_3D_VERTEX (1 << 17) 56bf215546Sopenharmony_ci#define NV50_NEW_3D_CONSTBUF (1 << 18) 57bf215546Sopenharmony_ci#define NV50_NEW_3D_TEXTURES (1 << 19) 58bf215546Sopenharmony_ci#define NV50_NEW_3D_SAMPLERS (1 << 20) 59bf215546Sopenharmony_ci#define NV50_NEW_3D_STRMOUT (1 << 21) 60bf215546Sopenharmony_ci#define NV50_NEW_3D_MIN_SAMPLES (1 << 22) 61bf215546Sopenharmony_ci#define NV50_NEW_3D_WINDOW_RECTS (1 << 23) 62bf215546Sopenharmony_ci 63bf215546Sopenharmony_ci#define NV50_NEW_CP_PROGRAM (1 << 0) 64bf215546Sopenharmony_ci#define NV50_NEW_CP_SURFACES (1 << 1) 65bf215546Sopenharmony_ci#define NV50_NEW_CP_TEXTURES (1 << 2) 66bf215546Sopenharmony_ci#define NV50_NEW_CP_SAMPLERS (1 << 3) 67bf215546Sopenharmony_ci#define NV50_NEW_CP_CONSTBUF (1 << 4) 68bf215546Sopenharmony_ci#define NV50_NEW_CP_GLOBALS (1 << 5) 69bf215546Sopenharmony_ci#define NV50_NEW_CP_DRIVERCONST (1 << 6) 70bf215546Sopenharmony_ci#define NV50_NEW_CP_BUFFERS (1 << 7) 71bf215546Sopenharmony_ci 72bf215546Sopenharmony_ci/* 3d bufctx (during draw_vbo, blit_3d) */ 73bf215546Sopenharmony_ci#define NV50_BIND_3D_FB 0 74bf215546Sopenharmony_ci#define NV50_BIND_3D_VERTEX 1 75bf215546Sopenharmony_ci#define NV50_BIND_3D_VERTEX_TMP 2 76bf215546Sopenharmony_ci#define NV50_BIND_3D_INDEX 3 77bf215546Sopenharmony_ci#define NV50_BIND_3D_TEXTURES 4 78bf215546Sopenharmony_ci#define NV50_BIND_3D_CB(s, i) (5 + 16 * (s) + (i)) 79bf215546Sopenharmony_ci#define NV50_BIND_3D_SO 53 80bf215546Sopenharmony_ci#define NV50_BIND_3D_SCREEN 54 81bf215546Sopenharmony_ci#define NV50_BIND_3D_TLS 55 82bf215546Sopenharmony_ci#define NV50_BIND_3D_COUNT 56 83bf215546Sopenharmony_ci 84bf215546Sopenharmony_ci/* compute bufctx (during launch_grid) */ 85bf215546Sopenharmony_ci#define NV50_BIND_CP_CB(i) ( 0 + (i)) 86bf215546Sopenharmony_ci#define NV50_BIND_CP_TEXTURES 16 87bf215546Sopenharmony_ci#define NV50_BIND_CP_SUF 17 88bf215546Sopenharmony_ci#define NV50_BIND_CP_BUF 18 89bf215546Sopenharmony_ci#define NV50_BIND_CP_GLOBAL 19 90bf215546Sopenharmony_ci#define NV50_BIND_CP_SCREEN 20 91bf215546Sopenharmony_ci#define NV50_BIND_CP_QUERY 21 92bf215546Sopenharmony_ci#define NV50_BIND_CP_COUNT 22 93bf215546Sopenharmony_ci 94bf215546Sopenharmony_ci/* bufctx for other operations */ 95bf215546Sopenharmony_ci#define NV50_BIND_2D 0 96bf215546Sopenharmony_ci#define NV50_BIND_M2MF 0 97bf215546Sopenharmony_ci#define NV50_BIND_FENCE 1 98bf215546Sopenharmony_ci 99bf215546Sopenharmony_ci/* fixed constant buffer binding points - low indices for user's constbufs */ 100bf215546Sopenharmony_ci#define NV50_CB_PVP 123 101bf215546Sopenharmony_ci#define NV50_CB_PGP 124 102bf215546Sopenharmony_ci#define NV50_CB_PFP 125 103bf215546Sopenharmony_ci#define NV50_CB_PCP 126 104bf215546Sopenharmony_ci/* constant buffer permanently mapped in as c15[] */ 105bf215546Sopenharmony_ci#define NV50_CB_AUX 127 106bf215546Sopenharmony_ci/* size of the buffer: 64k. not all taken up, can be reduced if needed. */ 107bf215546Sopenharmony_ci#define NV50_CB_AUX_SIZE (1 << 16) 108bf215546Sopenharmony_ci/* 8 user clip planes, at 4 32-bit floats each */ 109bf215546Sopenharmony_ci#define NV50_CB_AUX_UCP_OFFSET 0x0000 110bf215546Sopenharmony_ci#define NV50_CB_AUX_UCP_SIZE (8 * 4 * 4) 111bf215546Sopenharmony_ci/* 16 textures * NV50_MAX_SHADER_STAGES shaders, each with ms_x, ms_y u32 pairs */ 112bf215546Sopenharmony_ci#define NV50_CB_AUX_TEX_MS_OFFSET 0x0080 113bf215546Sopenharmony_ci#define NV50_CB_AUX_TEX_MS_SIZE (16 * NV50_MAX_SHADER_STAGES * 2 * 4) 114bf215546Sopenharmony_ci/* For each MS level (4), 8 sets of 32-bit integer pairs sample offsets */ 115bf215546Sopenharmony_ci#define NV50_CB_AUX_MS_OFFSET 0x280 116bf215546Sopenharmony_ci#define NV50_CB_AUX_MS_SIZE (4 * 8 * 4 * 2) 117bf215546Sopenharmony_ci/* Sample position pairs for the current output MS level */ 118bf215546Sopenharmony_ci#define NV50_CB_AUX_SAMPLE_OFFSET 0x380 119bf215546Sopenharmony_ci#define NV50_CB_AUX_SAMPLE_OFFSET_SIZE (4 * 8 * 2) 120bf215546Sopenharmony_ci/* Alpha test ref value */ 121bf215546Sopenharmony_ci#define NV50_CB_AUX_ALPHATEST_OFFSET 0x3c0 122bf215546Sopenharmony_ci#define NV50_CB_AUX_ALPHATEST_SIZE (4) 123bf215546Sopenharmony_ci/* Compute buffer info: 16 surfaces, 12 32-bit integers each */ 124bf215546Sopenharmony_ci#define NV50_CB_AUX_BUF_INFO(i) (0x3c4 + (i) * 12 * 4) 125bf215546Sopenharmony_ci#define NV50_CB_AUX_BUF_SIZE (NV50_MAX_GLOBALS * 12 * 4) 126bf215546Sopenharmony_ci/* Compute membar mapped area */ 127bf215546Sopenharmony_ci#define NV50_CB_AUX_MEMBAR_OFFSET 0x6c4 128bf215546Sopenharmony_ci/* next spot: 0x6c8 */ 129bf215546Sopenharmony_ci/* 0x800 from the end for compute shader membars, reads only. */ 130bf215546Sopenharmony_ci#define NV50_CB_AUX_MEMBAR (NV50_CB_AUX_SIZE - 0x800) 131bf215546Sopenharmony_ci/* 4 32-bit floats for the vertex runout, put at the end */ 132bf215546Sopenharmony_ci#define NV50_CB_AUX_RUNOUT_OFFSET (NV50_CB_AUX_SIZE - 0x10) 133bf215546Sopenharmony_ci 134bf215546Sopenharmony_ci 135bf215546Sopenharmony_ci 136bf215546Sopenharmony_cistruct nv50_blitctx; 137bf215546Sopenharmony_ci 138bf215546Sopenharmony_cibool nv50_blitctx_create(struct nv50_context *); 139bf215546Sopenharmony_ci 140bf215546Sopenharmony_cistruct nv50_context { 141bf215546Sopenharmony_ci struct nouveau_context base; 142bf215546Sopenharmony_ci 143bf215546Sopenharmony_ci struct nv50_screen *screen; 144bf215546Sopenharmony_ci 145bf215546Sopenharmony_ci struct nouveau_bufctx *bufctx_3d; 146bf215546Sopenharmony_ci struct nouveau_bufctx *bufctx; 147bf215546Sopenharmony_ci struct nouveau_bufctx *bufctx_cp; 148bf215546Sopenharmony_ci 149bf215546Sopenharmony_ci uint32_t dirty_3d; /* dirty flags for 3d state */ 150bf215546Sopenharmony_ci uint32_t dirty_cp; /* dirty flags for compute state */ 151bf215546Sopenharmony_ci bool cb_dirty; 152bf215546Sopenharmony_ci 153bf215546Sopenharmony_ci struct nv50_graph_state state; 154bf215546Sopenharmony_ci 155bf215546Sopenharmony_ci struct nv50_blend_stateobj *blend; 156bf215546Sopenharmony_ci struct nv50_rasterizer_stateobj *rast; 157bf215546Sopenharmony_ci struct nv50_zsa_stateobj *zsa; 158bf215546Sopenharmony_ci struct nv50_vertex_stateobj *vertex; 159bf215546Sopenharmony_ci 160bf215546Sopenharmony_ci struct nv50_program *vertprog; 161bf215546Sopenharmony_ci struct nv50_program *gmtyprog; 162bf215546Sopenharmony_ci struct nv50_program *fragprog; 163bf215546Sopenharmony_ci struct nv50_program *compprog; 164bf215546Sopenharmony_ci 165bf215546Sopenharmony_ci struct nv50_constbuf constbuf[NV50_MAX_SHADER_STAGES][NV50_MAX_PIPE_CONSTBUFS]; 166bf215546Sopenharmony_ci uint16_t constbuf_dirty[NV50_MAX_SHADER_STAGES]; 167bf215546Sopenharmony_ci uint16_t constbuf_valid[NV50_MAX_SHADER_STAGES]; 168bf215546Sopenharmony_ci uint16_t constbuf_coherent[NV50_MAX_SHADER_STAGES]; 169bf215546Sopenharmony_ci 170bf215546Sopenharmony_ci struct pipe_vertex_buffer vtxbuf[PIPE_MAX_ATTRIBS]; 171bf215546Sopenharmony_ci unsigned num_vtxbufs; 172bf215546Sopenharmony_ci uint32_t vtxbufs_coherent; 173bf215546Sopenharmony_ci uint32_t vbo_fifo; /* bitmask of vertex elements to be pushed to FIFO */ 174bf215546Sopenharmony_ci uint32_t vbo_user; /* bitmask of vertex buffers pointing to user memory */ 175bf215546Sopenharmony_ci uint32_t vbo_constant; /* bitmask of user buffers with stride 0 */ 176bf215546Sopenharmony_ci uint32_t vb_elt_first; /* from pipe_draw_info, for vertex upload */ 177bf215546Sopenharmony_ci uint32_t vb_elt_limit; /* max - min element (count - 1) */ 178bf215546Sopenharmony_ci uint32_t instance_off; /* base vertex for instanced arrays */ 179bf215546Sopenharmony_ci uint32_t instance_max; /* max instance for current draw call */ 180bf215546Sopenharmony_ci 181bf215546Sopenharmony_ci struct pipe_sampler_view *textures[NV50_MAX_SHADER_STAGES][PIPE_MAX_SAMPLERS]; 182bf215546Sopenharmony_ci unsigned num_textures[NV50_MAX_SHADER_STAGES]; 183bf215546Sopenharmony_ci uint32_t textures_coherent[NV50_MAX_SHADER_STAGES]; 184bf215546Sopenharmony_ci struct nv50_tsc_entry *samplers[NV50_MAX_SHADER_STAGES][PIPE_MAX_SAMPLERS]; 185bf215546Sopenharmony_ci unsigned num_samplers[NV50_MAX_SHADER_STAGES]; 186bf215546Sopenharmony_ci bool seamless_cube_map; 187bf215546Sopenharmony_ci 188bf215546Sopenharmony_ci uint8_t num_so_targets; 189bf215546Sopenharmony_ci uint8_t so_targets_dirty; 190bf215546Sopenharmony_ci struct pipe_stream_output_target *so_target[4]; 191bf215546Sopenharmony_ci /* keeps track of how much of an SO is used. normally this doesn't work in 192bf215546Sopenharmony_ci * the presence of GS, but this only needs to work for ES 3.0 which doesn't 193bf215546Sopenharmony_ci * have GS or any other oddities. only used pre-NVA0. 194bf215546Sopenharmony_ci */ 195bf215546Sopenharmony_ci uint32_t so_used[4]; 196bf215546Sopenharmony_ci 197bf215546Sopenharmony_ci struct pipe_framebuffer_state framebuffer; 198bf215546Sopenharmony_ci struct pipe_blend_color blend_colour; 199bf215546Sopenharmony_ci struct pipe_stencil_ref stencil_ref; 200bf215546Sopenharmony_ci struct pipe_poly_stipple stipple; 201bf215546Sopenharmony_ci struct pipe_scissor_state scissors[NV50_MAX_VIEWPORTS]; 202bf215546Sopenharmony_ci unsigned scissors_dirty; 203bf215546Sopenharmony_ci struct pipe_viewport_state viewports[NV50_MAX_VIEWPORTS]; 204bf215546Sopenharmony_ci unsigned viewports_dirty; 205bf215546Sopenharmony_ci struct pipe_clip_state clip; 206bf215546Sopenharmony_ci struct nv50_window_rect_stateobj window_rect; 207bf215546Sopenharmony_ci 208bf215546Sopenharmony_ci unsigned sample_mask; 209bf215546Sopenharmony_ci unsigned min_samples; 210bf215546Sopenharmony_ci 211bf215546Sopenharmony_ci bool vbo_push_hint; 212bf215546Sopenharmony_ci 213bf215546Sopenharmony_ci uint32_t rt_array_mode; 214bf215546Sopenharmony_ci 215bf215546Sopenharmony_ci struct pipe_query *cond_query; 216bf215546Sopenharmony_ci bool cond_cond; /* inverted rendering condition */ 217bf215546Sopenharmony_ci uint cond_mode; 218bf215546Sopenharmony_ci uint32_t cond_condmode; /* the calculated condition */ 219bf215546Sopenharmony_ci 220bf215546Sopenharmony_ci struct nv50_blitctx *blit; 221bf215546Sopenharmony_ci 222bf215546Sopenharmony_ci /* compute stage only */ 223bf215546Sopenharmony_ci struct pipe_shader_buffer buffers[NV50_MAX_GLOBALS]; 224bf215546Sopenharmony_ci uint16_t buffers_dirty; 225bf215546Sopenharmony_ci uint16_t buffers_valid; 226bf215546Sopenharmony_ci 227bf215546Sopenharmony_ci struct pipe_image_view images[NV50_MAX_GLOBALS]; 228bf215546Sopenharmony_ci uint16_t images_dirty; 229bf215546Sopenharmony_ci uint16_t images_valid; 230bf215546Sopenharmony_ci 231bf215546Sopenharmony_ci struct util_dynarray global_residents; 232bf215546Sopenharmony_ci 233bf215546Sopenharmony_ci uint64_t compute_invocations; 234bf215546Sopenharmony_ci}; 235bf215546Sopenharmony_ci 236bf215546Sopenharmony_cistatic inline struct nv50_context * 237bf215546Sopenharmony_cinv50_context(struct pipe_context *pipe) 238bf215546Sopenharmony_ci{ 239bf215546Sopenharmony_ci return (struct nv50_context *)pipe; 240bf215546Sopenharmony_ci} 241bf215546Sopenharmony_ci 242bf215546Sopenharmony_ci/* return index used in nv50_context arrays for a specific shader type */ 243bf215546Sopenharmony_cistatic inline unsigned 244bf215546Sopenharmony_cinv50_context_shader_stage(unsigned pipe) 245bf215546Sopenharmony_ci{ 246bf215546Sopenharmony_ci switch (pipe) { 247bf215546Sopenharmony_ci case PIPE_SHADER_VERTEX: return NV50_SHADER_STAGE_VERTEX; 248bf215546Sopenharmony_ci case PIPE_SHADER_FRAGMENT: return NV50_SHADER_STAGE_FRAGMENT; 249bf215546Sopenharmony_ci case PIPE_SHADER_GEOMETRY: return NV50_SHADER_STAGE_GEOMETRY; 250bf215546Sopenharmony_ci case PIPE_SHADER_COMPUTE: return NV50_SHADER_STAGE_COMPUTE; 251bf215546Sopenharmony_ci default: 252bf215546Sopenharmony_ci assert(!"invalid/unhandled shader type"); 253bf215546Sopenharmony_ci return 0; 254bf215546Sopenharmony_ci } 255bf215546Sopenharmony_ci} 256bf215546Sopenharmony_ci 257bf215546Sopenharmony_ci/* nv50_context.c */ 258bf215546Sopenharmony_cistruct pipe_context *nv50_create(struct pipe_screen *, void *, unsigned flags); 259bf215546Sopenharmony_ci 260bf215546Sopenharmony_civoid nv50_bufctx_fence(struct nouveau_bufctx *, bool on_flush); 261bf215546Sopenharmony_ci 262bf215546Sopenharmony_civoid nv50_default_kick_notify(struct nouveau_pushbuf *); 263bf215546Sopenharmony_ci 264bf215546Sopenharmony_ci/* nv50_draw.c */ 265bf215546Sopenharmony_ciextern struct draw_stage *nv50_draw_render_stage(struct nv50_context *); 266bf215546Sopenharmony_ci 267bf215546Sopenharmony_ci/* nv50_shader_state.c */ 268bf215546Sopenharmony_civoid nv50_vertprog_validate(struct nv50_context *); 269bf215546Sopenharmony_civoid nv50_gmtyprog_validate(struct nv50_context *); 270bf215546Sopenharmony_civoid nv50_fragprog_validate(struct nv50_context *); 271bf215546Sopenharmony_civoid nv50_compprog_validate(struct nv50_context *); 272bf215546Sopenharmony_civoid nv50_fp_linkage_validate(struct nv50_context *); 273bf215546Sopenharmony_civoid nv50_gp_linkage_validate(struct nv50_context *); 274bf215546Sopenharmony_civoid nv50_constbufs_validate(struct nv50_context *); 275bf215546Sopenharmony_civoid nv50_validate_derived_rs(struct nv50_context *); 276bf215546Sopenharmony_civoid nv50_stream_output_validate(struct nv50_context *); 277bf215546Sopenharmony_ci 278bf215546Sopenharmony_ci/* nv50_state.c */ 279bf215546Sopenharmony_ciextern void nv50_init_state_functions(struct nv50_context *); 280bf215546Sopenharmony_ci 281bf215546Sopenharmony_ci/* nv50_state_validate.c */ 282bf215546Sopenharmony_cistruct nv50_state_validate { 283bf215546Sopenharmony_ci void (*func)(struct nv50_context *); 284bf215546Sopenharmony_ci uint32_t states; 285bf215546Sopenharmony_ci}; 286bf215546Sopenharmony_ci 287bf215546Sopenharmony_cibool nv50_state_validate(struct nv50_context *, uint32_t, 288bf215546Sopenharmony_ci struct nv50_state_validate *, int, uint32_t *, 289bf215546Sopenharmony_ci struct nouveau_bufctx *); 290bf215546Sopenharmony_cibool nv50_state_validate_3d(struct nv50_context *, uint32_t); 291bf215546Sopenharmony_ci 292bf215546Sopenharmony_ci/* nv50_surface.c */ 293bf215546Sopenharmony_ciextern void nv50_clear(struct pipe_context *, unsigned buffers, 294bf215546Sopenharmony_ci const struct pipe_scissor_state *scissor_state, 295bf215546Sopenharmony_ci const union pipe_color_union *color, 296bf215546Sopenharmony_ci double depth, unsigned stencil); 297bf215546Sopenharmony_ciextern void nv50_init_surface_functions(struct nv50_context *); 298bf215546Sopenharmony_ci 299bf215546Sopenharmony_ci/* nv50_tex.c */ 300bf215546Sopenharmony_cibool nv50_validate_tic(struct nv50_context *nv50, int s); 301bf215546Sopenharmony_civoid nv50_validate_textures(struct nv50_context *); 302bf215546Sopenharmony_cibool nv50_validate_tsc(struct nv50_context *nv50, int s); 303bf215546Sopenharmony_civoid nv50_validate_samplers(struct nv50_context *); 304bf215546Sopenharmony_civoid nv50_upload_ms_info(struct nouveau_pushbuf *); 305bf215546Sopenharmony_civoid nv50_upload_tsc0(struct nv50_context *); 306bf215546Sopenharmony_ci 307bf215546Sopenharmony_cistruct pipe_sampler_view * 308bf215546Sopenharmony_cinv50_create_texture_view(struct pipe_context *, 309bf215546Sopenharmony_ci struct pipe_resource *, 310bf215546Sopenharmony_ci const struct pipe_sampler_view *, 311bf215546Sopenharmony_ci uint32_t flags); 312bf215546Sopenharmony_cistruct pipe_sampler_view * 313bf215546Sopenharmony_cinv50_create_sampler_view(struct pipe_context *, 314bf215546Sopenharmony_ci struct pipe_resource *, 315bf215546Sopenharmony_ci const struct pipe_sampler_view *); 316bf215546Sopenharmony_ci 317bf215546Sopenharmony_ci/* nv50_transfer.c */ 318bf215546Sopenharmony_civoid 319bf215546Sopenharmony_cinv50_m2mf_transfer_rect(struct nv50_context *, 320bf215546Sopenharmony_ci const struct nv50_m2mf_rect *dst, 321bf215546Sopenharmony_ci const struct nv50_m2mf_rect *src, 322bf215546Sopenharmony_ci uint32_t nblocksx, uint32_t nblocksy); 323bf215546Sopenharmony_civoid 324bf215546Sopenharmony_cinv50_sifc_linear_u8(struct nouveau_context *pipe, 325bf215546Sopenharmony_ci struct nouveau_bo *dst, unsigned offset, unsigned domain, 326bf215546Sopenharmony_ci unsigned size, const void *data); 327bf215546Sopenharmony_civoid 328bf215546Sopenharmony_cinv50_m2mf_copy_linear(struct nouveau_context *pipe, 329bf215546Sopenharmony_ci struct nouveau_bo *dst, unsigned dstoff, unsigned dstdom, 330bf215546Sopenharmony_ci struct nouveau_bo *src, unsigned srcoff, unsigned srcdom, 331bf215546Sopenharmony_ci unsigned size); 332bf215546Sopenharmony_civoid 333bf215546Sopenharmony_cinv50_cb_push(struct nouveau_context *nv, 334bf215546Sopenharmony_ci struct nv04_resource *res, 335bf215546Sopenharmony_ci unsigned offset, unsigned words, const uint32_t *data); 336bf215546Sopenharmony_ci 337bf215546Sopenharmony_ci/* nv50_vbo.c */ 338bf215546Sopenharmony_civoid nv50_draw_vbo(struct pipe_context *, const struct pipe_draw_info *, unsigned, 339bf215546Sopenharmony_ci const struct pipe_draw_indirect_info *indirect, 340bf215546Sopenharmony_ci const struct pipe_draw_start_count_bias *draws, 341bf215546Sopenharmony_ci unsigned num_draws); 342bf215546Sopenharmony_ci 343bf215546Sopenharmony_civoid * 344bf215546Sopenharmony_cinv50_vertex_state_create(struct pipe_context *pipe, 345bf215546Sopenharmony_ci unsigned num_elements, 346bf215546Sopenharmony_ci const struct pipe_vertex_element *elements); 347bf215546Sopenharmony_civoid 348bf215546Sopenharmony_cinv50_vertex_state_delete(struct pipe_context *pipe, void *hwcso); 349bf215546Sopenharmony_ci 350bf215546Sopenharmony_civoid nv50_vertex_arrays_validate(struct nv50_context *nv50); 351bf215546Sopenharmony_ci 352bf215546Sopenharmony_ci/* nv50_push.c */ 353bf215546Sopenharmony_civoid nv50_push_vbo(struct nv50_context *, const struct pipe_draw_info *, 354bf215546Sopenharmony_ci const struct pipe_draw_indirect_info *indirect, 355bf215546Sopenharmony_ci const struct pipe_draw_start_count_bias *draw); 356bf215546Sopenharmony_ci 357bf215546Sopenharmony_ci/* nv84_video.c */ 358bf215546Sopenharmony_cistruct pipe_video_codec * 359bf215546Sopenharmony_cinv84_create_decoder(struct pipe_context *context, 360bf215546Sopenharmony_ci const struct pipe_video_codec *templ); 361bf215546Sopenharmony_ci 362bf215546Sopenharmony_cistruct pipe_video_buffer * 363bf215546Sopenharmony_cinv84_video_buffer_create(struct pipe_context *pipe, 364bf215546Sopenharmony_ci const struct pipe_video_buffer *template); 365bf215546Sopenharmony_ci 366bf215546Sopenharmony_ciint 367bf215546Sopenharmony_cinv84_screen_get_video_param(struct pipe_screen *pscreen, 368bf215546Sopenharmony_ci enum pipe_video_profile profile, 369bf215546Sopenharmony_ci enum pipe_video_entrypoint entrypoint, 370bf215546Sopenharmony_ci enum pipe_video_cap param); 371bf215546Sopenharmony_ci 372bf215546Sopenharmony_cibool 373bf215546Sopenharmony_cinv84_screen_video_supported(struct pipe_screen *screen, 374bf215546Sopenharmony_ci enum pipe_format format, 375bf215546Sopenharmony_ci enum pipe_video_profile profile, 376bf215546Sopenharmony_ci enum pipe_video_entrypoint entrypoint); 377bf215546Sopenharmony_ci 378bf215546Sopenharmony_ci/* nv98_video.c */ 379bf215546Sopenharmony_cistruct pipe_video_codec * 380bf215546Sopenharmony_cinv98_create_decoder(struct pipe_context *context, 381bf215546Sopenharmony_ci const struct pipe_video_codec *templ); 382bf215546Sopenharmony_ci 383bf215546Sopenharmony_cistruct pipe_video_buffer * 384bf215546Sopenharmony_cinv98_video_buffer_create(struct pipe_context *pipe, 385bf215546Sopenharmony_ci const struct pipe_video_buffer *template); 386bf215546Sopenharmony_ci 387bf215546Sopenharmony_ci/* nv50_compute.c */ 388bf215546Sopenharmony_civoid 389bf215546Sopenharmony_cinv50_launch_grid(struct pipe_context *, const struct pipe_grid_info *); 390bf215546Sopenharmony_ci 391bf215546Sopenharmony_ci#endif 392