tor-browser

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

driver_utils_d3d.cpp (821B)


      1 //
      2 // Copyright 2020 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 
      7 // driver_utils_d3d.cpp: Information specific to the D3D driver
      8 
      9 #include "libANGLE/renderer/d3d/driver_utils_d3d.h"
     10 
     11 namespace rx
     12 {
     13 
     14 std::string GetDriverVersionString(LARGE_INTEGER driverVersion)
     15 {
     16    std::stringstream versionString;
     17    uint64_t intVersion        = driverVersion.QuadPart;
     18    constexpr uint64_t kMask16 = std::numeric_limits<uint16_t>::max();
     19    versionString << ((intVersion >> 48) & kMask16) << ".";
     20    versionString << ((intVersion >> 32) & kMask16) << ".";
     21    versionString << ((intVersion >> 16) & kMask16) << ".";
     22    versionString << (intVersion & kMask16);
     23    return versionString.str();
     24 }
     25 
     26 }  // namespace rx