Skip to content

Integration experience improvements#91

Open
Mrkol wants to merge 1 commit into
NVIDIA-RTX:mainfrom
Mrkol:main
Open

Integration experience improvements#91
Mrkol wants to merge 1 commit into
NVIDIA-RTX:mainfrom
Mrkol:main

Conversation

@Mrkol

@Mrkol Mrkol commented Jun 22, 2026

Copy link
Copy Markdown

While integrating the GPU baker into an engine, several issues occurred which forced us to patch the SDK. It would be wonderful if our changes could be upstreamed.

  • GPU baker only supported uint32 indexes. Added support for uint16 and uint8 indexes by passing the index format explicitly through the const buffer and having the index buffer be a ByteAddress one.
  • Backslashes at the ends of file were interfering with our preprocessor. Removed them as there's no point in having them, and others might have janky preprocessers too.
  • register keywords in macros hidden behind an additional macro level. This is again due to our preprocessor looking for hardcoded registers to avoid overlap with when doing automatic register scheduling based on input parameter names. As this trick is pretty common, I believe it is worth upstreaming this change.
  • Made global samplers engine-configurable. Our infrastructure doesn't allow having bindless sampler arrays in space0, and making this configurable in addition to all other input/output resources being as such sounds like a reasonable change. Removed omm_global_samplers.hlsli file completely in favor of having the relevant macros inside of omm_platform.hlsli.
  • The hardware we target doesn't necessarily support the BMI2 instruction set, so added an explicit check for that being enabled before using the relevant intrinsics.

}

TexCoords FetchTexCoords(Buffer<uint> indexBuffer, ByteAddressBuffer texCoordBuffer, uint primitiveIndex)
uint FetchInputIndex(ByteAddressBuffer indexBuffer, uint index)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The idea was to use a typed index buffer (Buffer) to allow the rendering API to handle the decoding logic via the SRV configuration. Did this approach not work in your integration for some reason?

@nv-jdeligiannis

Copy link
Copy Markdown
Collaborator

Thanks for the PR, to me it looks like good additions overall, I only have some small question marks surrounding the index buffer format change.

Out of curiosity, which engine are you integrating this into? I do understand if you can't share that information

@Mrkol

Mrkol commented Jul 2, 2026

Copy link
Copy Markdown
Author

@nv-jdeligiannis Dagor engine. We are pooling indexes of many different objects with potentially different index formats inside of a single raw buffer, and the engine does not support views of any kind in it's RHI because of a long-lasting dx9 legacy.

Sorry for not specifying this earlier, I'm quite rusty on the semantics of different buffer types and only now cleared up the picture for myself.

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