Skip to content

Commit c27b883

Browse files
authored
Updated D3d12info to 3.13.0. Fixed overflow of uint64 values in database. (#67)
1 parent 347feae commit c27b883

File tree

12 files changed

+7562
-672
lines changed

12 files changed

+7562
-672
lines changed

source/GUI/html/default.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/GUI/html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html><head><title>D3d12infoGUI Report</title><meta charset="UTF-8"><script src="reports.js"></script><link rel="icon" type="image/png" href="84cce981575dbdc0fe40.png" sizes="96x96"/><link rel="icon" type="image/svg+xml" href="favicon.svg"/><link rel="shortcut icon" href="01dd40ee699a7c61060b.ico"/><link rel="apple-touch-icon" sizes="180x180" href="b0669e145449e7ec0cf7.png"/><link rel="manifest" href="ca84030c52cc08023014.webmanifest"/><script defer="defer" src="default.js"></script></head><body><noscript>This app requires JavaScript to run</noscript><div class="header"><div style="width:.5em"></div><div class="headerText">D3d12infoGUI Report</div><div style="width:1em"></div><a class="headerLink" href="https://d3d12infodb.boolka.dev/"><div class="headerText">Online Database</div><img class="icon" src="database.svg"></a><div style="width:1em"></div><div class="flexRight"><a class="headerLink" href="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/Devaniti/D3d12infoGUI"><div class="headerText">D3d12infoGUI on GitHub</div><img class="icon" src="github-mark.svg"> </a><a class="headerLink" href="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/sawickiap/D3d12info"><div class="headerText">D3d12info on GitHub</div><img class="icon" src="github-mark.svg"></a><div class="headerLink gui-tooltip"><div class="headerText">About</div><img class="tooltipicon" src="info.svg"><div class="gui-tooltiptext" style="width:35vw;left:70%;transform:translateX(-100%)">D3d12infoGUI is a tool for querying support for various Direct3D 12 features.<br>In this report you can find data about all D3D12 capable GPUs in your local machine.<br>There's also community-driven online database listing same information for various hardware which you can open via "Online Database" link in the header.<br>You can submit your reports to the online database with one of the submit buttons if database doesn't contain equivalent data already.<br>If database contains equivalent report, or if you just submitted one of your reports, you can then open it online and share the link to your report.<br>Those reports don't contain any personal information, you can see full contents of those reports on this page before submitting.</div></div><div style="width:3em"></div></div><div style="width:.5em"></div></div><main><div class="ReportTable"><div id="ListContainer"></div><div id="SearchBarPropertiesContainer"></div><div id="HeaderContainer"></div><div id="ReportContainer"></div></div></main></body></html>
1+
<!doctype html><html><head><title>D3d12infoGUI Report</title><meta charset="UTF-8"><script src="reports.js"></script><link rel="icon" type="image/png" href="84cce981575dbdc0fe40.png" sizes="96x96"/><link rel="icon" type="image/svg+xml" href="favicon.svg"/><link rel="shortcut icon" href="01dd40ee699a7c61060b.ico"/><link rel="apple-touch-icon" sizes="180x180" href="b0669e145449e7ec0cf7.png"/><link rel="manifest" href="ca84030c52cc08023014.webmanifest"/><script defer="defer" src="default.js"></script></head><body><noscript>This app requires JavaScript to run</noscript><div class="header"><div style="width:.5em"></div><div class="headerText">D3d12infoGUI Report</div><div style="width:1em"></div><a class="headerLink" href="https://d3d12infodb.boolka.dev/"><div class="headerText">Online Database</div><img class="icon" src="database.svg"></a><div style="width:1em"></div><div class="flexRight"><a class="headerLink" href="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/Devaniti/D3d12infoGUI"><div class="headerText">D3d12infoGUI on GitHub</div><img class="icon" src="github-mark.svg"></a><div style="width:.5em"></div><a class="headerLink" href="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/sawickiap/D3d12info"><div class="headerText">D3d12info on GitHub</div><img class="icon" src="github-mark.svg"></a><div style="width:.5em"></div><div class="headerLink gui-tooltip"><div class="headerText">About</div><img class="tooltipicon" src="info.svg"><div class="gui-tooltiptext" style="width:35vw;left:70%;transform:translateX(-100%)">D3d12infoGUI is a tool for querying support for various Direct3D 12 features.<br>In this report you can find data about all D3D12 capable GPUs in your local machine.<br>There's also community-driven online database listing same information for various hardware which you can open via "Online Database" link in the header.<br>You can submit your reports to the online database with one of the submit buttons if database doesn't contain equivalent data already.<br>If database contains equivalent report, or if you just submitted one of your reports, you can then open it online and share the link to your report.<br>Those reports don't contain any personal information, you can see full contents of those reports on this page before submitting.</div></div></div><div style="width:.5em"></div></div><main><div class="ReportTable"><div id="ListContainer"></div><div id="SearchBarPropertiesContainer"></div><div id="HeaderContainer"></div><div id="ReportContainer"></div></div></main></body></html>

source/db-server/database_common.js

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,39 @@
33
let SubmitUniqueProperitesInternal = require("./StructureDesc/submit_unique_properties.json")
44
let SubmitRequiredProperitesInternal = require("./StructureDesc/submit_required_properties.json")
55

6+
const MAX_INT64_VALUE = 2n ** 63n - 1n;
7+
const MAX_UINT64_VALUE = 2n ** 64n - 1n;
8+
9+
function WrapUInt64(inValue) {
10+
let integerValue = BigInt(inValue)
11+
if (integerValue > MAX_INT64_VALUE)
12+
{
13+
integerValue -= MAX_UINT64_VALUE + 1n
14+
}
15+
16+
return integerValue
17+
}
18+
19+
function UnwrapUInt64(inValue) {
20+
let integerValue = BigInt(inValue)
21+
if (integerValue < 0)
22+
{
23+
integerValue += MAX_UINT64_VALUE + 1n
24+
}
25+
26+
return integerValue.toString()
27+
}
28+
29+
function WrapLargeIntegers(input) {
30+
input["DXGI_ADAPTER_DESC3.DedicatedVideoMemory"] = WrapUInt64(input["DXGI_ADAPTER_DESC3.DedicatedVideoMemory"])
31+
input["CheckInterfaceSupport.UMDVersion"] = WrapUInt64(input["CheckInterfaceSupport.UMDVersion"])
32+
}
33+
34+
function UnwrapLargeIntegers(input) {
35+
input["DXGI_ADAPTER_DESC3.DedicatedVideoMemory"] = UnwrapUInt64(input["DXGI_ADAPTER_DESC3.DedicatedVideoMemory"])
36+
input["CheckInterfaceSupport.UMDVersion"] = UnwrapUInt64(input["CheckInterfaceSupport.UMDVersion"])
37+
}
38+
639
function ToSqlite3SupportedTypeInternal(inObj) {
740
if (inObj instanceof Object) {
841
return JSON.stringify(inObj)
@@ -68,6 +101,8 @@ function PackObjectInternal(input, includeData, allowMissing = false) {
68101
result.Data = JSON.stringify(input)
69102
}
70103

104+
WrapLargeIntegers(result)
105+
71106
return result
72107
}
73108

@@ -80,6 +115,15 @@ function DeepMergeInternal(target, source) {
80115
}
81116
}
82117

118+
function UnpackObjectInternal(input) {
119+
UnwrapLargeIntegers(input)
120+
121+
input = DeflattenObjectInternal(input)
122+
DeepMergeInternal(input, JSON.parse(input.Data))
123+
delete input.Data
124+
return input
125+
}
126+
83127
module.exports = {
84128
submitUniqueProperites: SubmitUniqueProperitesInternal,
85129
submitRequiredProperites: SubmitRequiredProperitesInternal,
@@ -115,9 +159,6 @@ module.exports = {
115159
},
116160

117161
unpackDatabaseObject: function (input) {
118-
input = DeflattenObjectInternal(input)
119-
DeepMergeInternal(input, JSON.parse(input.Data))
120-
delete input.Data
121-
return input
162+
return UnpackObjectInternal(input)
122163
}
123164
}

source/db-server/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ api.post('/post_submission', (req, res) => {
248248
return
249249
}
250250

251-
if (semver.lt(newSubmission["Header.Version"], "3.12.0")) {
251+
if (semver.lt(newSubmission["Header.Version"], "3.13.0")) {
252252
res.status(400)
253253
res.send('Unsupported D3d12info version. Please use newer D3d12infoGUI version to submit.')
254254
return

source/frontend/assets/html_gui/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@
2525
<div class="headerText">D3d12infoGUI on GitHub</div>
2626
<img class="icon" src="../icons/github-mark.svg">
2727
</a>
28+
<div style="width: 0.5em"></div>
2829
<a class="headerLink" href="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/sawickiap/D3d12info">
2930
<div class="headerText">D3d12info on GitHub</div>
3031
<img class="icon" src="../icons/github-mark.svg">
3132
</a>
33+
<div style="width: 0.5em"></div>
3234
<div class="headerLink gui-tooltip">
3335
<div class="headerText">About</div>
3436
<img class="tooltipicon" src="../icons/info.svg">
@@ -41,7 +43,6 @@
4143
Those reports don't contain any personal information, you can see full contents of those reports on this page before submitting.
4244
</div>
4345
</div>
44-
<div style="width: 3em"></div>
4546
</div>
4647
<div style="width: 0.5em"></div>
4748
</div>

0 commit comments

Comments
 (0)