blob: 9f5819bac863f7804e2c803859bbe8ff6e9583c4 [file] [log] [blame]
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00001//
2// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7//
8// The top level algorithms for linking multiple
9// shaders together.
10//
11#include "Common.h"
12#include "ShHandle.h"
13
14//
15// Actual link object, derived from the shader handle base classes.
16//
17class TGenericLinker : public TLinker {
18public:
19 TGenericLinker(EShExecutable e, int dOptions) : TLinker(e, infoSink), debugOptions(dOptions) { }
20 bool link(TCompilerList&, TUniformMap*) { return true; }
21 void getAttributeBindings(ShBindingTable const **t) const { }
22 TInfoSink infoSink;
23 int debugOptions;
24};
25
26//
27// The internal view of a uniform/float object exchanged with the driver.
28//
29class TUniformLinkedMap : public TUniformMap {
30public:
31 TUniformLinkedMap() { }
32 virtual int getLocation(const char* name) { return 0; }
33};
34
35TShHandleBase* ConstructLinker(EShExecutable executable, int debugOptions)
36{
37 return new TGenericLinker(executable, debugOptions);
38}
39
40void DeleteLinker(TShHandleBase* linker)
41{
42 delete linker;
43}
44
45TUniformMap* ConstructUniformMap()
46{
47 return new TUniformLinkedMap();
48}
49
50void DeleteUniformMap(TUniformMap* map)
51{
52 delete map;
53}
54
55TShHandleBase* ConstructBindings()
56{
57 return 0;
58}
59
60void DeleteBindingList(TShHandleBase* bindingList)
61{
62 delete bindingList;
63}