Skip to content

Commit afdddf3

Browse files
committed
Remove extra imageFootPrint and bake infinity value
1 parent 70e4ae2 commit afdddf3

10 files changed

+11
-34
lines changed

tools/deviceGen/DeviceGen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,14 @@ def transformTraits(dict, line_format, json_type, line_format_params):
259259

260260
if parsed_value == '0.5f-exp2f(-MinSubPixelInterpolationOffsetBits)':
261261
parsed_value = "0.4375"
262-
262+
263263
if parsed_type.endswith('int8_t'):
264264
parsed_type = parsed_type[:-3] + "16_t"
265265

266266
if parsed_type == "float" and parsed_name.find("Range") == -1 and parsed_name.find(r"[") == -1:
267267
parsed_type = "uint32_t"
268268
parsed_name += "BitPattern"
269-
parsed_value = f"asuint({parsed_value})"
269+
parsed_value = f"asuint({parsed_value})" if parsed_value != "nbl::hlsl::numeric_limits<float>::infinity" else "0x7F800000"
270270
parsed_json_type = r"std::bit_cast<uint32_t>(" + parsed_json_type
271271
parsed_cpp_name = parsed_cpp_name + r")"
272272

tools/deviceGen/input/device_features.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2445,7 +2445,7 @@
24452445
},
24462446
{
24472447
"type": "bool",
2448-
"name": "imageFootPrint",
2448+
"name": "imageFootprint",
24492449
"value": false,
24502450
"expose": "MOVE_TO_LIMIT",
24512451
"comment": [

tools/deviceGen/input/device_limits.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,15 +1830,6 @@
18301830
}
18311831
]
18321832
},
1833-
{
1834-
"type": "bool",
1835-
"name": "imageFootprint",
1836-
"value": false,
1837-
"comment": [
1838-
"VK_NV_shader_image_footprint",
1839-
"ShaderImageFootprintFeaturesNV"
1840-
]
1841-
},
18421833
{
18431834
"comment": [
18441835
"VK_EXT_pci_bus_info",

tools/deviceGen/output/SPhysicalDeviceFeatures_members.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@
999999
// [EXPOSE AS LIMIT] Enabled by Default, Moved to Limits
10001000
// ShaderImageFootprintFeaturesNV
10011001
// VK_NV_shader_image_footprint
1002-
// bool imageFootPrint = false;
1002+
// bool imageFootprint = false;
10031003

10041004
// [TODO LATER] requires extra API work to use
10051005
// GL Hint: in GL/GLES this is NV_scissor_exclusive

tools/deviceGen/output/SPhysicalDeviceLimits_members.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,6 @@
429429
bool computeDerivativeGroupQuads = false;
430430
bool computeDerivativeGroupLinear = false;
431431

432-
// VK_NV_shader_image_footprint
433-
// ShaderImageFootprintFeaturesNV
434-
bool imageFootprint = false;
435-
436432
// VK_EXT_pci_bus_info
437433
// PCIBusInfoPropertiesEXT
438434
uint32_t pciDomain = ~0u;
@@ -576,7 +572,7 @@
576572
bool shaderZeroInitializeWorkgroupMemory = false;
577573
bool shaderDeviceClock = false;
578574
bool shaderSubgroupClock = false;
579-
bool imageFootPrint = false;
575+
bool imageFootprint = false;
580576
bool shaderIntegerFunctions2 = false;
581577
bool shaderEarlyAndLateFragmentTests = false;
582578

tools/deviceGen/output/SPhysicalDeviceLimits_subset.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,6 @@ if (maxSampleLocationGridSize.y > _rhs.maxSampleLocationGridSize.y) return false
309309
if (computeDerivativeGroupQuads && !_rhs.computeDerivativeGroupQuads) return false;
310310
if (computeDerivativeGroupLinear && !_rhs.computeDerivativeGroupLinear) return false;
311311

312-
if (imageFootprint && !_rhs.imageFootprint) return false;
313-
314312
// if (pciDomain > _rhs.pciDomain) return false;
315313
// if (pciBus > _rhs.pciBus) return false;
316314
// if (pciDevice > _rhs.pciDevice) return false;
@@ -405,7 +403,7 @@ if (minFragmentDensityTexelSize.y < _rhs.minFragmentDensityTexelSize.y) return f
405403
if (shaderZeroInitializeWorkgroupMemory && !_rhs.shaderZeroInitializeWorkgroupMemory) return false;
406404
if (shaderDeviceClock && !_rhs.shaderDeviceClock) return false;
407405
if (shaderSubgroupClock && !_rhs.shaderSubgroupClock) return false;
408-
if (imageFootPrint && !_rhs.imageFootPrint) return false;
406+
if (imageFootprint && !_rhs.imageFootprint) return false;
409407
if (shaderIntegerFunctions2 && !_rhs.shaderIntegerFunctions2) return false;
410408
if (shaderEarlyAndLateFragmentTests && !_rhs.shaderEarlyAndLateFragmentTests) return false;
411409

tools/deviceGen/output/device_capabilities_traits_defaults.hlsl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ NBL_GENERATE_GET_OR_DEFAULT(maxDiscardRectangles, uint32_t, 0);
266266

267267
NBL_GENERATE_GET_OR_DEFAULT(primitiveOverestimationSizeBitPattern, uint32_t, asuint(0.f));
268268
NBL_GENERATE_GET_OR_DEFAULT(maxExtraPrimitiveOverestimationSizeBitPattern, uint32_t, asuint(0.f));
269-
NBL_GENERATE_GET_OR_DEFAULT(extraPrimitiveOverestimationSizeGranularityBitPattern, uint32_t, asuint(nbl::hlsl::numeric_limits<float>::infinity));
269+
NBL_GENERATE_GET_OR_DEFAULT(extraPrimitiveOverestimationSizeGranularityBitPattern, uint32_t, 0x7F800000);
270270
NBL_GENERATE_GET_OR_DEFAULT(primitiveUnderestimation, bool, false);
271271
NBL_GENERATE_GET_OR_DEFAULT(conservativePointAndLineRasterization, bool, false);
272272
NBL_GENERATE_GET_OR_DEFAULT(degenerateTrianglesRasterized, bool, false);
@@ -309,8 +309,6 @@ NBL_GENERATE_GET_OR_DEFAULT(postDepthCoverage, bool, false);
309309
NBL_GENERATE_GET_OR_DEFAULT(computeDerivativeGroupQuads, bool, false);
310310
NBL_GENERATE_GET_OR_DEFAULT(computeDerivativeGroupLinear, bool, false);
311311

312-
NBL_GENERATE_GET_OR_DEFAULT(imageFootprint, bool, false);
313-
314312
NBL_GENERATE_GET_OR_DEFAULT(pciDomain, uint32_t, ~0u);
315313
NBL_GENERATE_GET_OR_DEFAULT(pciBus, uint32_t, ~0u);
316314
NBL_GENERATE_GET_OR_DEFAULT(pciDevice, uint32_t, ~0u);
@@ -403,7 +401,7 @@ NBL_GENERATE_GET_OR_DEFAULT(shaderTerminateInvocation, bool, false);
403401
NBL_GENERATE_GET_OR_DEFAULT(shaderZeroInitializeWorkgroupMemory, bool, false);
404402
NBL_GENERATE_GET_OR_DEFAULT(shaderDeviceClock, bool, false);
405403
NBL_GENERATE_GET_OR_DEFAULT(shaderSubgroupClock, bool, false);
406-
NBL_GENERATE_GET_OR_DEFAULT(imageFootPrint, bool, false);
404+
NBL_GENERATE_GET_OR_DEFAULT(imageFootprint, bool, false);
407405
NBL_GENERATE_GET_OR_DEFAULT(shaderIntegerFunctions2, bool, false);
408406
NBL_GENERATE_GET_OR_DEFAULT(shaderEarlyAndLateFragmentTests, bool, false);
409407

tools/deviceGen/output/device_capabilities_traits_jit.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,6 @@ NBL_CONSTEXPR_STATIC_INLINE bool postDepthCoverage = )===" + std::string("(bool)
301301
NBL_CONSTEXPR_STATIC_INLINE bool computeDerivativeGroupQuads = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.computeDerivativeGroupQuads) + R"===(;
302302
NBL_CONSTEXPR_STATIC_INLINE bool computeDerivativeGroupLinear = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.computeDerivativeGroupLinear) + R"===(;
303303
304-
NBL_CONSTEXPR_STATIC_INLINE bool imageFootprint = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.imageFootprint) + R"===(;
305-
306304
NBL_CONSTEXPR_STATIC_INLINE uint32_t pciDomain = )===" + std::string("(uint32_t)") + CJITIncludeLoader::to_string(limits.pciDomain) + R"===(;
307305
NBL_CONSTEXPR_STATIC_INLINE uint32_t pciBus = )===" + std::string("(uint32_t)") + CJITIncludeLoader::to_string(limits.pciBus) + R"===(;
308306
NBL_CONSTEXPR_STATIC_INLINE uint32_t pciDevice = )===" + std::string("(uint32_t)") + CJITIncludeLoader::to_string(limits.pciDevice) + R"===(;
@@ -395,7 +393,7 @@ NBL_CONSTEXPR_STATIC_INLINE bool shaderTerminateInvocation = )===" + std::string
395393
NBL_CONSTEXPR_STATIC_INLINE bool shaderZeroInitializeWorkgroupMemory = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.shaderZeroInitializeWorkgroupMemory) + R"===(;
396394
NBL_CONSTEXPR_STATIC_INLINE bool shaderDeviceClock = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.shaderDeviceClock) + R"===(;
397395
NBL_CONSTEXPR_STATIC_INLINE bool shaderSubgroupClock = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.shaderSubgroupClock) + R"===(;
398-
NBL_CONSTEXPR_STATIC_INLINE bool imageFootPrint = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.imageFootPrint) + R"===(;
396+
NBL_CONSTEXPR_STATIC_INLINE bool imageFootprint = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.imageFootprint) + R"===(;
399397
NBL_CONSTEXPR_STATIC_INLINE bool shaderIntegerFunctions2 = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.shaderIntegerFunctions2) + R"===(;
400398
NBL_CONSTEXPR_STATIC_INLINE bool shaderEarlyAndLateFragmentTests = )===" + std::string("(bool)") + CJITIncludeLoader::to_string(limits.shaderEarlyAndLateFragmentTests) + R"===(;
401399

tools/deviceGen/output/device_capabilities_traits_members.hlsl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ NBL_CONSTEXPR_STATIC_INLINE bool postDepthCoverage = impl::get_or_default_postDe
300300
NBL_CONSTEXPR_STATIC_INLINE bool computeDerivativeGroupQuads = impl::get_or_default_computeDerivativeGroupQuads<device_capabilities>::value;
301301
NBL_CONSTEXPR_STATIC_INLINE bool computeDerivativeGroupLinear = impl::get_or_default_computeDerivativeGroupLinear<device_capabilities>::value;
302302

303-
NBL_CONSTEXPR_STATIC_INLINE bool imageFootprint = impl::get_or_default_imageFootprint<device_capabilities>::value;
304-
305303
NBL_CONSTEXPR_STATIC_INLINE uint32_t pciDomain = impl::get_or_default_pciDomain<device_capabilities>::value;
306304
NBL_CONSTEXPR_STATIC_INLINE uint32_t pciBus = impl::get_or_default_pciBus<device_capabilities>::value;
307305
NBL_CONSTEXPR_STATIC_INLINE uint32_t pciDevice = impl::get_or_default_pciDevice<device_capabilities>::value;
@@ -394,7 +392,7 @@ NBL_CONSTEXPR_STATIC_INLINE bool shaderTerminateInvocation = impl::get_or_defaul
394392
NBL_CONSTEXPR_STATIC_INLINE bool shaderZeroInitializeWorkgroupMemory = impl::get_or_default_shaderZeroInitializeWorkgroupMemory<device_capabilities>::value;
395393
NBL_CONSTEXPR_STATIC_INLINE bool shaderDeviceClock = impl::get_or_default_shaderDeviceClock<device_capabilities>::value;
396394
NBL_CONSTEXPR_STATIC_INLINE bool shaderSubgroupClock = impl::get_or_default_shaderSubgroupClock<device_capabilities>::value;
397-
NBL_CONSTEXPR_STATIC_INLINE bool imageFootPrint = impl::get_or_default_imageFootPrint<device_capabilities>::value;
395+
NBL_CONSTEXPR_STATIC_INLINE bool imageFootprint = impl::get_or_default_imageFootprint<device_capabilities>::value;
398396
NBL_CONSTEXPR_STATIC_INLINE bool shaderIntegerFunctions2 = impl::get_or_default_shaderIntegerFunctions2<device_capabilities>::value;
399397
NBL_CONSTEXPR_STATIC_INLINE bool shaderEarlyAndLateFragmentTests = impl::get_or_default_shaderEarlyAndLateFragmentTests<device_capabilities>::value;
400398

tools/deviceGen/output/device_capabilities_traits_testers.hlsl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ NBL_GENERATE_MEMBER_TESTER(postDepthCoverage);
300300
NBL_GENERATE_MEMBER_TESTER(computeDerivativeGroupQuads);
301301
NBL_GENERATE_MEMBER_TESTER(computeDerivativeGroupLinear);
302302

303-
NBL_GENERATE_MEMBER_TESTER(imageFootprint);
304-
305303
NBL_GENERATE_MEMBER_TESTER(pciDomain);
306304
NBL_GENERATE_MEMBER_TESTER(pciBus);
307305
NBL_GENERATE_MEMBER_TESTER(pciDevice);
@@ -394,7 +392,7 @@ NBL_GENERATE_MEMBER_TESTER(shaderTerminateInvocation);
394392
NBL_GENERATE_MEMBER_TESTER(shaderZeroInitializeWorkgroupMemory);
395393
NBL_GENERATE_MEMBER_TESTER(shaderDeviceClock);
396394
NBL_GENERATE_MEMBER_TESTER(shaderSubgroupClock);
397-
NBL_GENERATE_MEMBER_TESTER(imageFootPrint);
395+
NBL_GENERATE_MEMBER_TESTER(imageFootprint);
398396
NBL_GENERATE_MEMBER_TESTER(shaderIntegerFunctions2);
399397
NBL_GENERATE_MEMBER_TESTER(shaderEarlyAndLateFragmentTests);
400398

0 commit comments

Comments
 (0)