tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

RewriteTexelFetchOffset.h (1114B)


      1 //
      2 // Copyright 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 #include "common/angleutils.h"
     19 
     20 namespace sh
     21 {
     22 
     23 class TCompiler;
     24 class TIntermNode;
     25 class TSymbolTable;
     26 
     27 [[nodiscard]] bool RewriteTexelFetchOffset(TCompiler *compiler,
     28                                           TIntermNode *root,
     29                                           const TSymbolTable &symbolTable,
     30                                           int shaderVersion);
     31 
     32 }  // namespace sh
     33 
     34 #endif  // COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_