KhronosGroup / KhronosGroup/glslang
GL_EXT_structured_descriptor_heap using Int8 instead of OffsetIdEXT
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
```glsl
#version 460
#extension GL_EXT_descriptor_heap : require
#extension GL_EXT_structured_descriptor_heap : require
#extension GL_EXT_scalar_block_layout : require
layout(buffer_type, scalar) buffer SSBO_B {
uint x_b;
uint y_b;
};
layout(heap_offset = 64) resourceheap BufferHeap {
SSBO_B buf_b; // starts at offset = bufferDescriptorSize
} bufferHeap;
void main() {
bufferHeap.buf_b.x_b = 2;
}
```
currently generates
```
OpCapability Int8
%uchar = OpTypeInt 8 0
%_runtimearr_uchar = OpTypeRuntimeArray %uchar
```
and not sure why we need `shaderInt8` for this? I would have used `OffsetIdEXT` to set the offset instead making this a strange `uint8_t*` array
cc @ShchchowAMD @Guang-035
Contributor guide
Research direction
Reproduce the supplied GLSL shader with glslang and inspect the generated SPIR-V around the heap buffer representation. Compare the emitted Int8/uchar runtime array and Int8 capability with the extension semantics and the expected OffsetIdEXT approach; done means the behavior is explained and corrected if it is incorrect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100