1 // 2 // Copyright 2024 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 // Device9.cpp: D3D9 implementation of egl::Device 8 9 #include "libANGLE/renderer/d3d/d3d9/Device9.h" 10 11 #include "libANGLE/Device.h" 12 #include "libANGLE/Display.h" 13 14 #include <EGL/eglext.h> 15 16 namespace rx 17 { 18 Device9(IDirect3DDevice9 * device)19Device9::Device9(IDirect3DDevice9 *device) : mDevice(device) {} 20 ~Device9()21Device9::~Device9() {} 22 getAttribute(const egl::Display * display,EGLint attribute,void ** outValue)23egl::Error Device9::getAttribute(const egl::Display *display, EGLint attribute, void **outValue) 24 { 25 ASSERT(attribute == EGL_D3D9_DEVICE_ANGLE); 26 *outValue = mDevice; 27 return egl::NoError(); 28 } 29 initialize()30egl::Error Device9::initialize() 31 { 32 return egl::NoError(); 33 } 34 generateExtensions(egl::DeviceExtensions * outExtensions) const35void Device9::generateExtensions(egl::DeviceExtensions *outExtensions) const 36 { 37 outExtensions->deviceD3D = true; 38 outExtensions->deviceD3D9 = true; 39 } 40 41 } // namespace rx 42