diff options
author | Ben Skeggs <[email protected]> | 2007-02-06 13:49:39 +1100 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2007-02-06 14:01:19 +1100 |
commit | f46c19d965fb05a49d361aa251e37b5ef32dd839 (patch) | |
tree | 9e160130ba52028e37373d118aad5f7f539d8aac /src/mesa/drivers/dri/nouveau/nouveau_shader.c | |
parent | 8518ddda7b5f8e43de4859042fe59f55aa0c2760 (diff) |
nouveau: a couple of NV3x fixes
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_shader.c')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_shader.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c index c78b72bd113..ba471325aaa 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -220,6 +220,21 @@ nvsBuildPassthroughVP(GLcontext *ctx) vp_text); } +static void +nvsBuildPassthroughFP(GLcontext *ctx) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + const char *fp_text = + "!!ARBfp1.0\n" + "MOV result.color, fragment.color;\n" + "END"; + + nmesa->passthrough_fp = nvsBuildTextShader(ctx, + GL_FRAGMENT_PROGRAM_ARB, + fp_text); +} + void nouveauShaderInitFuncs(GLcontext * ctx) { @@ -249,6 +264,10 @@ nouveauShaderInitFuncs(GLcontext * ctx) if (nmesa->screen->card->type >= NV_40) nvsBuildPassthroughVP(ctx); + /* Needed on NV30, even when using swtcl, if you want to get colours */ + if (nmesa->screen->card->type >= NV_30) + nvsBuildPassthroughFP(ctx); + ctx->Const.VertexProgram.MaxNativeInstructions = nmesa->VPfunc.MaxInst; ctx->Const.VertexProgram.MaxNativeAluInstructions = nmesa->VPfunc.MaxInst; ctx->Const.VertexProgram.MaxNativeTexInstructions = nmesa->VPfunc.MaxInst; |