OSDN Git Service

radeonsi: initial WIP SI code
[android-x86/external-mesa.git] / src / gallium / drivers / radeon / AMDILEvergreenDevice.h
1 //==- AMDILEvergreenDevice.h - Define Evergreen Device for AMDIL -*- C++ -*--=//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //==-----------------------------------------------------------------------===//
9 //
10 // Interface for the subtarget data classes.
11 //
12 //===----------------------------------------------------------------------===//
13 // This file will define the interface that each generation needs to
14 // implement in order to correctly answer queries on the capabilities of the
15 // specific hardware.
16 //===----------------------------------------------------------------------===//
17 #ifndef _AMDILEVERGREENDEVICE_H_
18 #define _AMDILEVERGREENDEVICE_H_
19 #include "AMDILDevice.h"
20 #include "AMDILSubtarget.h"
21
22 namespace llvm {
23   class AMDILSubtarget;
24 //===----------------------------------------------------------------------===//
25 // Evergreen generation of devices and their respective sub classes
26 //===----------------------------------------------------------------------===//
27
28
29 // The AMDILEvergreenDevice is the base device class for all of the Evergreen
30 // series of cards. This class contains information required to differentiate
31 // the Evergreen device from the generic AMDILDevice. This device represents
32 // that capabilities of the 'Juniper' cards, also known as the HD57XX.
33 class AMDILEvergreenDevice : public AMDILDevice {
34 public:
35   AMDILEvergreenDevice(AMDILSubtarget *ST);
36   virtual ~AMDILEvergreenDevice();
37   virtual size_t getMaxLDSSize() const;
38   virtual size_t getMaxGDSSize() const;
39   virtual size_t getWavefrontSize() const;
40   virtual uint32_t getGeneration() const;
41   virtual uint32_t getMaxNumUAVs() const;
42   virtual uint32_t getResourceID(uint32_t) const;
43   virtual FunctionPass*
44     getIOExpansion(TargetMachine& AMDIL_OPT_LEVEL_DECL) const;
45   virtual AsmPrinter*
46     getAsmPrinter(TargetMachine& TM, MCStreamer &Streamer) const;
47   virtual FunctionPass*
48     getPointerManager(TargetMachine& AMDIL_OPT_LEVEL_DECL) const;
49 protected:
50   virtual void setCaps();
51 }; // AMDILEvergreenDevice
52
53 // The AMDILCypressDevice is similiar to the AMDILEvergreenDevice, except it has
54 // support for double precision operations. This device is used to represent
55 // both the Cypress and Hemlock cards, which are commercially known as HD58XX
56 // and HD59XX cards.
57 class AMDILCypressDevice : public AMDILEvergreenDevice {
58 public:
59   AMDILCypressDevice(AMDILSubtarget *ST);
60   virtual ~AMDILCypressDevice();
61 private:
62   virtual void setCaps();
63 }; // AMDILCypressDevice
64
65
66 // The AMDILCedarDevice is the class that represents all of the 'Cedar' based
67 // devices. This class differs from the base AMDILEvergreenDevice in that the
68 // device is a ~quarter of the 'Juniper'. These are commercially known as the
69 // HD54XX and HD53XX series of cards.
70 class AMDILCedarDevice : public AMDILEvergreenDevice {
71 public:
72   AMDILCedarDevice(AMDILSubtarget *ST);
73   virtual ~AMDILCedarDevice();
74   virtual size_t getWavefrontSize() const;
75 private:
76   virtual void setCaps();
77 }; // AMDILCedarDevice
78
79 // The AMDILRedwoodDevice is the class the represents all of the 'Redwood' based
80 // devices. This class differs from the base class, in that these devices are
81 // considered about half of a 'Juniper' device. These are commercially known as
82 // the HD55XX and HD56XX series of cards.
83 class AMDILRedwoodDevice : public AMDILEvergreenDevice {
84 public:
85   AMDILRedwoodDevice(AMDILSubtarget *ST);
86   virtual ~AMDILRedwoodDevice();
87   virtual size_t getWavefrontSize() const;
88 private:
89   virtual void setCaps();
90 }; // AMDILRedwoodDevice
91   
92 } // namespace llvm
93 #endif // _AMDILEVERGREENDEVICE_H_