Skip to content

Commit e32b975

Browse files
spencer-lunargcharles-lunarg
authored andcommitted
info: Add vkGetPhysicalDeviceFragmentShadingRatesKHR
1 parent 1343cb3 commit e32b975

File tree

5 files changed

+27
-1
lines changed

5 files changed

+27
-1
lines changed

scripts/generators/vulkaninfo_generator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
STRUCTURES_TO_GEN = ['VkExtent3D', 'VkExtent2D', 'VkPhysicalDeviceLimits', 'VkPhysicalDeviceFeatures', 'VkPhysicalDeviceSparseProperties',
7777
'VkSurfaceCapabilitiesKHR', 'VkSurfaceFormatKHR', 'VkLayerProperties', 'VkPhysicalDeviceToolProperties', 'VkFormatProperties',
7878
'VkSurfacePresentScalingCapabilitiesKHR', 'VkSurfacePresentModeCompatibilityKHR', 'VkPhysicalDeviceHostImageCopyProperties',
79-
'VkVideoProfileInfoKHR', 'VkVideoCapabilitiesKHR', 'VkVideoFormatPropertiesKHR', 'VkCooperativeMatrixPropertiesKHR']
79+
'VkVideoProfileInfoKHR', 'VkVideoCapabilitiesKHR', 'VkVideoFormatPropertiesKHR', 'VkCooperativeMatrixPropertiesKHR',
80+
'VkPhysicalDeviceFragmentShadingRateKHR']
8081
ENUMS_TO_GEN = ['VkResult', 'VkFormat', 'VkPresentModeKHR',
8182
'VkPhysicalDeviceType', 'VkImageTiling', 'VkTimeDomainKHR']
8283
FLAGS_TO_GEN = ['VkSurfaceTransformFlagsKHR', 'VkCompositeAlphaFlagsKHR', 'VkSurfaceCounterFlagsEXT', 'VkQueueFlags',

vulkaninfo/generated/vulkaninfo.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5141,6 +5141,11 @@ void DumpVkPhysicalDeviceFragmentShadingRateFeaturesKHR(Printer &p, std::string
51415141
p.PrintKeyBool("primitiveFragmentShadingRate", static_cast<bool>(obj.primitiveFragmentShadingRate));
51425142
p.PrintKeyBool("attachmentFragmentShadingRate", static_cast<bool>(obj.attachmentFragmentShadingRate));
51435143
}
5144+
void DumpVkPhysicalDeviceFragmentShadingRateKHR(Printer &p, std::string name, const VkPhysicalDeviceFragmentShadingRateKHR &obj) {
5145+
ObjectWrapper object{p, name};
5146+
DumpVkSampleCountFlags(p, "sampleCounts", obj.sampleCounts);
5147+
DumpVkExtent2D(p, "fragmentSize", obj.fragmentSize);
5148+
}
51445149
void DumpVkPhysicalDeviceFragmentShadingRatePropertiesKHR(Printer &p, std::string name,
51455150
const VkPhysicalDeviceFragmentShadingRatePropertiesKHR &obj) {
51465151
ObjectWrapper object{p, name};

vulkaninfo/vulkaninfo.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,18 @@ void GpuDumpCalibrateableTimeDomain(Printer &p, AppGpu &gpu) {
618618
}
619619
}
620620

621+
void GpuDumpFragmentShadingRate(Printer &p, AppGpu &gpu) {
622+
auto props = GetFragmentShadingRateInfo(gpu);
623+
if (props.size() > 0) {
624+
p.SetSubHeader();
625+
ObjectWrapper obj(p, "vkGetPhysicalDeviceFragmentShadingRatesKHR");
626+
for (const auto prop : props) {
627+
DumpVkPhysicalDeviceFragmentShadingRateKHR(p, "VkPhysicalDeviceFragmentShadingRateKHR", prop);
628+
p.AddNewline();
629+
}
630+
}
631+
}
632+
621633
void GpuDevDump(Printer &p, AppGpu &gpu) {
622634
p.SetHeader();
623635
ObjectWrapper obj_format_props(p, "Format Properties");
@@ -765,6 +777,7 @@ void DumpGpu(Printer &p, AppGpu &gpu, const ShowSettings &show) {
765777
if (show.all) {
766778
GpuDumpCooperativeMatrix(p, gpu);
767779
GpuDumpCalibrateableTimeDomain(p, gpu);
780+
GpuDumpFragmentShadingRate(p, gpu);
768781
}
769782

770783
if (p.Type() != OutputType::text || show.formats) {

vulkaninfo/vulkaninfo.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,6 +1896,11 @@ std::vector<VkTimeDomainKHR> GetTimeDomainInfo(AppGpu &gpu) {
18961896
return GetVector<VkTimeDomainKHR>("vkGetPhysicalDeviceCalibrateableTimeDomainsKHR",
18971897
vkGetPhysicalDeviceCalibrateableTimeDomainsKHR, gpu.phys_device);
18981898
}
1899+
std::vector<VkPhysicalDeviceFragmentShadingRateKHR> GetFragmentShadingRateInfo(AppGpu &gpu) {
1900+
if (vkGetPhysicalDeviceFragmentShadingRatesKHR == nullptr) return {};
1901+
return GetVector<VkPhysicalDeviceFragmentShadingRateKHR>("vkGetPhysicalDeviceFragmentShadingRatesKHR",
1902+
vkGetPhysicalDeviceFragmentShadingRatesKHR, gpu.phys_device);
1903+
}
18991904

19001905
// --------- Format Properties ----------//
19011906
// can't use autogen because that is put in a header that we can't include because that header depends on stuff defined here

vulkaninfo/vulkaninfo_functions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT;
115115
PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR;
116116
PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR;
117117
PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR vkGetPhysicalDeviceCalibrateableTimeDomainsKHR;
118+
PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR;
118119

119120
// Device functions
120121
PFN_vkCreateImage vkCreateImage;
@@ -247,6 +248,7 @@ static void load_vulkan_instance_functions(VkInstance instance) {
247248
LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceFormatProperties2KHR);
248249
LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR);
249250
LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceCalibrateableTimeDomainsKHR);
251+
LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceFragmentShadingRatesKHR);
250252

251253
// Load device functions using vkGetInstanceProcAddr, vulkaninfo doesn't care about the extra indirection it causes
252254
LOAD_INSTANCE_FUNCTION(instance, vkCreateImage);

0 commit comments

Comments
 (0)