亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? binding.c

?? nVidia開發(fā)的圖形語言 Cg
?? C
字號:
/****************************************************************************\
Copyright (c) 2002, NVIDIA Corporation.

NVIDIA Corporation("NVIDIA") supplies this software to you in
consideration of your agreement to the following terms, and your use,
installation, modification or redistribution of this NVIDIA software
constitutes acceptance of these terms.  If you do not agree with these
terms, please do not use, install, modify or redistribute this NVIDIA
software.

In consideration of your agreement to abide by the following terms, and
subject to these terms, NVIDIA grants you a personal, non-exclusive
license, under NVIDIA's copyrights in this original NVIDIA software (the
"NVIDIA Software"), to use, reproduce, modify and redistribute the
NVIDIA Software, with or without modifications, in source and/or binary
forms; provided that if you redistribute the NVIDIA Software, you must
retain the copyright notice of NVIDIA, this notice and the following
text and disclaimers in all such redistributions of the NVIDIA Software.
Neither the name, trademarks, service marks nor logos of NVIDIA
Corporation may be used to endorse or promote products derived from the
NVIDIA Software without specific prior written permission from NVIDIA.
Except as expressly stated in this notice, no other rights or licenses
express or implied, are granted by NVIDIA herein, including but not
limited to any patent rights that may be infringed by your derivative
works or by other works in which the NVIDIA Software may be
incorporated. No hardware is licensed hereunder. 

THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
PRODUCTS.

IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\****************************************************************************/

//
// binding.c
//

#include <stdlib.h>
#include <stdio.h>

#include "slglobals.h"

///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////// Connector and Parameter Binding Functions: //////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////

/*
 * lInitBinding()
 *
 */

static void lInitBinding(Binding *fBind)
{
    fBind->none.properties = 0;
    fBind->none.gname = 0;
    fBind->none.lname = 0;
    fBind->none.base = 0;
    fBind->none.size = 0;
    fBind->none.kind = BK_NONE;
} // lInitBinding

/*
 * NewBinding()
 *
 */

Binding *NewBinding(int gname, int sname)
{
    Binding *lBind;

    lBind = (Binding *) malloc(sizeof(Binding));
    lInitBinding(lBind);
    lBind->none.gname = gname;
    lBind->none.lname = sname;
    return lBind;
} // NewBinding

/*
 * NewConstDefaultBinding()
 *
 */

Binding *NewConstDefaultBinding(int gname, int sname, int count, int rname, int regno,
                                float *fval)
{
    Binding *lBind;
    int ii;

    lBind = NewBinding(gname, sname);
    lBind->constdef.kind = BK_CONSTANT;
    lBind->constdef.size = count;
    lBind->constdef.rname = rname;
    lBind->constdef.regno = regno;
    for (ii = 0; ii < count; ii++)
        lBind->constdef.val[ii] = fval[ii];
    return lBind;
} // NewConstDefaultBinding

/*
 * NewBindingTree()
 *
 */

BindingTree *NewBindingTree(SourceLoc *loc)
{
    BindingTree *lTree;

    lTree = (BindingTree *) malloc(sizeof(BindingTree));
    lInitBinding(&lTree->binding);
    lTree->nextc = NULL;
    lTree->nextm = NULL;
    lTree->loc = *loc;
    lTree->loc.line = 0;
    return lTree;
} // NewBindingTree

/*
 * NewConnectorBindingTree()
 *
 */

BindingTree *NewConnectorBindingTree(SourceLoc *loc, int cname, int mname, int rname)
{
    BindingTree *lTree;
    BindingConnector *lBind;

    lTree = NewBindingTree(loc);
    lBind = &lTree->binding.conn;
    lBind->gname = cname;
    lBind->lname = mname;
    lBind->kind = BK_CONNECTOR;
    lBind->rname = rname;
    lBind->regno = 0;
    return lTree;
} // NewConnectorBindingTree

/*
 * NewRegArrayBindingTree()
 *
 */

BindingTree *NewRegArrayBindingTree(SourceLoc *loc, int pname, int aname, int rname, int regno,
                                    int count)
{
    BindingTree *lTree;
    BindingRegArray *lBind;

    lTree = NewBindingTree(loc);
    lBind = &lTree->binding.reg;
    lBind->gname = pname;
    lBind->lname = aname;
    lBind->kind = BK_REGARRAY;
    lBind->rname = rname;
    lBind->regno = regno;
    lBind->count = count;
    return lTree;
} // NewRegArrayBindingTree

/*
 * NewTexunitBindingTree()
 *
 */

BindingTree *NewTexunitBindingTree(SourceLoc *loc, int pname, int aname, int unitno)
{
    BindingTree *lTree;
    BindingTexunit *lBind;

    lTree = NewBindingTree(loc);
    lBind = &lTree->binding.texunit;
    lBind->gname = pname;
    lBind->lname = aname;
    lBind->kind = BK_TEXUNIT;
    lBind->unitno = unitno;
    return lTree;
} // NewTexunitBindingTree

/*
 * NewConstDefaultBindingTree()
 *
 */

BindingTree *NewConstDefaultBindingTree(SourceLoc *loc, int kind, int pname, int aname,
                                        int count, float *fval)
{
    BindingTree *lTree;
    BindingConstDefault *lBind;
    int ii;

    if (count > 4)
        count = 4;
    lTree = NewBindingTree(loc);
    lBind = &lTree->binding.constdef;
    lBind->gname = pname;
    lBind->lname = aname;
    lBind->kind = kind;
    lBind->size = count;
    lBind->rname = 0;
    lBind->regno = 0;
    for (ii = 0; ii < count; ii++)
        lBind->val[ii] = fval[ii];
    return lTree;
} // NewConstDefaultBindingTree

/*
 * LookupBinding()
 *
 */

BindingTree *LookupBinding(int gname, int lname)
{
    BindingTree *lTree;

    lTree = Cg->bindings;
    while (lTree) {
        if (lTree->binding.none.gname == gname) {
            do {
                if (lTree->binding.none.lname == lname) {
                    return lTree;
                } else {
                    lTree = lTree->nextm;
                }
            } while (lTree);
            return NULL;
        }
        lTree = lTree->nextc;
    }
    return NULL;
} // LookupBinding

/*
 * AddBinding()
 *
 */

void AddBinding(BindingTree *fTree)
{
    BindingTree *lTree;

    lTree = Cg->bindings;
    while (lTree) {
        if (lTree->binding.none.gname == fTree->binding.none.gname)
            break;
        lTree = lTree->nextc;
    }
    if (lTree) {
        fTree->nextm = lTree->nextm;
        lTree->nextm = fTree;
    } else {
        fTree->nextc = Cg->bindings;
        Cg->bindings = fTree;
    }
} // AddBinding

/*
 * DefineConnectorBinding() - Define a binding between a member of a connector and a hw reg.
 *
 * #pragma bind <conn-id> "." <memb-id> "=" <reg-id>
 *
 */

void DefineConnectorBinding(SourceLoc *loc, int cname, int mname, int rname)
{
    BindingTree *lTree;

    lTree = LookupBinding(cname, mname);
    if (lTree) {
        SemanticError(loc, ERROR_SSSD_DUPLICATE_BINDING,
            GetAtomString(atable, cname), GetAtomString(atable, mname),
            GetAtomString(atable, lTree->loc.file), lTree->loc.line);
        return;
    }
    lTree = NewConnectorBindingTree(loc, cname, mname, rname);
    AddBinding(lTree);
} // DefineConnectorBinding

/*
 * DefineRegArrayBinding() - Define a binding between a member of a connector and a hw reg.
 *
 * #pragma bind <prog-id> "." <arg-id> "=" <reg-id>
 *
 */

void DefineRegArrayBinding(SourceLoc *loc, int pname, int aname, int rname, int index,
                           int count)
{
    BindingTree *lTree;

    lTree = LookupBinding(pname, aname);
    if (lTree) {
        SemanticError(loc, ERROR_SSSD_DUPLICATE_BINDING,
            GetAtomString(atable, pname), GetAtomString(atable, aname),
            GetAtomString(atable, lTree->loc.file), lTree->loc.line);
        return;
    }
    lTree = NewRegArrayBindingTree(loc, pname, aname, rname, index, count);
    AddBinding(lTree);
} // DefineRegArrayBinding

/*
 * DefineTexunitBinding() - Define a binding between a member of a connector and a hw reg.
 *
 * #pragma bind <prog-id> "." <arg-id> "=" <reg-id> <i-const> [ <i-const> ]
 *
 */

void DefineTexunitBinding(SourceLoc *loc, int pname, int aname, int unitno)
{
    BindingTree *lTree;

    lTree = LookupBinding(pname, aname);
    if (lTree) {
        SemanticError(loc, ERROR_SSSD_DUPLICATE_BINDING,
            GetAtomString(atable, pname), GetAtomString(atable, aname),
            GetAtomString(atable, lTree->loc.file), lTree->loc.line);
        return;
    }
    lTree = NewTexunitBindingTree(loc, pname, aname, unitno);
    AddBinding(lTree);
} // DefineTexunitBinding

/*
 * DefineConstantBinding() - Define a binding between a member of a connector and a hw reg.
 *
 * #pragma bind <prog-id> "." <arg-id> "=" "constant" <simple-float-expr>+
 *
 */

void DefineConstantBinding(SourceLoc *loc, int pname, int aname, int count, float *fval)
{
    BindingTree *lTree;

    lTree = LookupBinding(pname, aname);
    if (lTree) {
        SemanticError(loc, ERROR_SSSD_DUPLICATE_BINDING,
            GetAtomString(atable, pname), GetAtomString(atable, aname),
            GetAtomString(atable, lTree->loc.file), lTree->loc.line);
        return;
    }
    lTree = NewConstDefaultBindingTree(loc, BK_CONSTANT, pname, aname, count, fval);
    AddBinding(lTree);
} // DefineConstantBinding

/*
 * DefineDefaultBinding() - Define a binding between a member of a connector and a hw reg.
 *
 * #pragma bind <prog-id> "." <arg-id> "=" "default" <simple-float-expr>+
 *
 */

void DefineDefaultBinding(SourceLoc *loc, int pname, int aname, int count, float *fval)
{
    BindingTree *lTree;

    lTree = LookupBinding(pname, aname);
    if (lTree) {
        SemanticError(loc, ERROR_SSSD_DUPLICATE_BINDING,
            GetAtomString(atable, pname), GetAtomString(atable, aname),
            GetAtomString(atable, lTree->loc.file), lTree->loc.line);
        return;
    }
    lTree = NewConstDefaultBindingTree(loc, BK_DEFAULT, pname, aname, count, fval);
    AddBinding(lTree);
} // DefineDefaultBinding

///////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////// Uniform Semantics: /////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////

/*
 * NewUniformSemantic() - Aloocate a new UniformSemantic record.
 *
 */

UniformSemantic *NewUniformSemantic(int gname, int vname, int semantic)
{
    UniformSemantic *lSemantic;

    lSemantic = (UniformSemantic *) malloc(sizeof(UniformSemantic));
    lSemantic->next = NULL;
    lSemantic->gname = gname;
    lSemantic->vname = vname;
    lSemantic->semantic = semantic;

    return lSemantic;
} // NewUniformSemantic

///////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////// End of binding.c //////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产综合色产在线精品| 精品国产一区久久| va亚洲va日韩不卡在线观看| 精品一区二区三区欧美| 蜜桃视频在线观看一区二区| 日韩电影在线免费| 全国精品久久少妇| 日本欧美一区二区| 免费人成黄页网站在线一区二区| 日韩在线一区二区三区| 日韩国产欧美三级| 六月婷婷色综合| 韩日欧美一区二区三区| 国产mv日韩mv欧美| 波多野洁衣一区| 一本一道久久a久久精品综合蜜臀| 97se狠狠狠综合亚洲狠狠| 成人97人人超碰人人99| 色综合 综合色| 欧美视频一区二| 日韩欧美精品三级| 久久久精品国产免大香伊| 国产清纯美女被跳蛋高潮一区二区久久w| 亚洲精品一线二线三线无人区| 精品国产乱码久久久久久夜甘婷婷| 精品国产91久久久久久久妲己| 久久久久9999亚洲精品| 国产精品久久国产精麻豆99网站| 国产精品久久久久久久岛一牛影视 | 日韩主播视频在线| 久久精品国产澳门| 高清不卡在线观看| 色狠狠av一区二区三区| 5月丁香婷婷综合| 久久夜色精品国产噜噜av| 国产欧美精品一区| 美腿丝袜亚洲综合| 国产在线精品一区二区| 成人av电影免费观看| 欧美精品国产精品| 国产亚洲一本大道中文在线| 亚洲色欲色欲www| 蜜桃一区二区三区在线| av在线不卡观看免费观看| 欧美日韩一区不卡| 精品美女一区二区| 亚洲欧美日韩国产一区二区三区| 三级欧美韩日大片在线看| 韩国精品久久久| 色视频成人在线观看免| 精品久久久久一区| 一区二区在线观看免费视频播放| 美女性感视频久久| 97精品视频在线观看自产线路二| 欧美视频在线一区| 欧美经典一区二区| 天堂久久一区二区三区| 成人精品小蝌蚪| 91麻豆精品久久久久蜜臀| 中文字幕国产一区| 蜜桃视频第一区免费观看| 色婷婷综合在线| 国产女人水真多18毛片18精品视频 | 欧美国产成人精品| 天天色 色综合| 99re热视频精品| 欧美不卡一区二区三区| 亚洲一区二区偷拍精品| 国产99久久久久| 日韩免费看的电影| 亚洲综合色视频| www.亚洲激情.com| 久久伊人蜜桃av一区二区| 亚洲成人av免费| 色婷婷av一区二区三区大白胸| 久久久久久久久伊人| 日本vs亚洲vs韩国一区三区二区 | 亚洲国产一区视频| 成人a免费在线看| 精品成a人在线观看| 无码av中文一区二区三区桃花岛| av中文字幕一区| 久久久久久久一区| 久久99国产精品尤物| 欧美精品精品一区| 亚洲二区在线视频| 91麻豆免费观看| 国产精品久久久爽爽爽麻豆色哟哟 | 久久国产剧场电影| 日韩一级欧美一级| 亚洲国产精品久久不卡毛片| 丁香激情综合国产| 久久综合999| 韩国av一区二区三区在线观看| 欧美日韩国产天堂| 亚洲一区二区视频在线观看| 色呦呦一区二区三区| 亚洲日穴在线视频| 99久久久久久| 亚洲柠檬福利资源导航| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 91麻豆高清视频| 最新日韩av在线| av在线播放一区二区三区| 亚洲国产精品精华液2区45| 国产激情一区二区三区| 国产午夜精品一区二区三区四区| 国产一区激情在线| 国产欧美日韩精品一区| 国产99久久久国产精品潘金 | 亚洲精品中文在线观看| 99综合电影在线视频| 国产精品久久久久久久久免费相片| 岛国精品在线观看| 综合欧美一区二区三区| 色呦呦网站一区| 亚洲高清免费观看| 91精品啪在线观看国产60岁| 蜜桃av一区二区| 国产拍揄自揄精品视频麻豆| 波多野洁衣一区| 一区二区国产盗摄色噜噜| 欧美性大战久久久久久久蜜臀| 五月天视频一区| 精品粉嫩aⅴ一区二区三区四区| 国产在线精品一区二区夜色| 欧美国产欧美综合| 日本韩国精品在线| 日韩福利视频网| 久久久青草青青国产亚洲免观| 丁香桃色午夜亚洲一区二区三区| 欧美激情一区二区三区不卡 | 精品国产青草久久久久福利| 国产精品一区二区三区四区| 国产精品久久久久一区二区三区共| 色诱亚洲精品久久久久久| 视频一区二区三区在线| 国产三级精品三级在线专区| 色婷婷久久久久swag精品| 婷婷一区二区三区| 国产欧美一区在线| 欧美在线免费观看视频| 久久97超碰色| 亚洲日本中文字幕区| 欧美精品v日韩精品v韩国精品v| 国产中文字幕精品| 亚洲一区影音先锋| 久久亚洲春色中文字幕久久久| av中文字幕在线不卡| 日本在线不卡一区| 欧美国产日韩在线观看| 欧美喷水一区二区| 国产999精品久久久久久| 亚洲一区在线观看免费观看电影高清| 欧美成人在线直播| 色综合欧美在线视频区| 另类综合日韩欧美亚洲| 亚洲乱码日产精品bd| 精品毛片乱码1区2区3区| 色综合久久久久综合99| 久草热8精品视频在线观看| 亚洲欧美电影院| 久久综合色鬼综合色| 欧美在线观看视频一区二区| 精品一区二区三区免费观看| 一区二区三区影院| 久久精品人人做人人综合| 欧美亚洲动漫另类| 国产91综合网| 日本成人在线看| 一区二区三区四区国产精品| 久久久青草青青国产亚洲免观| 欧美日韩视频在线第一区| 北条麻妃一区二区三区| 激情文学综合插| 亚洲成a人片综合在线| 国产精品高清亚洲| 久久久久久影视| 日韩午夜激情视频| 欧美亚洲一区二区三区四区| 99视频在线观看一区三区| 激情五月播播久久久精品| 视频一区国产视频| 亚洲国产成人精品视频| 亚洲日本在线a| 国产日产欧美精品一区二区三区| 欧美精品黑人性xxxx| 欧美在线观看你懂的| 99久久精品免费看国产免费软件| 国产中文一区二区三区| 久久电影网电视剧免费观看| 三级影片在线观看欧美日韩一区二区| 伊人开心综合网| 亚洲天堂精品在线观看| 久久精品水蜜桃av综合天堂| 26uuu另类欧美亚洲曰本| 日韩视频免费观看高清完整版| 欧美午夜一区二区| 在线观看视频91| 一本到不卡免费一区二区|