KhronosGroup / KhronosGroup/glslang

Is xfb_stride must be multiple of 4

Open
#1,654 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

GLSL/ESSL Missing Functionality
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.