KhronosGroup / KhronosGroup/glslang
Is xfb_stride must be multiple of 4
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 990
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 32
Description
I use int8 or int16 to test a transform feedback shader like this:
layout(location = 0, xfb_buffer=0, xfb_stride = 2, xfb_offset = 30) out uint16_t u16;
An error is reported concerning xfb_stride incorrectness.
Apparently, the xfb stride computation does not take 8-bit/16-bit into account because the standard xfb does not support such data types. But we do have 8-bit/16-bit types introduced by EXT_shader_explicit_arithmetic_types. For AMD, 16-bit data exported to xfb buffer is allowed by GL_AMD_gpu_shader_half_float. So I wonder if we can introduce such computation as a general solution. If you have concerns, I could separate the codes with AMD_EXTENSIONS.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating glslang's transform-feedback validation for xfb_stride and compare its rules with EXT_shader_explicit_arithmetic_types and GL_AMD_gpu_shader_half_float. Use the reported uint16_t shader with xfb_stride=2 and xfb_offset=30 as the reproduction; done means the validator applies the appropriate 8-bit/16-bit rules or clearly rejects unsupported cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100