Skip to content

Conversation

@alan-baker
Copy link
Contributor

  • Updates checks based on logical addressing to check logical pointers
  • Update pointer allocation validation
  • Add function call return pointer check
  • Add a new pass for logical pointer validation
    • checks valid logical pointer operands
    • checks logical pointer returns
    • checks same buffer requirement for VariablePointersStorageBuffer
    • checks variables must not:
      • be an operand to array length instructions
      • point to block arrays
      • point to an object containing a matrix
      • point to a component of a matrix

See internal SPIR-V issue 878.
Tested against Vulkan CTS. There are currently 41 failures. They are discussed in the SPIR-V issue.

@alan-baker alan-baker requested a review from dneto0 July 31, 2025 19:05
@alan-baker alan-baker force-pushed the val-logical-pointers branch from 67c3a0e to 7547ab5 Compare August 1, 2025 13:14
Copy link
Collaborator

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Very nice.

I think there's one bug repeated several times: disallowing StorageBuffer with VariablePointers capability alone should still be treated as a variable pointer usage.

Copy link
Collaborator

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

* Tracks all variable pointers
* Validates pointer operands
* improve function call checks
* improve ptr comparison checks
* validate typed variable pointers
  * may not be operands to array length
  * may not point to array of blocks
  * may not point to object containing matrix
  * may not point to component of a matrix
* Instruction tracing in a separate function
* Checker functions for untyped, typed and same buffer
* Missed extensions SPV_NV_ray_tracing_motion_blur and
  SPV_AMD_shader_enqueue
* add relaxation option to a check
@alan-baker alan-baker force-pushed the val-logical-pointers branch from 7547ab5 to 1c89052 Compare October 10, 2025 01:47
@alan-baker alan-baker marked this pull request as ready for review October 15, 2025 23:41
@alan-baker
Copy link
Contributor Author

CTS updates in https://gerrit.khronos.org/c/vk-gl-cts/+/18442.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants