Skip to content

Commit

Permalink
Implemented Format Support Table (#13)
Browse files Browse the repository at this point in the history
* Updated D3d12info submodule

* Working format table

* Replaced emoji with icons in format table

* Updated required icon

* Changed color in required.svg

* Changed icon colors for light mode, some small code cleanup

* Updated D3d12info submodule
  • Loading branch information
Devaniti authored Dec 30, 2024
1 parent d942e89 commit ee9bbae
Show file tree
Hide file tree
Showing 36 changed files with 15,377 additions and 1,396 deletions.
2 changes: 1 addition & 1 deletion source/GUI/html/default.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions source/GUI/html/error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion source/GUI/html/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html><head><title>D3d12infoGUI Report</title><meta charset="UTF-8"><script src="reports.json"></script><script defer="defer" src="default.js"></script></head><body><noscript>This app requires javascript to run</noscript><main><div class="ReportTable"><div id="ListContainer"></div><div id="SearchBarPropertiesContainer"></div><div id="HeaderContainer"></div><div id="ReportContainer"></div></div></main></body></html>
<!doctype html><html><head><title>D3d12infoGUI Report</title><meta charset="UTF-8"><script src="reports.js"></script><script defer="defer" src="default.js"></script></head><body><noscript>This app requires javascript to run</noscript><main><div class="ReportTable"><div id="ListContainer"></div><div id="SearchBarPropertiesContainer"></div><div id="HeaderContainer"></div><div id="ReportContainer"></div></div></main></body></html>
12 changes: 12 additions & 0 deletions source/GUI/html/required.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions source/GUI/html/supported.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions source/GUI/html/unsupported.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions source/GUI/private/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int RunGUI(HINSTANCE hInstance) {
std::vector<std::vector<char>> validReports;

const Subprocess::ProcessOutput report = Subprocess::GetCommandOutput(
d3d12infoPath.string() + " -j --AllAdapters --EnableExperimental=OFF");
d3d12infoPath.string() + " --AllAdapters --JSON --Formats --EnableExperimental=OFF");
if (report.first == 0) {
validReports.push_back(report.second);
}
Expand All @@ -44,7 +44,7 @@ int RunGUI(HINSTANCE hInstance) {

const Subprocess::ProcessOutput previewReport =
Subprocess::GetCommandOutput(d3d12infoPreviewPath.string() +
" -j --AllAdapters --EnableExperimental=ON");
" --AllAdapters --JSON --Formats --EnableExperimental=ON");
if (previewReport.first == 0) {
validReports.push_back(previewReport.second);
}
Expand Down
2 changes: 1 addition & 1 deletion source/GUI/private/report_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void ReportGenerator::GenerateHTML(
}
}

std::filesystem::path jsFilePath = rootPath / L"Reports.json";
std::filesystem::path jsFilePath = rootPath / L"reports.js";
std::ofstream jsonFile;
jsonFile.open(jsFilePath, std::ios_base::out | std::ios_base::binary);
if (jsonFile.fail()) {
Expand Down
7 changes: 7 additions & 0 deletions source/frontend/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ a:hover {
margin-left: auto;
}

.cell-icon {
width: 1.45em;
height: 1.45em;
margin-left: auto;
margin-right: auto;
}

@media (prefers-color-scheme: dark) {
body {
color: #e1e1e1;
Expand Down
21 changes: 15 additions & 6 deletions source/frontend/assets/css/report_table.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
main {
width: 100%;
overflow-x: scroll;
}

.ReportTable {
Expand Down Expand Up @@ -64,11 +63,6 @@ td {

td:nth-of-type(even) {
background-color: #00000010;
width: 10%;
}

td:nth-of-type(odd) {
width: 60%;
}

button {
Expand Down Expand Up @@ -154,6 +148,21 @@ button:disabled {
vertical-align: sub;
}

.FormatTable {
width: auto;
top: 0;
}

.FormatTable tr:nth-of-type(1) {
writing-mode: vertical-rl;
position: sticky;
top: 0;
}

.FormatTable tr:nth-of-type(1) td:nth-of-type(1) {
writing-mode: horizontal-tb;
}

@media (prefers-color-scheme: dark) {

table,
Expand Down
2 changes: 1 addition & 1 deletion source/frontend/assets/html_gui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<title>D3d12infoGUI Report</title>
<meta charset="UTF-8">
<script type="text/javascript" src="reports.json"></script>
<script type="text/javascript" src="reports.js"></script>
</head>

<body>
Expand Down
Loading

0 comments on commit ee9bbae

Please sign in to comment.