Commit 21534776 by Corentin Wallez Committed by Commit Bot

DisplayGL: remove getDriverVersion

It was unused and going forward angle_gpu_info_util will be used instead. BUG=angleproject:1874 Change-Id: I262cc36066aa28805d50f3fc4442b08477f9e24d Reviewed-on: https://chromium-review.googlesource.com/442024Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent f4f8db85
......@@ -43,7 +43,6 @@ class DisplayGL : public DisplayImpl
egl::Error makeCurrent(egl::Surface *drawSurface, egl::Surface *readSurface, gl::Context *context) override;
virtual egl::Error getDriverVersion(std::string *version) const = 0;
gl::Version getMaxSupportedESVersion() const override;
protected:
......
......@@ -55,8 +55,6 @@ class DisplayCGL : public DisplayGL
egl::Surface *drawSurface,
egl::Surface *readSurface) const override;
egl::Error getDriverVersion(std::string *version) const override;
private:
const FunctionsGL *getFunctionsGL() const override;
egl::Error makeCurrentSurfaceless(gl::Context *context) override;
......
......@@ -270,12 +270,6 @@ egl::Error DisplayCGL::waitNative(EGLint engine,
return egl::Error(EGL_SUCCESS);
}
egl::Error DisplayCGL::getDriverVersion(std::string *version) const
{
*version = "";
return egl::Error(EGL_SUCCESS);
}
egl::Error DisplayCGL::makeCurrentSurfaceless(gl::Context *context)
{
// We have nothing to do as mContext is always current, and that CGL is surfaceless by
......
......@@ -394,19 +394,4 @@ egl::Error DisplayAndroid::waitNative(EGLint engine,
return egl::Error(EGL_SUCCESS);
}
egl::Error DisplayAndroid::getDriverVersion(std::string *version) const
{
VendorID vendor = GetVendorID(mFunctionsGL);
switch (vendor)
{
case VENDOR_ID_QUALCOMM:
*version = reinterpret_cast<const char *>(mFunctionsGL->getString(GL_VERSION));
return egl::Error(EGL_SUCCESS);
default:
*version = "";
return egl::Error(EGL_SUCCESS);
}
}
} // namespace rx
......@@ -58,8 +58,6 @@ class DisplayAndroid : public DisplayEGL
egl::Surface *drawSurface,
egl::Surface *readSurface) const override;
egl::Error getDriverVersion(std::string *version) const override;
private:
template <typename T>
void getConfigAttrib(EGLConfig config, EGLint attribute, T *value) const;
......
......@@ -915,12 +915,6 @@ bool DisplayOzone::isValidNativeWindow(EGLNativeWindowType window) const
return true;
}
egl::Error DisplayOzone::getDriverVersion(std::string *version) const
{
*version = "";
return egl::Error(EGL_SUCCESS);
}
egl::Error DisplayOzone::waitClient() const
{
// TODO(fjhenigman) Implement this.
......
......@@ -146,8 +146,6 @@ class DisplayOzone final : public DisplayEGL
// one required so that the subsequent swapBuffers acts as expected.
void setSwapInterval(EGLSurface drawable, SwapControlData *data);
egl::Error getDriverVersion(std::string *version) const override;
private:
GLuint makeShader(GLuint type, const char *src);
void drawBuffer(Buffer *buffer);
......
......@@ -21,55 +21,6 @@
#include "libANGLE/renderer/gl/glx/WindowSurfaceGLX.h"
#include "libANGLE/renderer/gl/RendererGL.h"
#include "libANGLE/renderer/gl/renderergl_utils.h"
#include "third_party/libXNVCtrl/NVCtrl.h"
#include "third_party/libXNVCtrl/NVCtrlLib.h"
namespace
{
// Scan /etc/ati/amdpcsdb.default for "ReleaseVersion".
egl::Error GetAMDDriverVersion(std::string *version)
{
*version = "";
const char kAMDDriverInfoFileName[] = "/etc/ati/amdpcsdb.default";
std::ifstream file(kAMDDriverInfoFileName);
if (!file)
{
return egl::Error(EGL_SUCCESS);
}
std::string line;
while (std::getline(file, line))
{
static const char kReleaseVersion[] = "ReleaseVersion=";
if (line.compare(0, std::strlen(kReleaseVersion), kReleaseVersion) != 0)
{
continue;
}
const size_t begin = line.find_first_of("0123456789");
if (begin == std::string::npos)
{
continue;
}
const size_t end = line.find_first_not_of("0123456789.", begin);
if (end == std::string::npos)
{
*version = line.substr(begin);
}
else
{
*version = line.substr(begin, end - begin);
}
return egl::Error(EGL_SUCCESS);
}
return egl::Error(EGL_SUCCESS);
}
} // anonymous namespace
namespace rx
{
......@@ -775,22 +726,6 @@ egl::Error DisplayGLX::waitClient() const
return egl::Error(EGL_SUCCESS);
}
egl::Error DisplayGLX::getDriverVersion(std::string *version) const
{
VendorID vendor = GetVendorID(mFunctionsGL);
switch (vendor)
{
case VENDOR_ID_NVIDIA:
return getNVIDIADriverVersion(version);
case VENDOR_ID_AMD:
return GetAMDDriverVersion(version);
default:
*version = "";
return egl::Error(EGL_SUCCESS);
}
}
egl::Error DisplayGLX::waitNative(EGLint engine,
egl::Surface *drawSurface,
egl::Surface *readSurface) const
......@@ -954,28 +889,4 @@ egl::Error DisplayGLX::createContextAttribs(glx::FBConfig,
return egl::Error(EGL_SUCCESS);
}
egl::Error DisplayGLX::getNVIDIADriverVersion(std::string *version) const
{
*version = "";
int eventBase = 0;
int errorBase = 0;
if (XNVCTRLQueryExtension(mXDisplay, &eventBase, &errorBase))
{
int screenCount = ScreenCount(mXDisplay);
for (int screen = 0; screen < screenCount; ++screen)
{
char *buffer = nullptr;
if (XNVCTRLIsNvScreen(mXDisplay, screen) &&
XNVCTRLQueryStringAttribute(mXDisplay, screen, 0,
NV_CTRL_STRING_NVIDIA_DRIVER_VERSION, &buffer))
{
*version = buffer;
XFree(buffer);
}
}
}
return egl::Error(EGL_SUCCESS);
}
}
......@@ -73,8 +73,6 @@ class DisplayGLX : public DisplayGL
egl::Surface *drawSurface,
egl::Surface *readSurface) const override;
egl::Error getDriverVersion(std::string *version) const override;
// Synchronizes with the X server, if the display has been opened by ANGLE.
// Calling this is required at the end of every functions that does buffered
// X calls (not for glX calls) otherwise there might be race conditions
......@@ -105,8 +103,6 @@ class DisplayGLX : public DisplayGL
int profileMask,
glx::Context *context) const;
egl::Error getNVIDIADriverVersion(std::string *version) const;
FunctionsGL *mFunctionsGL;
std::map<int, glx::FBConfig> configIdToGLXConfig;
......
......@@ -684,12 +684,6 @@ egl::Error DisplayWGL::waitNative(EGLint engine,
return egl::Error(EGL_SUCCESS);
}
egl::Error DisplayWGL::getDriverVersion(std::string *version) const
{
*version = "";
return egl::Error(EGL_SUCCESS);
}
egl::Error DisplayWGL::registerD3DDevice(IUnknown *device, HANDLE *outHandle)
{
ASSERT(device != nullptr);
......
......@@ -61,8 +61,6 @@ class DisplayWGL : public DisplayGL
egl::Surface *drawSurface,
egl::Surface *readSurface) const override;
egl::Error getDriverVersion(std::string *version) const override;
egl::Error registerD3DDevice(IUnknown *device, HANDLE *outHandle);
void releaseD3DDevice(HANDLE handle);
......
......@@ -994,10 +994,6 @@
[
'ANGLE_USE_X11',
],
'dependencies':
[
'<(angle_path)/src/third_party/libXNVCtrl/libXNVCtrl.gyp:libXNVCtrl',
],
'sources':
[
'<@(libangle_gl_glx_sources)',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment