summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/AMDILEvergreenDevice.h
blob: cde1472f9346e3861e79491fdfc453a798d5cdfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//==- AMDILEvergreenDevice.h - Define Evergreen Device for AMDIL -*- C++ -*--=//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//==-----------------------------------------------------------------------===//
//
// Interface for the subtarget data classes.
//
//===----------------------------------------------------------------------===//
// This file will define the interface that each generation needs to
// implement in order to correctly answer queries on the capabilities of the
// specific hardware.
//===----------------------------------------------------------------------===//
#ifndef _AMDILEVERGREENDEVICE_H_
#define _AMDILEVERGREENDEVICE_H_
#include "AMDILDevice.h"
#include "AMDGPUSubtarget.h"

namespace llvm {
  class AMDGPUSubtarget;
//===----------------------------------------------------------------------===//
// Evergreen generation of devices and their respective sub classes
//===----------------------------------------------------------------------===//


// The AMDGPUEvergreenDevice is the base device class for all of the Evergreen
// series of cards. This class contains information required to differentiate
// the Evergreen device from the generic AMDGPUDevice. This device represents
// that capabilities of the 'Juniper' cards, also known as the HD57XX.
class AMDGPUEvergreenDevice : public AMDGPUDevice {
public:
  AMDGPUEvergreenDevice(AMDGPUSubtarget *ST);
  virtual ~AMDGPUEvergreenDevice();
  virtual size_t getMaxLDSSize() const;
  virtual size_t getMaxGDSSize() const;
  virtual size_t getWavefrontSize() const;
  virtual uint32_t getGeneration() const;
  virtual uint32_t getMaxNumUAVs() const;
  virtual uint32_t getResourceID(uint32_t) const;
protected:
  virtual void setCaps();
}; // AMDGPUEvergreenDevice

// The AMDGPUCypressDevice is similiar to the AMDGPUEvergreenDevice, except it has
// support for double precision operations. This device is used to represent
// both the Cypress and Hemlock cards, which are commercially known as HD58XX
// and HD59XX cards.
class AMDGPUCypressDevice : public AMDGPUEvergreenDevice {
public:
  AMDGPUCypressDevice(AMDGPUSubtarget *ST);
  virtual ~AMDGPUCypressDevice();
private:
  virtual void setCaps();
}; // AMDGPUCypressDevice


// The AMDGPUCedarDevice is the class that represents all of the 'Cedar' based
// devices. This class differs from the base AMDGPUEvergreenDevice in that the
// device is a ~quarter of the 'Juniper'. These are commercially known as the
// HD54XX and HD53XX series of cards.
class AMDGPUCedarDevice : public AMDGPUEvergreenDevice {
public:
  AMDGPUCedarDevice(AMDGPUSubtarget *ST);
  virtual ~AMDGPUCedarDevice();
  virtual size_t getWavefrontSize() const;
private:
  virtual void setCaps();
}; // AMDGPUCedarDevice

// The AMDGPURedwoodDevice is the class the represents all of the 'Redwood' based
// devices. This class differs from the base class, in that these devices are
// considered about half of a 'Juniper' device. These are commercially known as
// the HD55XX and HD56XX series of cards.
class AMDGPURedwoodDevice : public AMDGPUEvergreenDevice {
public:
  AMDGPURedwoodDevice(AMDGPUSubtarget *ST);
  virtual ~AMDGPURedwoodDevice();
  virtual size_t getWavefrontSize() const;
private:
  virtual void setCaps();
}; // AMDGPURedwoodDevice
  
} // namespace llvm
#endif // _AMDGPUEVERGREENDEVICE_H_