Skip to content

Commit

Permalink
Print screen resolution and sample count when invoking vk_strings com…
Browse files Browse the repository at this point in the history
…mand.
  • Loading branch information
kondrak committed Aug 30, 2019
1 parent 77c7cd9 commit 0d95431
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Overview
===
This is the official Quake 2 code v3.21 with additional Vulkan renderer and mission packs included. The goal is to maintain as much compatibility as possible with the original game, so there are no fancy visual upgrades here - just pure, vanilla Quake 2 experience as we knew it back in 1997. There are, however, a few notable differences that made the cut for various reasons:
This is the official Quake 2 code v3.21 with additional Vulkan renderer and both mission packs included. The goal of this project is to maintain as much compatibility as possible with the original game - just pure, vanilla Quake 2 experience as we knew it back in 1997. There are, however, a few notable differences that made the cut for various reasons:

- world colors have been slightly upgraded - the game's original, darker look can be toggled with the `vk_postprocess` console command
- on first launch, the game attempts to use Vulkan at 1920x1080 fullscreen resolution
Expand Down
29 changes: 17 additions & 12 deletions ref_vk/vk_rmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ void Vk_Strings_f(void)
VkPhysicalDeviceProperties deviceProperties;
qboolean isPreferred = false;
int preferredDevice = (int)vk_device_idx->value;
int msaa = (int)ri.Cvar_Get("vk_msaa", "0", CVAR_ARCHIVE)->value;
uint32_t driverMajor = VK_VERSION_MAJOR(vk_device.properties.driverVersion);
uint32_t driverMinor = VK_VERSION_MINOR(vk_device.properties.driverVersion);
uint32_t driverPatch = VK_VERSION_PATCH(vk_device.properties.driverVersion);
Expand Down Expand Up @@ -223,28 +224,32 @@ void Vk_Strings_f(void)
}
ri.Con_Printf(PRINT_ALL, "Using device #%d:\n", usedDevice);
ri.Con_Printf(PRINT_ALL, " deviceName: %s\n", vk_device.properties.deviceName);
ri.Con_Printf(PRINT_ALL, " resolution: %dx%d", vid.width, vid.height);
if (msaa > 0)
ri.Con_Printf(PRINT_ALL, " (MSAAx%d)\n", 2 << (msaa - 1));
else
ri.Con_Printf(PRINT_ALL, "\n");
#ifndef __linux__
// Intel on Windows and MacOS (Linux uses semver for Mesa drivers)
if (vk_device.properties.vendorID == 0x8086)
ri.Con_Printf(PRINT_ALL, " driverVersion: %d (0x%X)\n", vk_device.properties.driverVersion, vk_device.properties.driverVersion);
else
#endif
ri.Con_Printf(PRINT_ALL, " driverVersion: %d.%d.%d (0x%X)\n", driverMajor, driverMinor, driverPatch, vk_device.properties.driverVersion);
ri.Con_Printf(PRINT_ALL, " apiVersion: %d.%d.%d\n"
" deviceID: %d\n"
" vendorID: 0x%X (%s)\n"
" deviceType: %s\n"
" gfx/present/transfer: %d/%d/%d\n", VK_VERSION_MAJOR(vk_device.properties.apiVersion),
VK_VERSION_MINOR(vk_device.properties.apiVersion),
VK_VERSION_PATCH(vk_device.properties.apiVersion),
vk_device.properties.deviceID,
vk_device.properties.vendorID,
vk_config.vendor_name,
vk_config.device_type,
vk_device.gfxFamilyIndex, vk_device.presentFamilyIndex, vk_device.transferFamilyIndex);

ri.Con_Printf(PRINT_ALL, " apiVersion: %d.%d.%d\n", VK_VERSION_MAJOR(vk_device.properties.apiVersion),
VK_VERSION_MINOR(vk_device.properties.apiVersion),
VK_VERSION_PATCH(vk_device.properties.apiVersion));
ri.Con_Printf(PRINT_ALL, " deviceID: %d\n", vk_device.properties.deviceID);
ri.Con_Printf(PRINT_ALL, " vendorID: 0x%X (%s)\n", vk_device.properties.vendorID, vk_config.vendor_name);
ri.Con_Printf(PRINT_ALL, " deviceType: %s\n", vk_config.device_type);
ri.Con_Printf(PRINT_ALL, " gfx/present/transfer: %d/%d/%d\n", vk_device.gfxFamilyIndex,
vk_device.presentFamilyIndex,
vk_device.transferFamilyIndex);
ri.Con_Printf(PRINT_ALL, "Present mode: %s\n", vk_config.present_mode);
ri.Con_Printf(PRINT_ALL, "Swapchain image format: %d\n", vk_swapchain.format);
ri.Con_Printf(PRINT_ALL, "Supported present modes: ");

i = 0;
while(vk_config.supported_present_modes[i])
{
Expand Down

0 comments on commit 0d95431

Please sign in to comment.