{"id":24915438,"url":"https://github.com/simdsoft/angle-patch","last_synced_at":"2025-03-28T06:28:49.050Z","repository":{"id":118883232,"uuid":"264349976","full_name":"simdsoft/angle-patch","owner":"simdsoft","description":"The angle patch of x-studio","archived":false,"fork":false,"pushed_at":"2023-11-06T16:09:57.000Z","size":126,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T07:17:39.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simdsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-16T03:21:48.000Z","updated_at":"2022-01-13T16:24:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f1abc1b-6f70-4f2f-973a-7619be604a38","html_url":"https://github.com/simdsoft/angle-patch","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Fangle-patch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Fangle-patch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Fangle-patch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Fangle-patch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simdsoft","download_url":"https://codeload.github.com/simdsoft/angle-patch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245983269,"owners_count":20704696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-02T07:17:43.005Z","updated_at":"2025-03-28T06:28:49.006Z","avatar_url":"https://github.com/simdsoft.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angle-patch\n\n## build step\n### windows\n\n#### pitfall\n\n- winsdks downloads:\n  - latest: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/\n  - revisions: https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/\n- the windows sdks ver must match at follow files\n  - build/toolchain/win/setup_toolchain.py\n  - build/config/win/BUILD.gn\n\n- winsdkvers:\n  - 10.0.19041.0: `NTDDI_WIN10_VB`\n  - 10.0.20348.0: `NTDDI_WIN10_FE`\n  - 10.0.22000.0: `NTDDI_WIN10_CO`\n  - 10.0.22621.0: `NTDDI_WIN10_NI`\n\n1. Add **depot_tools** to PATH\n2. IMPORTANT: Set **DEPOT_TOOLS_WIN_TOOLCHAIN=0** in your environment if you are not a Googler.\n3. Ensure your system only contains vc142 toolset, multi toolset will cause gn error: Can't find User32.lib\n4. Setup command\n```sh\ngit clone https://chromium.googlesource.com/angle/angle\ncd angle\npython scripts/bootstrap.py\ngclient sync\ngit checkout master\n```\n\n## angleproject\nhttps://github.com/google/angle\n\n## About win7 compatible\n\n- Use newer glfw, refer to: https://github.com/glfw/glfw/issues/1718\n  ```cpp\n    #if !defined(ANGLE_ENABLE_WINDOWS_UWP)\n  #    if !ANGLE_SKIP_DXGI_1_2_CHECK\n      {\n          ANGLE_TRACE_EVENT0(\"gpu.angle\", \"Renderer11::initialize (DXGICheck)\");\n          // In order to create a swap chain for an HWND owned by another process, DXGI 1.2 is\n          // required.\n          // The easiest way to check is to query for a IDXGIDevice2.\n          bool requireDXGI1_2 = false;\n          HWND hwnd           = WindowFromDC(mDisplay-\u003egetNativeDisplayId());\n          if (hwnd)\n          {\n              DWORD currentProcessId = GetCurrentProcessId();\n              DWORD wndProcessId;\n              GetWindowThreadProcessId(hwnd, \u0026wndProcessId);\n              requireDXGI1_2 = (currentProcessId != wndProcessId);\n          }\n          else\n          {\n              requireDXGI1_2 = true;\n          }\n\n          if (requireDXGI1_2)\n          {\n              IDXGIDevice2 *dxgiDevice2 = nullptr;\n              result = mDevice-\u003eQueryInterface(__uuidof(IDXGIDevice2), (void **)\u0026dxgiDevice2);\n              if (FAILED(result))\n              {\n                  return egl::EglNotInitialized(D3D11_INIT_INCOMPATIBLE_DXGI)\n                         \u003c\u003c \"DXGI 1.2 required to present to HWNDs owned by another process.\";\n              }\n              SafeRelease(dxgiDevice2);\n          }\n      }\n  #    endif\n  #endif\n  ```\n- Fallback to software render\n  ```cpp\n  if (result == E_INVALIDARG \u0026\u0026 mAvailableFeatureLevels.size() \u003e 1u \u0026\u0026\n                mAvailableFeatureLevels[0] == D3D_FEATURE_LEVEL_11_1)\n  {\n      // On older Windows platforms, D3D11.1 is not supported which returns E_INVALIDARG.\n      // Try again without passing D3D_FEATURE_LEVEL_11_1 in case we have other feature\n      // levels to fall back on.\n      mAvailableFeatureLevels.erase(mAvailableFeatureLevels.begin());\n      if (createD3D11on12Device)\n      {\n          result =\n              callD3D11On12CreateDevice(D3D12CreateDevice, D3D11On12CreateDevice, false);\n      }\n      else\n      {\n          result = callD3D11CreateDevice(D3D11CreateDevice, false);\n      }\n  }\n  // x-studio spec, fallback to software render driver and try again\n  if (result == DXGI_ERROR_UNSUPPORTED)\n  { \n      mRequestedDriverType = D3D_DRIVER_TYPE_WARP;\n      result               = callD3D11CreateDevice(D3D11CreateDevice, false);\n  }\n  ```\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimdsoft%2Fangle-patch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimdsoft%2Fangle-patch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimdsoft%2Fangle-patch/lists"}