Skip to content

[SER] Validate HitObject accessors#7371

Merged
damyanp merged 5 commits intomicrosoft:mainfrom
simoll:ser_dxvaccessors_patch
Apr 25, 2025
Merged

[SER] Validate HitObject accessors#7371
damyanp merged 5 commits intomicrosoft:mainfrom
simoll:ser_dxvaccessors_patch

Conversation

@simoll
Copy link
Copy Markdown
Collaborator

@simoll simoll commented Apr 23, 2025

Validate:
HitObject_GeometryIndex
HitObject_HitKind
HitObject_InstanceID
HitObject_InstanceIndex
HitObject_IsHit
HitObject_IsMiss
HitObject_IsNop
HitObject_LoadLocalRootTableConstant
HitObject_ObjectRayDirection
HitObject_ObjectRayOrigin
HitObject_ObjectToWorld3x4
HitObject_PrimitiveIndex
HitObject_RayFlags
HitObject_RayTCurrent
HitObject_RayTMin
HitObject_SetShaderTableIndex
HitObject_ShaderTableIndex
HitObject_WorldRayDirection
HitObject_WorldRayOrigin

Rules:

  • No undef parameters (HitObject, RecordIndex, RootTableOffset)
  • row/col/component indices are constant and in-bounds
  • If constant, RootTableOffset % 4 == 0

SER implementation tracker: #7214

Validate:
 HitObject_GeometryIndex
 HitObject_HitKind
 HitObject_InstanceID
 HitObject_InstanceIndex
 HitObject_IsHit
 HitObject_IsMiss
 HitObject_IsNop
 HitObject_LoadLocalRootTableConstant
 HitObject_ObjectRayDirection
 HitObject_ObjectRayOrigin
 HitObject_ObjectToWorld3x4
 HitObject_PrimitiveIndex
 HitObject_RayFlags
 HitObject_RayTCurrent
 HitObject_RayTMin
 HitObject_SetShaderTableIndex
 HitObject_ShaderTableIndex
 HitObject_WorldRayDirection
 HitObject_WorldRayOrigin

Rules:
* No undef parameters (HitObject, RecordIndex, RootTableOffset)
* row/col/component indices are constant and in-bounds
* If constant, RootTableOffset % 4 == 0

SER implementation tracker: microsoft#7214
Copy link
Copy Markdown
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

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

Only one minor nit.

Comment thread utils/hct/hctdb.py Outdated
@simoll
Copy link
Copy Markdown
Collaborator Author

simoll commented Apr 23, 2025

  • Merged main
  • Made err msg conform to standards
  • Fixed off-by-one but in constant range validation (upper bound was excluded)

Copy link
Copy Markdown
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

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

Looks good.

@damyanp damyanp moved this to Active in HLSL Support Apr 25, 2025
@damyanp damyanp merged commit 0f7af1b into microsoft:main Apr 25, 2025
12 checks passed
@github-project-automation github-project-automation Bot moved this from Active to Closed in HLSL Support Apr 25, 2025
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Apr 25, 2025
@simoll simoll deleted the ser_dxvaccessors_patch branch April 28, 2025 05:03
@damyanp damyanp removed this from HLSL Support Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants