~ubuntu-branches/ubuntu/trusty/xserver-xorg-video-nouveau/trusty

« back to all changes in this revision

Viewing changes to src/nv30_shaders.c

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2009-12-04 12:31:58 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20091204123158-oc7ytykkz8anvr6i
Tags: 1:0.0.15+git20100128+2630a15-0ubuntu1
* New upstream snapshot
  + Too many commits to usefully list in the changelog.
  + User modesetting code is now removed.  Nouveau will now only work with 
    KMS.
* debian/control:
  + Bump versioned Build-Dep on libdrm-dev to >= 2.4.17-1ubuntu1~ to pick 
    up nouveau #define updates.
  + Bump build-dep on xserver-xorg-dev to >= 2:1.7.  Nouveau now requires 
    xorg-server >= 1.7.
  + Drop duplicate build-dep on xserver-xorg-dev
  + List the Build-Depends one-to-a-line for clarity
  + Drop the Depends: on linux-nouveau-modules.  Replace with temporary 
    Depends against apw's linux-backports-modules-nouveau* packages.
  + Bump Standards version to 3.8.3.
* debian/README.source
  + Quilt patchsys README for standards version 3.8.3 compliance
* Change versioning to match Sarvatt's snapshot versioning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        }
66
66
}
67
67
 
68
 
void
 
68
Bool
69
69
NV30_LoadFragProg(ScrnInfoPtr pScrn, nv_shader_t *shader)
70
70
{
71
71
        NVPtr pNv = NVPTR(pScrn);
73
73
        struct nouveau_grobj *rankine = pNv->Nv3D;
74
74
 
75
75
        BEGIN_RING(chan, rankine, NV34TCL_FP_ACTIVE_PROGRAM, 1);
76
 
        OUT_RELOC (chan, pNv->shader_mem, shader->hw_id, NOUVEAU_BO_VRAM |
77
 
                   NOUVEAU_BO_RD | NOUVEAU_BO_LOW | NOUVEAU_BO_OR,
78
 
                   NV34TCL_FP_ACTIVE_PROGRAM_DMA0,
79
 
                   NV34TCL_FP_ACTIVE_PROGRAM_DMA1);
80
 
 
 
76
        if (OUT_RELOC(chan, pNv->shader_mem, shader->hw_id, NOUVEAU_BO_VRAM |
 
77
                      NOUVEAU_BO_RD | NOUVEAU_BO_LOW | NOUVEAU_BO_OR,
 
78
                      NV34TCL_FP_ACTIVE_PROGRAM_DMA0,
 
79
                      NV34TCL_FP_ACTIVE_PROGRAM_DMA1))
 
80
                return FALSE;
81
81
        BEGIN_RING(chan, rankine, NV34TCL_FP_REG_CONTROL, 1);
82
82
        OUT_RING  (chan, (1 << 16)| 0xf);
83
83
        BEGIN_RING(chan, rankine, NV34TCL_MULTISAMPLE_CONTROL, 1);
85
85
 
86
86
        BEGIN_RING(chan, rankine, NV34TCL_FP_CONTROL,1);
87
87
        OUT_RING  (chan, (shader->card_priv.NV30FP.num_regs-1)/2);
 
88
 
 
89
        return TRUE;
88
90
}
89
91
 
90
92
void
102
104
        OUT_RING  (chan, shader->card_priv.NV30VP.vp_out_reg);
103
105
}
104
106
 
105
 
void
 
107
Bool
106
108
NV40_LoadFragProg(ScrnInfoPtr pScrn, nv_shader_t *shader)
107
109
{
108
110
        NVPtr pNv = NVPTR(pScrn);
110
112
        struct nouveau_grobj *curie = pNv->Nv3D;
111
113
 
112
114
        BEGIN_RING(chan, curie, NV40TCL_FP_ADDRESS, 1);
113
 
        OUT_RELOC (chan, pNv->shader_mem, shader->hw_id, NOUVEAU_BO_VRAM |
114
 
                         NOUVEAU_BO_GART | NOUVEAU_BO_RD | NOUVEAU_BO_LOW |
115
 
                         NOUVEAU_BO_OR,
116
 
                         NV40TCL_FP_ADDRESS_DMA0, NV40TCL_FP_ADDRESS_DMA1);
 
115
        if (OUT_RELOC(chan, pNv->shader_mem, shader->hw_id, NOUVEAU_BO_VRAM |
 
116
                      NOUVEAU_BO_GART | NOUVEAU_BO_RD | NOUVEAU_BO_LOW |
 
117
                      NOUVEAU_BO_OR,
 
118
                      NV40TCL_FP_ADDRESS_DMA0, NV40TCL_FP_ADDRESS_DMA1))
 
119
                return FALSE;
117
120
        BEGIN_RING(chan, curie, NV40TCL_FP_CONTROL, 1);
118
121
        OUT_RING  (chan, shader->card_priv.NV30FP.num_regs <<
119
122
                         NV40TCL_FP_CONTROL_TEMP_COUNT_SHIFT);
 
123
 
 
124
        return TRUE;
120
125
}
121
126
 
122
127
/*******************************************************************************