glTF icon indicating copy to clipboard operation
glTF copied to clipboard

EXT_mesh_primitive_restart

Open pmconne opened this issue 1 year ago • 10 comments

This extension permits the prohibition against maximal index values in index buffers to be selectively relaxed for groups of primitives, while providing a trivial fallback for implementations that don't support primitive restart. Discussed in #1142.

pmconne avatar Mar 05 '25 14:03 pmconne

@emackey @javagl What do you think about making this an EXT extension? It seems quite trivial to support it in viewers.

Also since it extends mesh objects, should it be called *_mesh_primitive_restart?

lexaknyazev avatar Mar 07 '25 19:03 lexaknyazev

Whether the prefix is BENTEY or EXT is up do decide for the person who proposes the extension.

If there's no objection, I will push a change to rename the extension to EXT_mesh_primitive_restart and assign the copyright to Khronos.

pmconne avatar Mar 10 '25 18:03 pmconne

Should we just name it KHR_ directly? We have already ratified some EXT_ extensions and wasn't able to rename to KHR_ due to compatibility. Would we ever consider ratifying this extension?

bghgary avatar Mar 10 '25 20:03 bghgary

Should we just name it KHR_ directly?

We'd have to get an agreement within 3DF WG first and commit to providing Sample Assets at least.

lexaknyazev avatar Mar 10 '25 20:03 lexaknyazev

Should we just name it KHR_ directly?

We'd have to get an agreement within 3DF WG first and commit to providing Sample Assets at least.

@lexaknyazev @bghgary any update on this? Or any additional feedback for @pmconne?

pjcozzi avatar Apr 28 '25 13:04 pjcozzi

what prevents importers from doing this implicitly instead of checking for this explicit extension?

An importer that sees multiple line/triangle strip primitives all using the same vertex attributes could conceivably batch them together to be drawn using primitive restart, but that would require extra work on the importer's part to detect this and then rebuild the index buffer accordingly, whereas the extension ensures that the index buffer is already laid out for primitive restart.

pmconne avatar May 29 '25 11:05 pmconne

@lexaknyazev @javagl @bghgary Anything else for this PR before it gets merged?

emackey avatar May 29 '25 15:05 emackey

Did we discuss whether this should be KHR or EXT? Should there be a sample model that uses it?

These are not blocking though. I'm fine with merging regardless.

bghgary avatar May 29 '25 15:05 bghgary

Did we discuss whether this should be KHR or EXT?

I don't think it came up in the WG. I'm fine with EXT, unless there's some strong desire to ratify this I'm not aware of.

Should there be a sample model that uses it?

That would be great, but it's a separate PR into the sample asset repo, so shouldn't hold this up.

emackey avatar May 29 '25 19:05 emackey

What can I do to help get this over the finish line?

pmconne avatar Jun 25 '25 15:06 pmconne

We have implemented this extension. Please let me know what if anything is required before this can merge.

pmconne avatar Jul 10 '25 17:07 pmconne

@lexaknyazev Are there any other changes you'd like before we merge?

weegeekps avatar Jul 21 '25 14:07 weegeekps

@weegeekps Please confirm the copyright info. If it's fine, feel free to merge.

lexaknyazev avatar Jul 21 '25 14:07 lexaknyazev

@weegeekps All checked-in files must have SPDX copyright headers. The question was who is the owner in this particular case.

lexaknyazev avatar Oct 06 '25 21:10 lexaknyazev

@lexaknyazev My mistake. I've opened a new PR to correct this: https://github.com/KhronosGroup/glTF/pull/2533

weegeekps avatar Oct 06 '25 21:10 weegeekps