Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / hidds / nouveau / xf86-video-nouveau / nv30_shaders.h
blob3e666fa13f85c6fa263cc3946c8fd2a5a957b844
1 /*
2 * Copyright 2007 Nouveau Project
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
19 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 * SOFTWARE.
23 #ifndef __NV30_SHADERS_H__
24 #define __NV30_SHADERS_H__
26 #define NV_SHADER_MAX_PROGRAM_LENGTH 256
28 #include "nv_include.h"
30 typedef struct nv_shader {
31 uint32_t hw_id;
32 uint32_t size;
33 union {
34 struct {
35 uint32_t vp_in_reg;
36 uint32_t vp_out_reg;
37 } NV30VP;
38 struct {
39 uint32_t num_regs;
40 } NV30FP;
41 } card_priv;
42 uint32_t data[NV_SHADER_MAX_PROGRAM_LENGTH];
43 } nv_shader_t;
45 void NV30_UploadFragProg(NVPtr pNv, nv_shader_t *shader, int *hw_offset);
46 void NV40_UploadVtxProg(NVPtr pNv, nv_shader_t *shader, int *hw_id);
47 void NV40_LoadVtxProg(ScrnInfoPtr pScrn, nv_shader_t *shader);
48 Bool NV40_LoadFragProg(ScrnInfoPtr pScrn, nv_shader_t *shader);
49 Bool NV30_LoadFragProg(ScrnInfoPtr pScrn, nv_shader_t *shader);
52 /*******************************************************************************
53 * NV40/G70 vertex shaders
56 nv_shader_t nv40_vp_exa_render;
57 nv_shader_t nv40_vp_video;
59 /*******************************************************************************
60 * NV30/NV40/G70 fragment shaders
63 nv_shader_t nv30_fp_pass_col0;
64 nv_shader_t nv30_fp_pass_tex0;
65 nv_shader_t nv30_fp_composite_mask;
66 nv_shader_t nv30_fp_composite_mask_sa_ca;
67 nv_shader_t nv30_fp_composite_mask_ca;
68 nv_shader_t nv30_fp_yv12_bicubic;
69 nv_shader_t nv30_fp_yv12_bilinear;
70 nv_shader_t nv40_fp_yv12_bicubic;
72 #endif