| 1 | // |
| 2 | // Copyright (c) 2016 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 | // This mutating tree traversal works around an issue on the translation |
| 7 | // from texelFetchOffset into HLSL function Load on INTEL drivers. It |
| 8 | // works by translating texelFetchOffset into texelFetch: |
| 9 | // |
| 10 | // - From: texelFetchOffset(sampler, Position, lod, offset) |
| 11 | // - To: texelFetch(sampler, Position+offset, lod) |
| 12 | // |
| 13 | // See http://anglebug.com/1469 |
| 14 | |
| 15 | #ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_ |
| 16 | #define COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_ |
| 17 | |
| 18 | class TIntermNode; |
| 19 | class TSymbolTable; |
| 20 | |
| 21 | namespace sh |
| 22 | { |
| 23 | |
| 24 | void RewriteTexelFetchOffset(TIntermNode *root, const TSymbolTable &symbolTable, int shaderVersion); |
| 25 | |
| 26 | } // namespace sh |
| 27 | |
| 28 | #endif // COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_ |