radeonsi: Fix sampler views for depth textures.
[mesa.git] / src / gallium / drivers / radeon / R600MachineFunctionInfo.cpp
1 //===-- R600MachineFunctionInfo.cpp - R600 Machine Function Info-*- 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 #include "R600MachineFunctionInfo.h"
11
12 using namespace llvm;
13
14 R600MachineFunctionInfo::R600MachineFunctionInfo(const MachineFunction &MF)
15 : MachineFunctionInfo(),
16 HasLinearInterpolation(false),
17 HasPerspectiveInterpolation(false)
18 { }
19
20 unsigned R600MachineFunctionInfo::GetIJPerspectiveIndex() const
21 {
22 assert(HasPerspectiveInterpolation);
23 return 0;
24 }
25
26 unsigned R600MachineFunctionInfo::GetIJLinearIndex() const
27 {
28 assert(HasLinearInterpolation);
29 if (HasPerspectiveInterpolation)
30 return 1;
31 else
32 return 0;
33 }