KhronosGroup / KhronosGroup/glslang
GL_ARB_cull_distance extension not supported.
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
Hi ,
the GL_ARB_cull_distance not be supported for glslang. thanks.
**glslang output :**
```
ERROR: D:\local\Temp\93f5459f-aa34-4345-aec3-1435a5369eb0.tmp:2: '#extension' : extension not supported: GL_ARB_cull_distance
ERROR: D:\local\Temp\93f5459f-aa34-4345-aec3-1435a5369eb0.tmp:2: '#extension' : extra tokens -- expected newline
ERROR: D:\local\Temp\93f5459f-aa34-4345-aec3-1435a5369eb0.tmp:2: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
```
**shader :**
```
#version 440
#extension GL_ARB_cull_distance : require
#ifndef GL_ARB_cull_distance
#error GL_ARB_cull_distance is undefined
#endif
in float gl_CullDistance[8];
highp float fetch()
{
highp float sum = 0.0;
sum += abs(gl_CullDistance[0]) * 1.0;
sum += abs(gl_CullDistance[1]) * 2.0;
sum += abs(gl_CullDistance[2]) * 3.0;
sum += abs(gl_CullDistance[3]) * 4.0;
sum += abs(gl_CullDistance[4]) * 5.0;
sum += abs(gl_CullDistance[5]) * 6.0;
sum += abs(gl_CullDistance[6]) * 7.0;
sum += abs(gl_CullDistance[7]) * 8.0;
return sum / 72.0;
}
#define ASSIGN_RETURN_VALUE fetch()
out vec4 out_fs;
/* Fragment shader main function */
void main()
{
out_fs = vec4(ASSIGN_RETURN_VALUE, 1.0, 1.0, 1.0);
}
```
Contributor guide
Research direction
No source file or test is named. Start by reproducing the provided shader with glslang and trace how #extension directives and GL_ARB_cull_distance are handled; done means the shader compiles without the reported unsupported-extension errors and the extension macro is defined.
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
- 25/100